MultiSelectField<T>.bottomSheet constructor
const
MultiSelectField<T>.bottomSheet ({
- Key? key,
- required String label,
- List<
Choice< data()?,T> > - void onSelect()?,
- void onChanged()?,
- List<
Choice< ? defaultData,T> > - BottomSheetStyle? bottomSheetStyle,
- VoidCallback? onOpened,
- VoidCallback? onClosed,
- bool enabled,
- Widget? child,
- bool singleSelection,
- bool selectAllOption,
- bool useTextFilter,
- bool closeOnSelect,
- TextStyle? titleMenuStyle,
- TextStyle? itemMenuStyle,
- EdgeInsetsGeometry? titleMenuPadding,
Creates a MultiSelectField that opens a bottom sheet for selection.
Displays a trigger widget (customizable via child) that, when tapped,
opens a modal bottom sheet with the selection list.
Example:
MultiSelectField<String>.bottomSheet(
label: 'Categories',
data: () => categoryChoices,
onSelect: (selected, _) => updateCategories(selected),
)
Implementation
const factory MultiSelectField.bottomSheet({
Key? key,
required String label,
List<Choice<T>> Function()? data,
void Function(List<Choice<T>> choiceList, bool isFromDefaultData)? onSelect,
void Function(List<Choice<T>> selectedItems)? onChanged,
List<Choice<T>>? defaultData,
Widget? menuContent,
Widget? menuHeader,
Widget? menuFooter,
BottomSheetStyle? bottomSheetStyle,
VoidCallback? onOpened,
VoidCallback? onClosed,
bool enabled,
Widget? child,
bool singleSelection,
bool selectAllOption,
bool useTextFilter,
bool closeOnSelect,
TextStyle? titleMenuStyle,
TextStyle? itemMenuStyle,
EdgeInsetsGeometry? titleMenuPadding,
}) = BottomSheetMultiSelectField<T>;