showSafaehPicker<T> function
Future<T?>
showSafaehPicker<T>({
- required BuildContext context,
- String? title,
- required List<
SafaehOption< options,T> > - T? selected,
- SafaehTitleBuilder? titleBuilder,
- 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,
- bool showTitleInBody = true,
- SafaehRouteOptions? route,
Compact single-select picker. Wide = dialog, phone = bottom sheet.
Implementation
Future<T?> showSafaehPicker<T>({
required BuildContext context,
String? title,
required List<SafaehOption<T>> options,
T? selected,
String? footer,
SafaehTitleBuilder? titleBuilder,
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,
bool showTitleInBody = 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,
barrierDismissible: barrierDismissible,
motion: motion,
enterCurve: enterCurve,
exitCurve: exitCurve,
railWidthOf: railWidthOf,
fadeScale: fadeScale,
slideUp: slideUp,
phonePlacement: phonePlacement,
useRootNavigator: useRootNavigator,
paintPhoneTitle: !showTitleInBody,
route: route,
child: SafaehOptionPickerBody<T>(
title: title,
titleBuilder: titleBuilder,
options: options,
selected: selected,
footer: footer,
tabletBreakpoint: breakpoint,
showTitleInBody: showTitleInBody,
),
);
}