CupertinoDialogRoute<T> constructor
- required WidgetBuilder builder,
- required BuildContext context,
- bool barrierDismissible = true,
- Color? barrierColor,
- String? barrierLabel,
- Duration transitionDuration = const Duration(milliseconds: 250),
- RouteTransitionsBuilder? transitionBuilder,
- RouteSettings? settings,
- bool? requestFocus,
- Offset? anchorPoint,
A dialog route that shows an iOS-style dialog.
Implementation
CupertinoDialogRoute({
required WidgetBuilder builder,
required BuildContext context,
super.barrierDismissible,
Color? barrierColor,
String? barrierLabel,
// This transition duration was eyeballed comparing with iOS
super.transitionDuration = const Duration(milliseconds: 250),
this.transitionBuilder,
super.settings,
super.requestFocus,
super.anchorPoint,
}) : super(
pageBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) {
return builder(context);
},
transitionBuilder: transitionBuilder ?? _buildCupertinoDialogTransitions,
barrierLabel: barrierLabel ?? CupertinoLocalizations.of(context).modalBarrierDismissLabel,
barrierColor: barrierColor ?? CupertinoDynamicColor.resolve(kCupertinoModalBarrierColor, context),
);