showSafaehTilePicker<T> function
Future<T?>
showSafaehTilePicker<T>({
- required BuildContext context,
- required List<
SafaehTileOption< options,T> > - String? title,
- SafaehTitleBuilder? titleBuilder,
- Widget? header,
- T? selected,
- SafaehTileBuilder<
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,
- String? searchHint,
- String? searchEmptyLabel,
- SafaehTileSearchMatch<
T> ? searchMatches, - bool showTitleInBody = true,
- SafaehRouteOptions? route,
List-row single-select picker. Wide = dialog, phone = bottom sheet.
Implementation
Future<T?> showSafaehTilePicker<T>({
required BuildContext context,
required List<SafaehTileOption<T>> options,
String? title,
SafaehTitleBuilder? titleBuilder,
Widget? header,
T? selected,
SafaehTileBuilder<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,
String? searchHint,
String? searchEmptyLabel,
SafaehTileSearchMatch<T>? searchMatches,
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: SafaehTilePickerBody<T>(
title: title,
titleBuilder: titleBuilder,
header: header,
options: options,
selected: selected,
tileBuilder: tileBuilder,
tabletBreakpoint: breakpoint,
showTitleInBody: showTitleInBody,
searchHint: searchHint,
searchEmptyLabel: searchEmptyLabel,
searchMatches: searchMatches,
),
);
}