Navigator.of(context).pop();
Navigator.of(context).pop("Value");
##Accepting value in from one view controller to other using future method
Navigator.of(context).pushNamed(SettingScreen.routeName).then((result){
print(result);
}
Drawer view in defin in scaffold method
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Home Screen"),),
body: Center(child: Text("Drawer"),),
drawer: MainDrawerScreen(),
);
}
To overcome from stack cysle we are using pushReplace method
Navigator.of(context).pushReplacementNamed("/setting");
if setting pgae is present it will autometically replace