We will delve into the core concepts of navigation in Flutter, including routes, navigation stack, the context system and how we can improve the navigations in the web application within the framework or using packages.
based on app state + No stack (Go) = no result data Browser forward button Limitations + + + Inconsistent experience using the browser’s back and forward buttons +
guard Change stack based on route state Scenarios + + + Browser’s back and forward buttons + 404 + Send back result data (Push, Go) + Send arguments to page +
to build and configure a navigating widget. class AppRouterDelegate extends RouterDelegate<AppRouterConfiguration> with ChangeNotifier { @override Widget build(BuildContext context) { var browserState = routerState.browserState!; return AuthGuard( child: Navigator( pages: [...], onPopPage: (...) {...}, ), ); } } Defines app-specific behavior of how the Router learns about changes in app state and how it responds to them.
InnerRouterDelegate Nested routers Able to add widget on all nested routes Routes for the destinations in a BottomAppBar Routes for a stack of views above it