Answers for "how to move to new screen with the runApp method in flutter"

16

flutter navigate to new screen

// Within the `FirstRoute` widget
onPressed: () {
  Navigator.push(
    context,
    MaterialPageRoute(builder: (context) => SecondRoute()),
  );
}
Posted by: Guest on March-25-2020
0

Flutter: Move to a new screen without back

Navigator.pushReplacement(
  context,
  MaterialPageRoute(builder: (context) => MainPage()),
  (Route<dynamic> route) => false,
);
Posted by: Guest on May-15-2021

Code answers related to "how to move to new screen with the runApp method in flutter"

Browse Popular Code Answers by Language