show static method
void
show(
- BuildContext context, {
- String? message,
- double? progress,
- RistoLoaderStyle loaderStyle = RistoLoaderStyle.pulsingDots,
- double blurSigma = 6.0,
- Color? barrierColor,
- Color? loaderColor,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
Shows the loading panel as a full-screen, modal dialog. Prevents user interaction while loading.
Implementation
static void show(
BuildContext context, {
String? message,
double? progress,
RistoLoaderStyle loaderStyle = RistoLoaderStyle.pulsingDots,
double blurSigma = 6.0,
Color? barrierColor,
Color? loaderColor,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? margin,
}) {
if (_isShowing) return;
_isShowing = true;
showGeneralDialog(
context: context,
useRootNavigator: true,
barrierDismissible: false,
barrierColor: Colors.transparent,
pageBuilder: (_, _, _) => PopScope(
canPop: false,
child: LoadingPanel(
isLoading: true,
message: message,
progress: progress,
loaderStyle: loaderStyle,
blurSigma: blurSigma,
barrierColor: barrierColor ?? Colors.black.withCustomOpacity(0.25),
loaderColor: loaderColor,
padding: padding,
margin: margin,
),
),
transitionBuilder: (ctx, anim, _, child) => FadeTransition(
opacity: CurvedAnimation(parent: anim, curve: Curves.easeOutCubic),
child: child,
),
).then((_) => _isShowing = false);
}