showFlash<T> method
Future<T?>
showFlash<T>({
- Duration transitionDuration = const Duration(milliseconds: 250),
- Duration reverseTransitionDuration = const Duration(milliseconds: 200),
- Color? barrierColor,
- double? barrierBlur,
- bool barrierDismissible = false,
- FutureOr<
bool> onBarrierTap()?, - Curve barrierCurve = Curves.ease,
- bool persistent = true,
- VoidCallback? onRemoveFromRoute,
- Duration? duration,
- required FlashBuilder<
T> builder, - Completer<
T> ? dismissCompleter,
Implementation
Future<T?> showFlash<T>({
Duration transitionDuration = const Duration(milliseconds: 250),
Duration reverseTransitionDuration = const Duration(milliseconds: 200),
Color? barrierColor,
double? barrierBlur,
bool barrierDismissible = false,
FutureOr<bool> Function()? onBarrierTap,
Curve barrierCurve = Curves.ease,
bool persistent = true,
VoidCallback? onRemoveFromRoute,
Duration? duration,
required FlashBuilder<T> builder,
Completer<T>? dismissCompleter,
}) {
final controller = DefaultFlashController<T>(
this,
transitionDuration: transitionDuration,
reverseTransitionDuration: reverseTransitionDuration,
barrierColor: barrierColor,
barrierBlur: barrierBlur,
barrierDismissible: barrierDismissible,
onBarrierTap: onBarrierTap,
barrierCurve: barrierCurve,
persistent: persistent,
onRemoveFromRoute: onRemoveFromRoute,
duration: duration,
builder: builder,
);
dismissCompleter?.future.then(controller.dismiss);
return controller.show();
}