I have NestedScrollView()
, one of the slivers is a progress bar widget. The problem is that I haven't pulled the data yet as it a firebase stream.
The body has a StreamBuilder()
which gets the data and updates the progress variable which controls the progress bar.
The problem is that the progress is declared to be 0 and only when I get the data from my stream do I update it. But when it is updated I need to setState()
to update the progress bar but I cannot call setState()
during the widget build as that causes errors.
How can I rebuild a parent widget from a child or do something else to achieve what I want? In short, what I want is to rebuild the progress bar or the entire NestedScrollView()
when the progress variable changes.