showAdaptiveActionSheet<T> function
- required BuildContext context,
- Widget? title,
- required List<
BottomSheetAction> actions, - CancelAction? cancelAction,
- Color? barrierColor,
- Color? bottomSheetColor,
- double? androidBorderRadius,
- bool isDismissible = true,
A action bottom sheet that adapts to the platform (Android/iOS).
actions
The Actions list that will appear on the ActionSheet. (required)
cancelAction
The optional cancel button that show under the
actions (grouped separately on iOS).
title
The optional title widget that show above the actions.
androidBorderRadius
The android border radius.
The optional backgroundColor
and barrierColor
can be passed in to
customize the appearance and behavior of persistent bottom sheets.
The optional isDismissible
can be passed to set barrierDismissible of showCupertinoModalPopup
and isDismissible of showModalBottomSheet (Default true as for both implementations)
The optional useRootNavigator
can be passed to set useRootNavigator of showCupertinoModalPopup
(Default true) and useRootNavigator of showModalBottomSheet (Default false)
Implementation
Future<T?> showAdaptiveActionSheet<T>({
required BuildContext context,
Widget? title,
required List<BottomSheetAction> actions,
CancelAction? cancelAction,
Color? barrierColor,
Color? bottomSheetColor,
double? androidBorderRadius,
bool isDismissible = true,
bool? useRootNavigator,
}) async {
assert(
barrierColor != Colors.transparent,
'The barrier color cannot be transparent.',
);
return _show<T>(
context,
title,
actions,
cancelAction,
barrierColor,
bottomSheetColor,
androidBorderRadius,
isDismissible: isDismissible,
useRootNavigator: useRootNavigator,
);
}