MeteorNavigator class

MeteorNavigator

MeteorNavigator是Meteor框架的导航器,用于页面跳转,页面栈管理,页面返回等操作

MeteorNavigator支持两种引擎,Flutter引擎和Native引擎,Flutter引擎用于Flutter页面跳转,Native引擎用于原生页面跳转

MeteorNavigator支持两种页面类型,Flutter页面和Native页面,Flutter页面由Flutter引擎渲染,Native页面由Native引擎渲染

MeteorNavigator支持两种页面跳转方式,push和pushReplacement,push表示从当前页面跳转到指定页面

Constructors

MeteorNavigator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

getter/setter pair

Static Methods

init({required GlobalKey<NavigatorState> rootKey}) → void
isCurrentRoot() Future<bool>
判断当前路由根路由
isRoot(String routeName) Future<bool>
判断路由routeName是否为根路由
pop<T extends Object?>([T? result]) Future<void>
pop到上一个页面
popToRoot() Future<void>
pop 到根页面
popUntil(String routeName, {bool isFarthest = false}) Future<void>
pop 到指定页面并替换当前页面
popUntilLastNative<T extends Object?>([dynamic result]) Future<void>
pop 到最近的一个原生页面
pushNamed<T extends Object?>(String routeName, {PageType pageType = PageType.flutter, bool isOpaque = true, bool animated = true, bool present = false, Map<String, dynamic>? arguments}) Future<T?>
push 到一个已经存在路由表的页面
pushNamedAndRemoveUntil<T extends Object?>(String routeName, String untilRouteName, {PageType pageType = PageType.flutter, bool isOpaque = true, bool animated = true, Map<String, dynamic>? arguments}) Future<T?>
push 到指定页面,同时会清除从页面pushNamedAndRemoveUntil页面到指定routeName链路上的所有页面
pushNamedAndRemoveUntilRoot<T extends Object?>(String routeName, {PageType pageType = PageType.flutter, bool isOpaque = true, bool animated = true, Map<String, dynamic>? arguments}) Future<T?>
push 到指定页面,同时会清除从页面到根页面链路上的所有页面
pushReplacementNamed<T extends Object?, TO extends Object?>(String routeName, {PageType pageType = PageType.flutter, bool isOpaque = true, bool animated = true, Map<String, dynamic>? arguments}) Future<T?>
push 到指定页面并替换当前页面
rootRouteName() Future<String?>
根路由名称
routeExists(String routeName) Future<bool>
判断路由routeName是否存在
routeNameStack() Future<List<String>>
当前路由名栈
topRouteIsNative() Future<bool>
判断路由顶层是否为原生
topRouteName() Future<String?>
最上层路由名称