Answers for "navigation.push in flutter"

1

navigitor.push flutter

Navigator.of(context).push(MaterialPageRoute(builder: ()=>MyPage()))
Posted by: Guest on March-04-2021
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 unload screen from stack

Navigator.pushAndRemoveUntil(
  context,
  MaterialPageRoute(builder: (context) => MainPage()),
  (Route<dynamic> route) => false,
);
Posted by: Guest on July-10-2020
0

navigator push flutter

// Within the SecondRoute widget
onPressed: () {
  Navigator.pop(context);
}
Posted by: Guest on March-01-2021

Browse Popular Code Answers by Language