showModalFlash<T> method
Future<T?>
showModalFlash<T>({
- required FlashBuilder<
T> builder, - Color? barrierColor = const Color(0x8A000000),
- double? barrierBlur,
- bool barrierDismissible = true,
- Curve barrierCurve = Curves.ease,
- String? barrierLabel,
- Duration transitionDuration = const Duration(milliseconds: 250),
- Duration reverseTransitionDuration = const Duration(milliseconds: 200),
- RouteSettings? settings,
- Duration? duration,
- @Deprecated('use Navigator.of(context).pop() instead') Completer<
T> ? dismissCompleter,
Implementation
Future<T?> showModalFlash<T>({
required FlashBuilder<T> builder,
Color? barrierColor = const Color(0x8A000000),
double? barrierBlur,
bool barrierDismissible = true,
Curve barrierCurve = Curves.ease,
String? barrierLabel,
Duration transitionDuration = const Duration(milliseconds: 250),
Duration reverseTransitionDuration = const Duration(milliseconds: 200),
RouteSettings? settings,
bool useRootNavigator = false,
Duration? duration,
@Deprecated('use Navigator.of(context).pop() instead') Completer<T>? dismissCompleter,
}) {
final NavigatorState navigator = Navigator.of(this, rootNavigator: useRootNavigator);
final route = ModalFlashRoute<T>(
builder: builder,
capturedThemes: InheritedTheme.capture(from: this, to: navigator.context),
barrierBlur: barrierBlur,
barrierColor: barrierColor,
barrierDismissible: barrierDismissible,
barrierCurve: barrierCurve,
barrierLabel: barrierLabel,
transitionDuration: transitionDuration,
reverseTransitionDuration: reverseTransitionDuration,
settings: settings,
duration: duration,
);
dismissCompleter?.future.then(route.dismiss);
return navigator.push(route);
}