MultiSelectorDialogField<V> constructor

MultiSelectorDialogField<V>({
  1. Key? key,
  2. required List<MultiSelectorItem<V>> items,
  3. required ValueChanged<List<V>> onConfirm,
  4. Widget? title,
  5. Text? buttonText,
  6. Icon? buttonIcon,
  7. InputDecoration? decoration,
  8. bool isDense = false,
  9. Color? selectedColor,
  10. bool searchable = false,
  11. Text? confirmText,
  12. Text? cancelText,
  13. String? searchHint,
  14. Color colorBuilder(
    1. V
    )?,
  15. List<V> initialValue = const [],
  16. bool separateSelectedItems = false,
  17. ShapeBorder? dialogShape,
  18. ShapeBorder? fieldShape,
  19. Widget buttonBuilder(
    1. BuildContext context
    )?,
  20. bool showSelectAll = false,
  21. String? selectAllText,
  22. String? deselectAllText,
  23. double? dialogHeight,
  24. double? dialogWidth,
  25. Color? barrierColor,
  26. Color? backgroundColor,
  27. Color? unselectedColor,
  28. Color? checkColor,
  29. TextStyle? itemsTextStyle,
  30. TextStyle? selectedItemsTextStyle,
  31. TextStyle? searchTextStyle,
  32. TextStyle? searchHintStyle,
  33. Icon? searchIcon,
  34. Icon? closeSearchIcon,
  35. double dialogElevation = 8.0,
  36. EdgeInsets? dialogPadding,
  37. ValueChanged<List<V>>? onSelectionChanged,
  38. bool useChipsForSelection = false,
  39. FormFieldSetter<List<V>>? onSaved,
  40. FormFieldValidator<List<V>>? validator,
  41. AutovalidateMode? autovalidateMode = AutovalidateMode.disabled,
})

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,
    );
  },
);