DNavigatorManager class

主要两个部分: 1.发送节点信息到Native,Native记录完整的路由信息 2.处理Native发过来的指令,Native侧节点管理处理完节点信息,如果有指令过来,则flutter根据节点信息做相应的跳转事件

Constructors

DNavigatorManager()

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 Methods

animationPage(String routeName, PageType pageType, AnimatedPageBuilder animatedBuilder, [Map? params, Duration? transitionDuration = defaultPushDuration, bool opaque = true, bool barrierDismissible = false, Color? barrierColor, String? barrierLabel, bool maintainState = true, bool fullscreenDialog = false, bool replace = false]) Future
自定义进场方式
animationRoute({required AnimatedPageBuilder animatedBuilder, required String routeName, Map? params, Duration transitionDuration = const Duration(milliseconds: 200), bool opaque = true, bool barrierDismissible = false, Color? barrierColor, String? barrierLabel, bool maintainState = true, bool fullscreenDialog = false}) PageRouteBuilder
用户自定义flutter页面转场动画
dismiss({Map? result, bool animated = true}) → void
gardPop([Map? params, bool? animated = true]) Future
handleActionToFlutter(Map arguments) Future?
2.处理Native发过来的指令 argument里包含必选参数routeName,actionType,可选参数params
identifierWithRoute(Route? route) String
生成route的唯一标识
materialRoute({String? routeName, Map? params, bool pushAnimated = true, bool popAnimated = true, bool maintainState = true, bool fullscreenDialog = false, WidgetBuilder? builder}) PageRoute
创建PageRoute pushAnimated 是否有进场动画 popAnimated 是否有退场动画
nodeHandle(String? target, PageType? pageType, String actionType, {Map? result, bool? homePage, bool animated = true, Route? route}) → void
pop({Map? result, bool animated = true}) → void
result 返回值,可为空 pop可以不传路由信息
popSkip(String skipName, {Map? result, bool animated = true}) → void
popTo(String routeName, PageType pageType, {Map? result, bool animated = true}) → void
popToRoot({bool animated = true}) → void
popWithGesture(Route route) → void
present(String routeName, PageType pageType, {Map? params, bool? maintainState, bool animated = true}) Future
弹出页面
push(String routeName, PageType pageType, {Map? params, bool? maintainState, bool animated = true}) Future
pushAndRemoveUntil(String routeName, PageType pageType, {Map? params, bool maintainState = true, bool homePage = false, bool animated = true, bool fullscreenDialog = false}) → dynamic
跳转指定页面并清除剩余所有页面
pushBuild(String routeName, PageType pageType, WidgetBuilder builder, {Map? params, bool? maintainState, bool? fullscreenDialog, bool animated = true}) Future
提供外界直接传builder的能力
pushWithAnimation(String routeName, PageType pageType, PushAnimationPageBuilder animationBuilder, {Map? params, bool? replace, Duration? pushDuration, Duration? popDuration, bool popGesture = false}) Future
自定义进场动画 animationBuilder 进场动画的builder pushDuration 进场时间 popDuration 退场时间
removeFlutterNode(String? target, {String? identifier}) → void
移除flutter的节点
replace(String? routeName, PageType? pageType, {Map? params, bool maintainState = true, bool homePage = false, bool animated = true, bool fullscreenDialog = false}) Future
目前只支持flutter使用,替换flutter页面