Results for “Navigation and routing”
Full-text search across Boring Doc explanations, official documentation pages, the Flutter API index and every indexed version change.
Concepts
- Navigation and routing3.47.7navigation
Navigator keeps a stack of Route objects; Navigator.push adds a route built from a widget (usually via MaterialPageRoute) and Navigator.pop removes the top one, optionally
- Animations3.47.7animation
element transition: two Hero widgets with the same tag on two routes, and Navigator push/pop flies the widget between them in an overlay. An implicit animation
- Common Flutter errors and how to fix them3.47.7widgets
Most everyday Flutter errors are the layout contract being broken: a child
- State management3.47.7state
Flutter is declarative: the UI is a function of state, so instead
- Testing3.47.7testing
Flutter has three test levels: unit tests (package:test) for plain Dart
Guides
- Navigation and routingdoc
Overview of Flutter's navigation and routing features Flutter provides a complete system for navigating between screens and handling deep links. Small applications without complex
- Navigate to a new screen and backdoc
navigate between two routes, using these steps: Create two routes. Navigate to the second route using Navigator.push() . Return to the first route
- Navigate with named routesdoc
named routes using the following steps: Create two screens. Define the routes. Navigate to the second screen using Navigator.pushNamed() . Return to the first screen using
- Deep linkingdoc
Navigate to routes when the app receives a new URL. Deep links are links that not only open an app, but also take the user
- Pass arguments to a named routedoc
pass arguments to a named route. The Navigator provides the ability to navigate to a named route from any part of an app using
- Hero animationsdoc
How to animate a widget to fly between two screens. The hero
- Stack-based navigationdoc
widget from the widget tree. The push method adds a new route to the navigator's stack, and displays the widget returned from the builder property
- Send data to a new screendoc
pass data to a new route. Often, you not only want to navigate to a new screen, but also pass data to the screen as well
- Common Flutter errorsdoc
How to recognize and resolve common Flutter framework errors. Introduction This page
- Introduction to animationsdoc
How to perform animations in Flutter. Well-designed animations make a UI
API reference
- RouteObserverclass
Navigator observer that notifies RouteAwares of changes to the state of their Route. widgets.RouteObserver RouteObserver Route Observer class widgets
- Routeclass
abstraction for an entry managed by a Navigator. widgets.Route Route Route class widgets
- widgets.PopNavigatorRouterDelegateMixinmixin
that wires RouterDelegate.popRoute to the Navigator it builds. widgets.PopNavigatorRouterDelegateMixin PopNavigatorRouterDelegateMixin Pop Navigator Router Delegate Mixin mixin widgets
- widgets.RoutePresentationCallbacktypedef
given some arguments and a navigator adds a new restorable route to that navigator and returns the opaque ID of that new route. widgets.RoutePresentationCallback
- RouterDelegateclass
used by the Router widget to build and configure a navigating widget. widgets.RouterDelegate RouterDelegate Router Delegate class widgets
- MaterialApp.routerconstructor
Creates a MaterialApp that uses the Router instead of a Navigator. material.MaterialApp.MaterialApp.router MaterialApp router Material App.router constructor material
- CupertinoApp.routerconstructor
Creates a CupertinoApp that uses the Router instead of a Navigator. cupertino.CupertinoApp.CupertinoApp.router CupertinoApp router Cupertino App.router constructor cupertino
- WidgetsApp.routerconstructor
Creates a WidgetsApp that uses the Router instead of a Navigator. widgets.WidgetsApp.WidgetsApp.router WidgetsApp router Widgets App.router constructor widgets
- OverlayRouteclass
route that displays widgets in the Navigator's Overlay. widgets.OverlayRoute OverlayRoute Overlay Route class widgets
- widgets.RestorableRouteBuildertypedef
Route that is to be added to a Navigator. widgets.RestorableRouteBuilder RestorableRouteBuilder Restorable Route Builder typedef widgets
- widgets.LocalHistoryRoutemixin
mixin used by routes to handle back navigations internally by popping a list. widgets.LocalHistoryRoute LocalHistoryRoute Local History Route mixin widgets
- RestorableRouteFutureclass
Gives access to a Route object and its return value that was added to a navigator via one of its "restorable" API methods. widgets.RestorableRouteFuture RestorableRouteFuture Restorable
- CupertinoNavigationBarBackButton.newconstructor
CupertinoNavigationBarBackButton that can be used to pop the current route. cupertino.CupertinoNavigationBarBackButton.CupertinoNavigationBarBackButton.new CupertinoNavigationBarBackButton new Cupertino Navigation Bar Back Button.new constructor cupertino
Version changes
- Fix: Use route navigator for CupertinoSheetRoute pop3.38.0bugfix
route navigator for CupertinoSheetRoute pop (Framework, by @rkishan516). CupertinoSheetRoute
- The Route and Navigator refactoring1.17.0breaking
least one route after pop'); else print('Oops! No more routes.'); // Our navigator pops the route anyway. Navigator.pop(context); } ) ``` Case 2: An app generates
- More Strict Assertions in the Navigator and the Hero Controller Scope1.20.0breaking
under the same // hero controller scope created by MaterialApp. return Stack( children: [ Navigator( onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute ( settings: settings, builder: (BuildContext context) { return const Text('first
- The Route Transition record and Transition delegate updates1.20.0breaking
popping animation to finish, this route would sit in the navigator routes stack until the animation was done. If a page update occurred during this
- Deprecate RouteTransitionRecord.markForRemove3.32.0deprecated
required. The navigator continues to work as expected with new capabilities. RouteTransitionRecord Navigator
- Deprecated just-in-time navigation pop APIs for Android Predictive Back3.16.0deprecated
To support Android 14's Predictive Back feature, a set of ahead
- Rebuild optimization for OverlayEntries and Routes1.17.0breaking
This optimization improves performance for route transitions, but it may uncover
- Navigator's page APIs breaking change3.24.0breaking
List<Page > pages = <Page >[page1, page2, page3]; runApp( MaterialApp( home: Navigator( pages: pages, onPopPage: (Route<Object?> route, Object? result) { if (route.settings == page2) { return false
- The default page transition on Android is now PredictiveBackPageTransitionBuilder3.38.0breaking
gesture allows the user to peek at the previous route or app and possibly cancel the navigation. Flutter added support for this with the `PopScope` widget