MultiSelectBottomSheetField<V> constructor
MultiSelectBottomSheetField<V> ({
- required List<
MultiSelectItem< items,V> > - required void onConfirm(
- List<
V>
- List<
- Widget? title,
- Text? buttonText,
- Icon? buttonIcon,
- MultiSelectListType? listType,
- BoxDecoration? decoration,
- void onSelectionChanged(
- List<
V>
- List<
- MultiSelectChipDisplay<
V> ? chipDisplay, - List<
V> initialValue = const [], - bool searchable = false,
- Text? confirmText,
- Text? cancelText,
- Color? selectedColor,
- double? initialChildSize,
- double? minChildSize,
- double? maxChildSize,
- ShapeBorder? shape,
- Color? barrierColor,
- String? searchHint,
- Color colorator(
- V
- Color? backgroundColor,
- Color? unselectedColor,
- Icon? searchIcon,
- Icon? closeSearchIcon,
- TextStyle? itemsTextStyle,
- TextStyle? searchTextStyle,
- TextStyle? searchHintStyle,
- TextStyle? selectedItemsTextStyle,
- bool separateSelectedItems = false,
- Color? checkColor,
- bool isDismissible = true,
- GlobalKey<
FormFieldState> ? key, - FormFieldSetter<
List< ? onSaved,V> > - FormFieldValidator<
List< ? validator,V> > - AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
Implementation
MultiSelectBottomSheetField({
required this.items,
required this.onConfirm,
this.title,
this.buttonText,
this.buttonIcon,
this.listType,
this.decoration,
this.onSelectionChanged,
this.chipDisplay,
this.initialValue = const [],
this.searchable = false,
this.confirmText,
this.cancelText,
this.selectedColor,
this.initialChildSize,
this.minChildSize,
this.maxChildSize,
this.shape,
this.barrierColor,
this.searchHint,
this.colorator,
this.backgroundColor,
this.unselectedColor,
this.searchIcon,
this.closeSearchIcon,
this.itemsTextStyle,
this.searchTextStyle,
this.searchHintStyle,
this.selectedItemsTextStyle,
this.separateSelectedItems = false,
this.checkColor,
this.isDismissible = true,
this.key,
this.onSaved,
this.validator,
this.autovalidateMode = AutovalidateMode.disabled,
}) : super(
key: key,
onSaved: onSaved,
validator: validator,
autovalidateMode: autovalidateMode,
initialValue: initialValue,
builder: (FormFieldState<List<V>> state) {
_MultiSelectBottomSheetFieldView view =
_MultiSelectBottomSheetFieldView<V>(
items: items,
decoration: decoration,
unselectedColor: unselectedColor,
colorator: colorator,
itemsTextStyle: itemsTextStyle,
selectedItemsTextStyle: selectedItemsTextStyle,
backgroundColor: backgroundColor,
title: title,
initialValue: initialValue,
barrierColor: barrierColor,
buttonIcon: buttonIcon,
buttonText: buttonText,
cancelText: cancelText,
chipDisplay: chipDisplay,
closeSearchIcon: closeSearchIcon,
confirmText: confirmText,
initialChildSize: initialChildSize,
listType: listType,
maxChildSize: maxChildSize,
minChildSize: minChildSize,
onConfirm: onConfirm,
onSelectionChanged: onSelectionChanged,
searchHintStyle: searchHintStyle,
searchIcon: searchIcon,
searchHint: searchHint,
searchTextStyle: searchTextStyle,
searchable: searchable,
selectedColor: selectedColor,
separateSelectedItems: separateSelectedItems,
shape: shape,
checkColor: checkColor,
isDismissible: isDismissible,
);
return _MultiSelectBottomSheetFieldView<V?>._withState(
view as _MultiSelectBottomSheetFieldView<V?>, state);
});