showSafaehActionSheet<T> function
Future<T?>
showSafaehActionSheet<T>({
- required BuildContext context,
- required String title,
- required List<
SafaehAction< actions,T> > - Widget? header,
- SafaehTitleBuilder? titleBuilder,
- SafaehActionTileBuilder<
T> ? tileBuilder, - double railWidthOf(
- BuildContext context
- double? tabletBreakpoint,
- double? maxWidth,
- double? maxHeight,
- bool barrierDismissible = true,
- Duration? motion,
- Curve? enterCurve,
- Curve? exitCurve,
- SafaehTransition? fadeScale,
- SafaehTransition? slideUp,
- SafaehPhoneSheetPlacement phonePlacement = SafaehPhoneSheetPlacement.bottom,
- SafaehRouteOptions? route,
Action menu. Wide = dialog, phone = bottom sheet.
Implementation
Future<T?> showSafaehActionSheet<T>({
required BuildContext context,
required String title,
required List<SafaehAction<T>> actions,
Widget? header,
SafaehTitleBuilder? titleBuilder,
SafaehActionTileBuilder<T>? tileBuilder,
double Function(BuildContext context)? railWidthOf,
double? tabletBreakpoint,
double? maxWidth,
double? maxHeight,
bool barrierDismissible = true,
Duration? motion,
Curve? enterCurve,
Curve? exitCurve,
SafaehTransition? fadeScale,
SafaehTransition? slideUp,
SafaehPhoneSheetPlacement phonePlacement = SafaehPhoneSheetPlacement.bottom,
bool useRootNavigator = true,
SafaehRouteOptions? route,
}) {
final tokens = SafaehTheme.of(context);
final breakpoint = tabletBreakpoint ?? tokens.tabletBreakpoint;
return showSafaeh<T>(
context: context,
title: title,
titleBuilder: titleBuilder,
tabletBreakpoint: breakpoint,
maxWidth: maxWidth,
maxHeight: maxHeight ?? MediaQuery.sizeOf(context).height * 0.75,
barrierDismissible: barrierDismissible,
motion: motion,
enterCurve: enterCurve,
exitCurve: exitCurve,
railWidthOf: railWidthOf,
fadeScale: fadeScale,
slideUp: slideUp,
phonePlacement: phonePlacement,
useRootNavigator: useRootNavigator,
paintPhoneTitle: true,
route: route,
child: SafaehActionSheetBody<T>(
actions: actions,
header: header,
tileBuilder: tileBuilder,
),
);
}