Flutter Navigator 2.0

Nov 8 2022 Dart 2.17.3, Flutter 3.0.2, Android Studio 2020.3

Part 2: Deep Dive Into Navigator 2.0

9. Use the App Router Delegate

Episode complete

Play next episode

Save for later
About this episode
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 8. Create the Router Delegate Next episode: 10. Create Material Pages

This video Use the App Router Delegate was last updated on Nov 8 2022

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.

Episode 09 - Use the App Router Delegate

We have to use the router delegate that we have just created. Navigate to main.dart and create a new private final variable named bookRouterDelegate and create it as a late variable like follows.

 late final BookRouterDelegate _bookRouterDelegate 
 _bookRouterDelegate = BookRouterDelegate(
        appStateManager: _appStateManager, bookManager: _bookManager);
home: Router(routerDelegate: _bookRouterDelegate)
Navigator.onGenerateRoute was null, but the rote names '/' was referenced.