Answers for "flutter navigation push data"

16

navigator push flutter

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

flutter navigation pushreplacement

void _completeLogin() {
  Navigator.pushReplacement(
      context, MaterialPageRoute(builder: (BuildContext context) => MyHomePage()));
}
Posted by: Guest on April-14-2020

Browse Popular Code Answers by Language