basic static method
void
basic({})
Implementation
static void basic({
required String? title,
required Widget content,
TextStyle? titleStyle,
Color? backgroundColor,
Color? barrierColor,
bool? isDismissible,
bool? isScrolled,
bool? persistent,
double? radius,
bool? showDivider = true,
bool? showDragIndicator = true,
double? padding,
}) {
// add haptic feedback (UX)
HapticFeedback.lightImpact();
Get.bottomSheet(
SafeArea(
child: VStack(
[
if (showDragIndicator == true) ExDashLine().pSymmetric(v: 24),
if (title != null) ...[
title.text.bold
.size(18)
.maxLines(2)
.textStyle(titleStyle)
.ellipsis
.make()
.pOnly(bottom: 8)
.pSymmetric(h: 24)
.pOnly(top: showDragIndicator == true ? 0 : 16),
if (showDivider == true)
Divider().pOnly(bottom: 8)
else
8.heightBox,
],
content.pSymmetric(h: padding ?? 24),
],
),
).w(double.infinity),
backgroundColor: backgroundColor ?? Get.theme.cardColor,
barrierColor: barrierColor,
isDismissible: isDismissible ?? true,
persistent: persistent ?? true,
isScrollControlled: isScrolled ?? true,
enableDrag: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius ?? 16),
topRight: Radius.circular(radius ?? 16),
),
),
);
}