Navigator
You can use the navigator to change between pages
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const SecondRoute()),
); Navigator.pop(context);
//if you get a black screen use this
Navigator.of(context,rootNavigator:true).pop(context)
//going to the first page
Navigator.of(context).popUntil((route) => route.isFirst);
Last updated