MultiSelectField<T>.bottomSheet constructor

const MultiSelectField<T>.bottomSheet({
  1. Key? key,
  2. required String label,
  3. List<Choice<T>> data()?,
  4. void onSelect(
    1. List<Choice<T>> choiceList,
    2. bool isFromDefaultData
    )?,
  5. void onChanged(
    1. List<Choice<T>> selectedItems
    )?,
  6. List<Choice<T>>? defaultData,
  7. Widget? menuContent,
  8. Widget? menuHeader,
  9. Widget? menuFooter,
  10. BottomSheetStyle? bottomSheetStyle,
  11. VoidCallback? onOpened,
  12. VoidCallback? onClosed,
  13. bool enabled,
  14. Widget? child,
  15. bool singleSelection,
  16. bool selectAllOption,
  17. bool useTextFilter,
  18. bool closeOnSelect,
  19. TextStyle? titleMenuStyle,
  20. TextStyle? itemMenuStyle,
  21. 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>;