TMultiSelect<T, V, K> constructor

const TMultiSelect<T, V, K>({
  1. Key? key,
  2. String? label,
  3. String? tag,
  4. String? helperText,
  5. String? placeholder,
  6. bool isRequired = false,
  7. bool disabled = false,
  8. bool autoFocus = false,
  9. bool clearable = false,
  10. TTagsFieldTheme? theme,
  11. VoidCallback? onTap,
  12. FocusNode? focusNode,
  13. TTagsController? textController,
  14. List<V>? value,
  15. ValueNotifier<List<V>?>? valueNotifier,
  16. ValueChanged<List<V>?>? onValueChanged,
  17. List<String? Function(List<V>?)>? rules,
  18. Duration? validationDebounce,
  19. TListTheme? listTheme,
  20. List<T>? items,
  21. int? itemsPerPage = 6,
  22. String? search,
  23. int? searchDelay,
  24. TLoadListener<T>? onLoad,
  25. TListController<T, K>? controller,
  26. VoidCallback? onShow,
  27. VoidCallback? onHide,
  28. bool filterable = true,
  29. ItemTextAccessor<T>? itemSubText,
  30. ItemTextAccessor<T>? itemImageUrl,
  31. ItemChildrenAccessor<T>? itemChildren,
  32. TListCardTheme? cardTheme,
  33. ItemValueAccessor<T, V>? itemValue,
  34. ItemTextAccessor<T>? itemText,
  35. ItemKeyAccessor<T, K>? itemKey,
  36. bool? readOnly,
  37. ValueChanged<String>? onInputChanged,
})

Implementation

const TMultiSelect({
  super.key,
  this.label,
  this.tag,
  this.helperText,
  this.placeholder,
  this.isRequired = false,
  this.disabled = false,
  this.autoFocus = false,
  this.clearable = false,
  this.theme,
  this.onTap,
  this.focusNode,
  this.textController,
  this.value,
  this.valueNotifier,
  this.onValueChanged,
  this.rules,
  this.validationDebounce,
  // List
  this.listTheme,
  this.items,
  this.itemsPerPage = 6,
  this.search,
  this.searchDelay,
  this.onLoad,
  this.controller,
  // Popup
  this.onShow,
  this.onHide,
  // Select
  this.filterable = true,
  this.itemSubText,
  this.itemImageUrl,
  this.itemChildren,
  this.cardTheme,
  this.itemValue,
  ItemTextAccessor<T>? itemText,
  ItemKeyAccessor<T, K>? itemKey,
  bool? readOnly,
  this.onInputChanged,
})  : readOnly = readOnly ?? !filterable,
      itemText = itemText ?? _defaultItemText,
      assert(
        !(itemKey != null && itemValue != null),
        'You cannot provide both `itemKey` and `itemValue`. '
        '`itemValue` will be used as key if provided.',
      ),
      itemKey = itemKey ?? (itemValue != null ? itemValue as ItemKeyAccessor<T, K> : null);