multipage app flutter code example
Example 1: multi page app flutter
// Within the SecondRoute widget
onPressed: () {
Navigator.pop(context);
}
Example 2: multi page app flutter
// Within the `FirstRoute` widget
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SecondRoute()),
);
}