DecoratedDialogRoute<B extends BLoC, T> constructor
DecoratedDialogRoute<B extends BLoC, T> ({
- Key? key,
- required Widget dialog,
- B? bloc,
- CloseKeyboardConfig? autoCloseKeyboard = const CloseKeyboardConfig(),
- InitCallback<
B> ? init, - LateInitCallback<
B> ? onLateinit, - bool animate = true,
- bool withForm = false,
- TabControllerConfig? tabControllerConfig,
- VoidCallback? onDisposed,
- WillPopCallback? onWillPop,
- SystemUiOverlayStyle? systemUiOverlayStyle,
- Widget animationBuilder()?,
- bool autoDispose = true,
- BoxDecoration decorationBuilder()?,
- Widget backgroundBuilder()?,
- PrimaryScrollControllerConfig? primaryScrollControllerConfig,
- Offset? anchorPoint,
- Color? barrierColor = Colors.black54,
- bool barrierDismissible = true,
- String? barrierLabel,
- CapturedThemes? themes,
- bool useSafeArea = true,
- 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),
);