Flutter Navigation parameters do not update on change?

Viewed 241

My top level widget displays a list of games one can enter. When someone clicks a game they get taken via

onTap: () {
  Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => EditRosterPage(roster: roster),
    ),
}

to a roster widget that will help them pick their team. A user will try to edit the roster and the widget in turn asks a ChangeNotifierProvider from the Provider library to update its state. The provider will then notifiy my top level widget that the roster has changed. It updates successfully and receives the updated roster -- but that same updated roster is not passed down through the MaterialPageRoute and the user cannot see that they've updated anything.

Is this expected behavior for properties passed down through Navigation to only be passed once or am I missing something?

0 Answers
Related