MultiSelectDialogField<V> constructor
MultiSelectDialogField<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, - bool searchable = false,
- Text? confirmText,
- Text? cancelText,
- Color? barrierColor,
- Color? selectedColor,
- String? searchHint,
- double? dialogHeight,
- double? dialogWidth,
- 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,
- FormFieldSetter<
List< ? onSaved,V> > - FormFieldValidator<
List< ? validator,V> > - List<
V> initialValue = const [], - AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
- GlobalKey<
FormFieldState> ? key,
Implementation
MultiSelectDialogField({
required this.items,
required this.onConfirm,
this.title,
this.buttonText,
this.buttonIcon,
this.listType,
this.decoration,
this.onSelectionChanged,
this.chipDisplay,
this.searchable = false,
this.confirmText,
this.cancelText,
this.barrierColor,
this.selectedColor,
this.searchHint,
this.dialogHeight,
this.dialogWidth,
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.onSaved,
this.validator,
this.initialValue = const [],
this.autovalidateMode = AutovalidateMode.disabled,
this.key,
}) : super(
key: key,
onSaved: onSaved,
validator: validator,
autovalidateMode: autovalidateMode,
initialValue: initialValue,
builder: (FormFieldState<List<V>> state) {
_MultiSelectDialogFieldView<V> field =
_MultiSelectDialogFieldView<V>(
title: title,
items: items,
buttonText: buttonText,
buttonIcon: buttonIcon,
chipDisplay: chipDisplay,
decoration: decoration,
listType: listType,
onConfirm: onConfirm,
onSelectionChanged: onSelectionChanged,
initialValue: initialValue,
searchable: searchable,
confirmText: confirmText,
cancelText: cancelText,
barrierColor: barrierColor,
selectedColor: selectedColor,
searchHint: searchHint,
dialogHeight: dialogHeight,
dialogWidth: dialogWidth,
colorator: colorator,
backgroundColor: backgroundColor,
unselectedColor: unselectedColor,
searchIcon: searchIcon,
closeSearchIcon: closeSearchIcon,
itemsTextStyle: itemsTextStyle,
searchTextStyle: searchTextStyle,
searchHintStyle: searchHintStyle,
selectedItemsTextStyle: selectedItemsTextStyle,
separateSelectedItems: separateSelectedItems,
checkColor: checkColor,
isDismissible: isDismissible,
);
return _MultiSelectDialogFieldView<V>._withState(field, state);
});