Want to refresh a page after back bottun pressed? The Navigator.push method returns a future of the generic type of the Route:
1 2 3 4 5 |
Navigator.of(context) .push(new MaterialPageRoute<String>(...)) .then((String value) { print(value); }); |
And inside the new route, when you have the value you need:
1 |
Navigator.of(context).pop('String'); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.