NavigatorKit class
导航工具 使用Navigator 2.0 todo 暂时只支持位移转场动画 Created by Arthur on 9/3/2022.
Properties
- delegate ← RouterStackDelegate
-
设置代理
no getter
- 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
-
pop<
T> ({T? result}) → void -
返回上一页
result
返回上一页的结果 -
popUntil<
T extends Object?> ({required String name, T? result}) → void -
从栈顶开始pop到指定路由
返回结果返回到指定
name
的resultCompleter中name
路由名称result
返回上一页的结果 -
pushAndPopUntil<
T extends Object?, T0 extends Object?> ({required String newName, String? oldName, dynamic arguments, TransitionAnimationConfig? config, T0? result}) → Future< PageRouteResult< T?> > -
连续移除多个回退栈并打开新界面
newName
新增路由名oldName
回退到哪个路由名 如果为null
or当前路由栈没有路由
则Remove All Routearguments
参数config
转场动画配置result
返回上一页的结果 -
pushNamed<
T extends Object?> ({required String name, dynamic arguments, TransitionAnimationConfig? config}) → Future< PageRouteResult< T?> > -
添加命名路由
name
路由名arguments
参数config
转场动画配置 -
pushReplacement<
T extends Object?, T0 extends Object?> ({required String name, dynamic arguments, TransitionAnimationConfig? config, T0? result}) → Future< PageRouteResult< T?> > -
替换当前界面
name
路由名arguments
参数config
转场动画配置result
返回上一页的结果 -
removeRoute(
{required String name, bool removeAll = false}) → bool -
直接移除某个路由栈
Search rule: 栈顶 -> 栈底
如果位于栈顶则直接pop
name
路由名removeAll
如果存在多个,是否全部删除 return 是否有删除 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NavigatorKit
-
latefinal