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. TTagsFieldTheme? theme,
  10. VoidCallback? onTap,
  11. FocusNode? focusNode,
  12. TTagsController? textController,
  13. List<V>? value,
  14. ValueNotifier<List<V>?>? valueNotifier,
  15. ValueChanged<List<V>?>? onValueChanged,
  16. List<String? Function(List<V>?)>? rules,
  17. Duration? validationDebounce,
  18. TListTheme? listTheme,
  19. List<T>? items,
  20. int? itemsPerPage = 6,
  21. String? search,
  22. int? searchDelay,
  23. TLoadListener<T>? onLoad,
  24. TListController<T, K>? controller,
  25. VoidCallback? onShow,
  26. VoidCallback? onHide,
  27. bool filterable = true,
  28. ItemTextAccessor<T>? itemSubText,
  29. ItemTextAccessor<T>? itemImageUrl,
  30. ItemChildrenAccessor<T>? itemChildren,
  31. TListCardTheme? cardTheme,
  32. ItemValueAccessor<T, V>? itemValue,
  33. ItemTextAccessor<T>? itemText,
  34. ItemKeyAccessor<T, K>? itemKey,
  35. bool? readOnly,
  36. 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.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);