NavigatorUtils class

Constructors

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
parseRoute(String route) Map<String, dynamic>?
解析路由数据并返回map
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

push(BuildContext context, Widget scene) → dynamic
pushAndRemoveUntil(BuildContext context, Widget scene) → dynamic
pushAnimation(BuildContext context, Widget scene) → dynamic
跳转页面带动画 采用原生PageRouteBuilder,这个是一个渐变的效果
pushAnimationFade(BuildContext context, Widget scene) → dynamic
跳转页面带动画
pushAnimationType(BuildContext context, Widget scene, AnimationType type) → dynamic
跳转页面带动画,传入type类型 type ---> SlideRL 从右到左的滑动 type ---> SlideLR 从左到右的滑动 type ---> SlideTB 从上到下的滑动 type ---> SlideBT 从下到上的滑动 type ---> Fade 透明过渡
pushGlobal(GlobalKey<NavigatorState> navigatorKey, Widget scene) → dynamic
从window获取NA传递的路由参数 从根结点跳转页面
pushNamed(BuildContext context, String path) → dynamic
导航到新路由
pushNamedArguments(BuildContext context, String path, {Object? arguments}) → dynamic
导航到新路由并传入参数
pushResult(BuildContext context, Widget scene, dynamic function(Object)) → dynamic
跳转新页面并返回结果回调
replace(BuildContext context, Widget old, Widget scene) → dynamic