showModalFlash<T> method

Future<T?> showModalFlash<T>({
  1. required FlashBuilder<T> builder,
  2. Color? barrierColor = const Color(0x8A000000),
  3. double? barrierBlur,
  4. bool barrierDismissible = true,
  5. Curve barrierCurve = Curves.ease,
  6. String? barrierLabel,
  7. Duration transitionDuration = const Duration(milliseconds: 250),
  8. Duration reverseTransitionDuration = const Duration(milliseconds: 200),
  9. RouteSettings? settings,
  10. bool useRootNavigator = false,
  11. Duration? duration,
  12. @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);
}