pushWithAnimation static method

Future pushWithAnimation(
  1. String routeName,
  2. PageType pageType,
  3. PushAnimationPageBuilder animationBuilder, {
  4. Map? params,
  5. bool replace = false,
  6. bool popGesture = false,
  7. Duration pushDuration = defaultPushDuration,
  8. Duration popDuration = defaultPopDuration,
})

自定义进场动画 animationBuilder 进场动画的builder pushDuration 进场时间 popDuration 退场时间 popGesture 是否支持手势返回 只有是popGesture为true并且 MaterialApp(ThemeData(platform: TargetPlatform.iOS); popGesture 才有效

Implementation

static Future pushWithAnimation(
  String routeName,
  PageType pageType,
  PushAnimationPageBuilder animationBuilder, {
  Map? params,
  bool replace = false,
  bool popGesture = false,
  Duration pushDuration = defaultPushDuration,
  Duration popDuration = defaultPopDuration,
}) {
  return DNavigatorManager.pushWithAnimation(
      routeName, pageType, animationBuilder,
      params: params,
      replace: replace,
      pushDuration: pushDuration,
      popDuration: popDuration,
      popGesture: popGesture);
}