Dynamically change color of PageViewer icons based on state variables

Widgets & Design

Hey all. I have a PageViewer, which I can set an Active and Inactive color for.

Now I want to set these from a State Variable color I have stored (GlobalAccentColor), but it seems I am unable to do so. I can just select theme colors. But I have the colors stored in a database so I need them to be able to be loaded from somewhere.

What have you tried so far?
  1. I thought about setting the colors to Accent1 or Primary, and then using a custom function to update that value. But I don't know for sure how to write that code and i think it is restricted

  2. Recreating the widget, still no option to load color from state variable

Did you check FlutterFlow's Documentation for this topic?
Yes