I have one StatefulWidget
in Flutter with button, which navigates me to another StatefulWidget
using Navigator.push()
. On second widget I’m changing global state (some user preferences). When I get back from second widget to first, using Navigator.pop()
the first widget is in old state, but I want to force it’s reload. Any idea how to do this? I have one idea but it looks ugly:
- pop to remove second widget (current one)
- pop again to remove first widget (previous one)
- push first widget (it should force redraw)