Skip to Main Content
Flutter for Beginners
book

Flutter for Beginners

by Alessandro Biessek
September 2019
Beginner content levelBeginner
512 pages
12h 52m
English
Packt Publishing
Content preview from Flutter for Beginners

Putting it all together

It is time to check out how to use the Navigator widget in practice. Let's create a basic flow to navigate to a second screen and back. It will look something like this:

The basic way to use a Navigator widget is like any other—by adding it to the widget tree:

class NavigatorDirectlyApp extends StatelessWidget {  @override  Widget build(BuildContext context) {    return Directionality(      child: Navigator(        onGenerateRoute: (RouteSettings settings) {          return MaterialPageRoute(              builder: (BuildContext context) => _screen1(context));        },      ),      textDirection: TextDirection.ltr,    );  } _screen1(BuildContext context) {...} // hidden for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flutter for Beginners - Second Edition

Flutter for Beginners - Second Edition

Thomas Bailey, Alessandro Biessek
Flutter for Beginners - Third Edition

Flutter for Beginners - Third Edition

Thomas Bailey, Alessandro Biessek

Publisher Resources

ISBN: 9781788996082Supplemental Content