DStack class
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 是否有进场动画