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 [], - 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> > - 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.boxDecoration,
this.isDense = false,
this.selectedColor,
this.searchable = false,
this.confirmText,
this.cancelText,
this.searchHint,
this.colorBuilder,
this.initialValue = const [],
// this.separateSelectedItems = false,
// this.animationDuration = const Duration(milliseconds: 200),
this.dialogShape,
this.fieldShape,
this.buttonBuilder,
// this.dialogBuilder,
// this.showClearAll = false,
// this.clearAllText,
// this.clearAllIcon,
// this.onClearAll,
this.showSelectAll = false,
this.selectAllText,
this.deselectAllText,
// this.selectAllIcon,
// this.onSelectAll,
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.showItemsDivider = false,
// this.dividerColor,
// this.dialogBorderRadius,
this.dialogElevation = 8.0,
this.dialogPadding,
this.onSelectionChanged,
super.onSaved,
super.validator,
AutovalidateMode 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,
// boxDecoration: boxDecoration,
isDense: isDense,
initialValue: initialValue,
selectedColor: selectedColor,
searchable: searchable,
confirmText: confirmText,
cancelText: cancelText,
searchHint: searchHint,
colorBuilder: colorBuilder,
// separateSelectedItems: separateSelectedItems,
// animationDuration: animationDuration,
dialogShape: dialogShape,
fieldShape: fieldShape,
buttonBuilder: buttonBuilder,
// dialogBuilder: dialogBuilder,
// showClearAll: showClearAll,
// clearAllText: clearAllText,
// clearAllIcon: clearAllIcon,
// onClearAll: onClearAll,
showSelectAll: showSelectAll,
selectAllText: selectAllText,
deselectAllText: deselectAllText,
// selectAllIcon: selectAllIcon,
// onSelectAll: onSelectAll,
dialogHeight: dialogHeight,
dialogWidth: dialogWidth,
barrierColor: barrierColor,
backgroundColor: backgroundColor,
unselectedColor: unselectedColor,
checkColor: checkColor,
itemsTextStyle: itemsTextStyle,
selectedItemsTextStyle: selectedItemsTextStyle,
searchTextStyle: searchTextStyle,
searchHintStyle: searchHintStyle,
searchIcon: searchIcon,
closeSearchIcon: closeSearchIcon,
// showItemsDivider: showItemsDivider,
// dividerColor: dividerColor,
// dialogBorderRadius: dialogBorderRadius,
dialogElevation: dialogElevation,
dialogPadding: dialogPadding,
onSelectionChanged: onSelectionChanged,
);
},
);