showLottieOverlayDuring method

Future<bool> showLottieOverlayDuring(
  1. Duration period, {
  2. String? animationUrl,
  3. VoidCallback? onHide,
})

Shortcut to show the animation during a period.

It returns true if the callback is started; false otherwise (i.e. if the animation is already shown)

Implementation

Future<bool> showLottieOverlayDuring(Duration period,
    {String? animationUrl, VoidCallback? onHide}) {
  return showLottieOverlayWhile(() async => await Future.delayed(period),
      onHide: onHide, animationUrl: animationUrl);
}