This is code to show next page from profile page. In this edit page, there are several buttons to edit user information. When users finished to edit, Navigator.of(context).pop() called and profile page appears again.
In profile page:
String userName = "none"; // public string
........
Text(userName),
IconButton(icon: Icons.edit, onPressed: () => Navigator.of(context).pushNamed("/edit"))
In edit page:
IconButton(icon: Icons.edit, onPressed: () => username = "ABCD")
and when user finished editing, push a back button in appbar. this button is standard of Navigator not unique widget.
These code can't change Text(userName)
when back from edit page, just show old string.
So how can I call this profile page again? Or reload only userName
string?