showWithCustomHeaderWidget static method

Future<void> showWithCustomHeaderWidget({
  1. required dynamic context,
  2. required Widget headerBuilder(
    1. BuildContext
    ),
  3. required Widget contentBuilder(
    1. BuildContext
    ),
  4. List<CNSheetDetent> detents = const [CNSheetDetent.large],
  5. bool prefersGrabberVisible = true,
  6. bool isModal = false,
  7. bool prefersEdgeAttachedInCompactHeight = false,
  8. bool widthFollowsPreferredContentSizeWhenEdgeAttached = false,
  9. double? preferredCornerRadius,
  10. double? headerHeight,
  11. dynamic headerBackgroundColor,
  12. bool showHeaderDivider = true,
  13. dynamic headerDividerColor,
  14. VoidCallback? onClose,
})

Shows a native sheet with custom Flutter widget header and content (delegates to CNNativeSheet)

Implementation

static Future<void> showWithCustomHeaderWidget({
  required context,
  required Widget Function(BuildContext) headerBuilder,
  required Widget Function(BuildContext) contentBuilder,
  List<CNSheetDetent> detents = const [CNSheetDetent.large],
  bool prefersGrabberVisible = true,
  bool isModal = false,
  bool prefersEdgeAttachedInCompactHeight = false,
  bool widthFollowsPreferredContentSizeWhenEdgeAttached = false,
  double? preferredCornerRadius,
  double? headerHeight,
  headerBackgroundColor,
  bool showHeaderDivider = true,
  headerDividerColor,
  VoidCallback? onClose,
}) {
  return CNNativeSheet.showWithCustomHeaderWidget(
    context: context,
    headerBuilder: headerBuilder,
    contentBuilder: contentBuilder,
    detents: detents,
    prefersGrabberVisible: prefersGrabberVisible,
    isModal: isModal,
    prefersEdgeAttachedInCompactHeight: prefersEdgeAttachedInCompactHeight,
    widthFollowsPreferredContentSizeWhenEdgeAttached:
        widthFollowsPreferredContentSizeWhenEdgeAttached,
    preferredCornerRadius: preferredCornerRadius,
    headerHeight: headerHeight,
    headerBackgroundColor: headerBackgroundColor,
    showHeaderDivider: showHeaderDivider,
    headerDividerColor: headerDividerColor,
    onClose: onClose,
  );
}