MultiSelectorDialogField<V> constructor
MultiSelectorDialogField<V> ({
- Key? key,
- required List<
MultiSelectorItem< items,V> > - required ValueChanged<
List< onConfirm,V> > - Widget? title,
- Text? buttonText,
- Icon? buttonIcon,
- InputDecoration? decoration,
- bool isDense = false,
- Color? selectedColor,
- bool searchable = false,
- Text? confirmText,
- Text? cancelText,
- String? searchHint,
- Color colorBuilder(
- V
- List<
V> initialValue = const [], - bool separateSelectedItems = false,
- ShapeBorder? dialogShape,
- ShapeBorder? fieldShape,
- Widget buttonBuilder(
- BuildContext context
- bool showSelectAll = false,
- String? selectAllText,
- String? deselectAllText,
- double? dialogHeight,
- double? dialogWidth,
- Color? barrierColor,
- Color? backgroundColor,
- Color? unselectedColor,
- Color? checkColor,
- TextStyle? itemsTextStyle,
- TextStyle? selectedItemsTextStyle,
- TextStyle? searchTextStyle,
- TextStyle? searchHintStyle,
- Icon? searchIcon,
- Icon? closeSearchIcon,
- double dialogElevation = 8.0,
- EdgeInsets? dialogPadding,
- ValueChanged<
List< ? onSelectionChanged,V> > - bool useChipsForSelection = false,
- FormFieldSetter<
List< ? onSaved,V> > - FormFieldValidator<
List< ? validator,V> > - AutovalidateMode? autovalidateMode = AutovalidateMode.disabled,
Creates a MultiSelectorDialogField
Implementation
MultiSelectorDialogField({
super.key,
required this.items,
required this.onConfirm,
this.title,
this.buttonText,
this.buttonIcon,
this.decoration,
this.isDense = false,
this.selectedColor,
this.searchable = false,
this.confirmText,
this.cancelText,
this.searchHint,
this.colorBuilder,
this.initialValue = const [],
this.separateSelectedItems = false,
this.dialogShape,
this.fieldShape,
this.buttonBuilder,
this.showSelectAll = false,
this.selectAllText,
this.deselectAllText,
this.dialogHeight,
this.dialogWidth,
this.barrierColor,
this.backgroundColor,
this.unselectedColor,
this.checkColor,
this.itemsTextStyle,
this.selectedItemsTextStyle,
this.searchTextStyle,
this.searchHintStyle,
this.searchIcon,
this.closeSearchIcon,
this.dialogElevation = 8.0,
this.dialogPadding,
this.onSelectionChanged,
this.useChipsForSelection = false,
super.onSaved,
super.validator,
super.autovalidateMode = AutovalidateMode.disabled,
}) : super(
initialValue: initialValue,
builder: (FormFieldState<List<V>> state) {
return _MultiSelectorDialogFieldView<V>(
state: state,
items: items,
onConfirm: onConfirm,
title: title,
buttonText: buttonText,
buttonIcon: buttonIcon,
decoration: decoration,
isDense: isDense,
initialValue: initialValue,
selectedColor: selectedColor,
searchable: searchable,
confirmText: confirmText,
cancelText: cancelText,
searchHint: searchHint,
colorBuilder: colorBuilder,
separateSelectedItems: separateSelectedItems,
dialogShape: dialogShape,
fieldShape: fieldShape,
buttonBuilder: buttonBuilder,
showSelectAll: showSelectAll,
selectAllText: selectAllText,
deselectAllText: deselectAllText,
dialogHeight: dialogHeight,
dialogWidth: dialogWidth,
barrierColor: barrierColor,
backgroundColor: backgroundColor,
unselectedColor: unselectedColor,
checkColor: checkColor,
itemsTextStyle: itemsTextStyle,
selectedItemsTextStyle: selectedItemsTextStyle,
searchTextStyle: searchTextStyle,
searchHintStyle: searchHintStyle,
searchIcon: searchIcon,
closeSearchIcon: closeSearchIcon,
dialogElevation: dialogElevation,
dialogPadding: dialogPadding,
onSelectionChanged: onSelectionChanged,
useChipsForSelection: useChipsForSelection,
);
},
);