showPumalModalBottomSheet function
void
showPumalModalBottomSheet({
- required BuildContext context,
- required Widget child,
- bool expand = false,
- bool safeArea = false,
- EdgeInsetsGeometry padding = const EdgeInsets.all(0.0),
- PumaModalType modalType = PumaModalType.cupertino,
- bool isDismissible = true,
- bool enableDrag = true,
Implementation
void showPumalModalBottomSheet({
required BuildContext context,
required Widget child,
bool expand = false,
bool safeArea = false,
EdgeInsetsGeometry padding = const EdgeInsets.all(0.0),
PumaModalType modalType = PumaModalType.cupertino,
bool isDismissible = true,
bool enableDrag = true,
}) {
switch (modalType) {
case PumaModalType.bar:
showBarModalBottomSheet(
expand: expand,
context: context,
isDismissible: isDismissible,
enableDrag: enableDrag,
builder: (context) => PumaPopper(
padding: padding,
color: Theme.of(context).colorScheme.background,
safeArea: safeArea,
child: child,
),
);
break;
default:
showCupertinoModalBottomSheet(
backgroundColor: Theme.of(context).colorScheme.background,
barrierColor: Theme.of(context).colorScheme.onSurface.withAlpha(130),
expand: expand,
context: context,
isDismissible: isDismissible,
enableDrag: enableDrag,
builder: (context) => PumaPopper(
padding: padding,
color: Theme.of(context).colorScheme.background,
safeArea: safeArea,
child: child,
),
);
}
}