showActions<T> static method
Future<T?>
showActions<T>({
- required BuildContext context,
- required List<
AtomicBottomSheetAction< actions,T> > - String? title,
- String? message,
- String? cancelLabel,
- bool showCancelButton = true,
- bool isDismissible = true,
- bool enableDrag = true,
Implementation
static Future<T?> showActions<T>({
required BuildContext context,
required List<AtomicBottomSheetAction<T>> actions,
String? title,
String? message,
String? cancelLabel,
bool showCancelButton = true,
bool isDismissible = true,
bool enableDrag = true,
}) {
return show<T>(
context: context,
title: title,
isDismissible: isDismissible,
enableDrag: enableDrag,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
if (message != null) ...[
Padding(
padding: const EdgeInsets.symmetric(
horizontal: AtomicSpacing.lg,
vertical: AtomicSpacing.sm,
),
child: Text(
message,
style: AtomicTheme.of(context).typography.bodyMedium.copyWith(
color: AtomicTheme.of(context).colors.textSecondary,
),
textAlign: TextAlign.center,
),
),
const AtomicDivider(),
],
...actions.map((action) => _ActionItem(action: action)),
if (showCancelButton) ...[
const AtomicDivider(),
_ActionItem(
action: AtomicBottomSheetAction(
label: cancelLabel ?? 'Cancel',
onTap: () => Navigator.of(context).pop(),
isDestructive: false,
),
),
],
],
),
);
}