DStack class

Constructors

DStack()

Properties

channel DChannel?
no setter
dLifeCycleObserver DLifeCycleObserver?
用来监听 应用生命周期
getter/setter pair
dNodeObserver DNodeObserver?
用来监听节点操作
getter/setter pair
dStackNavigatorObserver DStackNavigatorObserver
路由observer
final
hashCode int
The hash code for this object.
no setterinherited
homePageRoute String?
no getter
homeRoute String?
no setter
navigatorKey
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

nodeList() Future<List<DStackNode>>
获取节点列表
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pageBuilder(String? pageName) DStackWidgetBuilder
获取一个 DStackWidgetBuilder pageName 路由
register({Map<String, DStackWidgetBuilder>? builders, DLifeCycleObserver? observer, DNodeObserver? nodeObserver}) → void
注册DStack builders 路由的builder observer 生命周期监听者
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance DStack
no setter

Static Methods

animationPage(String routeName, PageType pageType, AnimatedPageBuilder animatedBuilder, {Map? params, Duration? transitionDuration, bool opaque = true, bool barrierDismissible = false, Color? barrierColor, String? barrierLabel, bool maintainState = true, bool fullscreenDialog = false, bool replace = false}) Future
自定义转场动画进入页面 flutter页面通过animatedBuilder自定义动画 native页面会转发到native,由native自行接入实现 replace:true flutter的pushReplacement实现 replace:false flutter的push实现
dismiss({Map? result, bool animated = true}) → void
关闭一个页面 如果是push进入的,等同pop 如果是present进入的,效果是从上往下缩回去
pop({Map? result, bool animated = true}) → void
pop 可以不传路由信息 result 返回值,可为空
popSkip(String skipName, {Map? result, bool animated = true}) → void
pop同一组页面
popTo(String routeName, PageType pageType, {Map? result, bool animated = true}) → void
popTo指定页面 无法popTo到根页面 要popTo到根页面请调用popToRoot
popToNativeRoot() → void
popToRoot({bool animated = true}) → void
回到根页面
present(String routeName, PageType pageType, {Map? params, bool maintainState = true, bool animated = true}) Future
弹出一个页面 animated 是否有进场动画
push(String routeName, PageType pageType, {Map? params, bool maintainState = true, bool animated = true}) Future
推出一个页面 routeName 路由名, pageType native或者flutter, params 参数 animated 是否有进场动画
pushAndRemoveUntil(String routeName, PageType pageType, {Map? params, bool maintainState = true, bool fullscreenDialog = false, bool animated = true, bool homePage = false}) → dynamic
跳转指定页面并清除剩余所有页面
pushBuild(String routeName, PageType pageType, WidgetBuilder builder, {Map? params, bool maintainState = true, bool fullscreenDialog = false, bool animated = true}) Future
等同push builder 页面builder animated 是否有进场动画
pushWithAnimation(String routeName, PageType pageType, PushAnimationPageBuilder animationBuilder, {Map? params, bool replace = false, bool popGesture = false, Duration pushDuration = defaultPushDuration, Duration popDuration = defaultPopDuration}) Future
自定义进场动画 animationBuilder 进场动画的builder pushDuration 进场时间 popDuration 退场时间 popGesture 是否支持手势返回 只有是popGesture为true并且 MaterialApp(ThemeData(platform: TargetPlatform.iOS); popGesture 才有效
replace(String routeName, PageType pageType, {Map? params, bool maintainState = true, bool fullscreenDialog = false, bool animated = true, bool homePage = false}) Future
只支持flutter使用,替换flutter页面 animated 是否有进场动画