show static method

Future<int?> show({
  1. required dynamic context,
  2. String? title,
  3. String? message,
  4. List<CNSheetItem> items = const [],
  5. List<CNSheetDetent> detents = const [CNSheetDetent.large],
  6. bool prefersGrabberVisible = true,
  7. bool isModal = true,
  8. bool prefersEdgeAttachedInCompactHeight = false,
  9. bool widthFollowsPreferredContentSizeWhenEdgeAttached = false,
  10. double? preferredCornerRadius,
  11. dynamic itemBackgroundColor,
  12. dynamic itemTextColor,
  13. dynamic itemTintColor,
  14. void onItemSelected(
    1. int index
    )?,
})

Shows a native sheet (delegates to CNNativeSheet)

Implementation

static Future<int?> show({
  required context,
  String? title,
  String? message,
  List<CNSheetItem> items = const [],
  List<CNSheetDetent> detents = const [CNSheetDetent.large],
  bool prefersGrabberVisible = true,
  bool isModal = true,
  bool prefersEdgeAttachedInCompactHeight = false,
  bool widthFollowsPreferredContentSizeWhenEdgeAttached = false,
  double? preferredCornerRadius,
  itemBackgroundColor,
  itemTextColor,
  itemTintColor,
  void Function(int index)? onItemSelected,
}) {
  return CNNativeSheet.show(
    context: context,
    title: title,
    message: message,
    items: items,
    detents: detents,
    prefersGrabberVisible: prefersGrabberVisible,
    isModal: isModal,
    prefersEdgeAttachedInCompactHeight: prefersEdgeAttachedInCompactHeight,
    widthFollowsPreferredContentSizeWhenEdgeAttached:
        widthFollowsPreferredContentSizeWhenEdgeAttached,
    preferredCornerRadius: preferredCornerRadius,
    itemBackgroundColor: itemBackgroundColor,
    itemTextColor: itemTextColor,
    itemTintColor: itemTintColor,
    onItemSelected: onItemSelected,
  );
}