Tuesday, December 31, 2019

Flutter: Navigating to new screen

Flutter: Navigating to new screen

In flutter world, everything is Widget!

1. Create new screen
2. Navigate to the new screen using Navigator.push
3. Return to the first screen using Navigator.pop.

Thats all mainly to be done.

class FirstScreen extends StatlessWidget {
@Override
Widget build(BuildContext context){
Return Scaffold(appBar:AppBar(title:Text('First Screen')))
}
}

References
https://flutter.io/cookbook/navigation/navigation-basics/

No comments:

Post a Comment