showWithCustomHeader static method
Future<int?>
showWithCustomHeader({
- required dynamic context,
- required String title,
- String? message,
- List<
CNSheetItem> items = const [], - List<
CNSheetItemRow> itemRows = const [], - List<
CNSheetInlineActions> inlineActions = const [], - List<
CNSheetDetent> detents = const [CNSheetDetent.large], - bool prefersGrabberVisible = true,
- bool isModal = true,
- bool prefersEdgeAttachedInCompactHeight = false,
- bool widthFollowsPreferredContentSizeWhenEdgeAttached = false,
- double? preferredCornerRadius,
- double? headerTitleSize,
- dynamic headerTitleWeight,
- dynamic headerTitleColor,
- String headerTitleAlignment = 'left',
- String? subtitle,
- double? subtitleSize,
- dynamic subtitleColor,
- double? headerHeight,
- dynamic headerBackgroundColor,
- bool showHeaderDivider = true,
- dynamic headerDividerColor,
- String closeButtonPosition = 'trailing',
- String closeButtonIcon = 'xmark',
- double? closeButtonSize,
- dynamic closeButtonColor,
- dynamic itemBackgroundColor,
- dynamic itemTextColor,
- dynamic itemTintColor,
- void onInlineActionSelected()?,
- void onItemSelected(
- int index
- void onItemRowSelected()?,
Shows a sheet with custom header (delegates to CNNativeSheet)
Implementation
static Future<int?> showWithCustomHeader({
required context,
required String title,
String? message,
List<CNSheetItem> items = const [],
List<CNSheetItemRow> itemRows = const [],
List<CNSheetInlineActions> inlineActions = const [],
List<CNSheetDetent> detents = const [CNSheetDetent.large],
bool prefersGrabberVisible = true,
bool isModal = true,
bool prefersEdgeAttachedInCompactHeight = false,
bool widthFollowsPreferredContentSizeWhenEdgeAttached = false,
double? preferredCornerRadius,
double? headerTitleSize,
headerTitleWeight,
headerTitleColor,
String headerTitleAlignment = 'left',
String? subtitle,
double? subtitleSize,
subtitleColor,
double? headerHeight,
headerBackgroundColor,
bool showHeaderDivider = true,
headerDividerColor,
String closeButtonPosition = 'trailing',
String closeButtonIcon = 'xmark',
double? closeButtonSize,
closeButtonColor,
itemBackgroundColor,
itemTextColor,
itemTintColor,
void Function(int rowIndex, int actionIndex)? onInlineActionSelected,
void Function(int index)? onItemSelected,
void Function(int rowIndex, int itemIndex)? onItemRowSelected,
}) {
return CNNativeSheet.showWithCustomHeader(
context: context,
title: title,
message: message,
items: items,
itemRows: itemRows,
inlineActions: inlineActions,
detents: detents,
prefersGrabberVisible: prefersGrabberVisible,
isModal: isModal,
prefersEdgeAttachedInCompactHeight: prefersEdgeAttachedInCompactHeight,
widthFollowsPreferredContentSizeWhenEdgeAttached:
widthFollowsPreferredContentSizeWhenEdgeAttached,
preferredCornerRadius: preferredCornerRadius,
headerTitleSize: headerTitleSize,
headerTitleWeight: headerTitleWeight,
headerTitleColor: headerTitleColor,
headerTitleAlignment: headerTitleAlignment,
subtitle: subtitle,
subtitleSize: subtitleSize,
subtitleColor: subtitleColor,
headerHeight: headerHeight,
headerBackgroundColor: headerBackgroundColor,
showHeaderDivider: showHeaderDivider,
headerDividerColor: headerDividerColor,
closeButtonPosition: closeButtonPosition,
closeButtonIcon: closeButtonIcon,
closeButtonSize: closeButtonSize,
closeButtonColor: closeButtonColor,
itemBackgroundColor: itemBackgroundColor,
itemTextColor: itemTextColor,
itemTintColor: itemTintColor,
onInlineActionSelected: onInlineActionSelected,
onItemSelected: onItemSelected,
onItemRowSelected: onItemRowSelected,
);
}