RouteTree class
Constructors
RouteTree.new ({required List <RouteInfo > routeInfoList , required List <RouteBase > routes , ExceptionHandler ? onException , RouteTreePageBuilder ? errorPageBuilder , RouteTreeWidgetBuilder ? errorBuilder , RouteTreeRedirect ? redirect , Listenable ? refreshListenable , int redirectLimit = 5 , bool routerNeglect = false , String ? initialLocation , bool overridePlatformDefaultLocation = false , List <NavigatorObserver > ? observers , bool debugLogDiagnostics = false , GlobalKey <NavigatorState > ? navigatorKey , String ? restorationScopeId , bool requestFocus = true })
Methods
canPop ()
→ bool
Returns true
if there is at least two or more route can be pop.
dispose ()
→ void
Disposes resource created by this object.
go (String location , { })
→ void
Navigate to a URI location w/ optional query parameters, e.g.
/family/f2/person/p1?color=blue
goNamed (String name , {Map <String , String > pathParameters = const <String, String>{} , Map <String , dynamic > queryParameters = const <String, dynamic>{} , })
→ void
Navigate to a named route w/ optional parameters, e.g.
name='person', pathParameters={'fid': 'f2', 'pid': 'p1'}
Navigate to the named route.
namedLocation (String name , {Map <String , String > pathParameters = const <String, String>{} , Map <String , dynamic > queryParameters = const <String, dynamic>{} })
→ String
Get a location from route name and parameters.
This is useful for redirecting to a named location.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop <T extends Object ? > ([T? result ])
→ void
Pop the top-most route off the current screen.
push <T extends Object ? > (String location , { })
→ Future <T? >
Push a URI location onto the page stack w/ optional query parameters, e.g.
/family/f2/person/p1?color=blue
.
pushNamed <T extends Object ? > (String name , {Map <String , String > pathParameters = const <String, String>{} , Map <String , dynamic > queryParameters = const <String, dynamic>{} , })
→ Future <T? >
Push a named route onto the page stack w/ optional parameters, e.g.
name='person', pathParameters={'fid': 'f2', 'pid': 'p1'}
pushReplacement <T extends Object ? > (String location , { })
→ Future <T? >
Replaces the top-most page of the page stack with the given URL location
w/ optional query parameters, e.g. /family/f2/person/p1?color=blue
.
pushReplacementNamed <T extends Object ? > (String name , {Map <String , String > pathParameters = const <String, String>{} , Map <String , dynamic > queryParameters = const <String, dynamic>{} , })
→ Future <T? >
Replaces the top-most page of the page stack with the named route w/
optional parameters, e.g. name='person', pathParameters={'fid': 'f2', 'pid': 'p1'}
.
refresh ()
→ void
Refresh the route.
replace <T > (String location , { })
→ Future <T? >
Replaces the top-most page of the page stack with the given one but treats
it as the same page.
replaceNamed <T > (String name , {Map <String , String > pathParameters = const <String, String>{} , Map <String , dynamic > queryParameters = const <String, dynamic>{} , })
→ Future <T? >
Replaces the top-most page with the named route and optional parameters,
preserving the page key.
restore (RouteMatchList matchList )
→ void
Restore the RouteMatchList
toString ()
→ String
A string representation of this object.
inherited
navigation_package 1.0.0+1