DecoratedDialogRoute<B extends BLoC, T> constructor

DecoratedDialogRoute<B extends BLoC, T>({
  1. Key? key,
  2. required Widget dialog,
  3. B? bloc,
  4. CloseKeyboardConfig? autoCloseKeyboard = const CloseKeyboardConfig(),
  5. InitCallback<B>? init,
  6. LateInitCallback<B>? onLateinit,
  7. bool animate = true,
  8. bool withForm = false,
  9. @Deprecated('使用localNavigatorConfig代替') bool withLocalNavigator = false,
  10. LocalNavigatorConfig? localNavigatorConfig,
  11. TabControllerConfig? tabControllerConfig,
  12. VoidCallback? onDisposed,
  13. WillPopCallback? onWillPop,
  14. SystemUiOverlayStyle? systemUiOverlayStyle,
  15. Widget animationBuilder(
    1. Animation<double>,
    2. Widget
    )?,
  16. bool autoDispose = true,
  17. BoxDecoration decorationBuilder(
    1. BuildContext
    )?,
  18. Widget backgroundBuilder(
    1. BuildContext
    )?,
  19. PrimaryScrollControllerConfig? primaryScrollControllerConfig,
  20. Offset? anchorPoint,
  21. Color? barrierColor = Colors.black54,
  22. bool barrierDismissible = true,
  23. String? barrierLabel,
  24. CapturedThemes? themes,
  25. bool useSafeArea = true,
  26. required String routeName,
})

Implementation

DecoratedDialogRoute({
  Key? key,
  required this.dialog,
  B? bloc,
  this.autoCloseKeyboard = const CloseKeyboardConfig(),
  this.init,
  this.onLateinit,
  this.animate = true,
  this.withForm = false,
  @Deprecated('使用localNavigatorConfig代替') this.withLocalNavigator = false,
  this.localNavigatorConfig,
  this.tabControllerConfig,
  this.onDisposed,
  this.onWillPop,
  this.systemUiOverlayStyle,
  this.animationBuilder,
  this.autoDispose = true,
  this.decorationBuilder,
  this.backgroundBuilder,
  this.primaryScrollControllerConfig,
  super.anchorPoint,
  super.barrierColor,
  super.barrierDismissible,
  super.barrierLabel,
  super.themes,
  super.useSafeArea,
  required String routeName,
})  : _bloc = bloc ?? get(), // 如果没有显式指定就从DI容器寻找
      super(
        context: gNavigatorKey.currentContext!,
        builder: (context) => dialog,
        settings: RouteSettings(name: routeName),
      );