DecoratedRoute<B extends BLoC, T> constructor

DecoratedRoute<B extends BLoC, T>({
  1. Key? key,
  2. required Widget screen,
  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. WidgetBuilder? backgroundBuilder,
  19. WidgetBuilder? foregroundBuilder,
  20. PrimaryScrollControllerConfig? primaryScrollControllerConfig,
  21. required String routeName,
  22. bool fullscreenDialog = false,
  23. bool maintainState = true,
})

Implementation

DecoratedRoute({
  Key? key,
  required this.screen,
  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.foregroundBuilder,
  this.primaryScrollControllerConfig,
  required String routeName,
  super.fullscreenDialog,
  super.maintainState,
})  : _bloc = bloc ?? get(), // 如果没有显式指定就从DI容器寻找
      super(
        builder: (context) => screen,
        settings: RouteSettings(name: routeName),
      );