select<T, V> static method

TFormField<V> select<T, V>(
  1. TFieldProp<V> prop,
  2. String? label, {
  3. String? tag,
  4. String? placeholder,
  5. String? helperText,
  6. bool isRequired = false,
  7. bool disabled = false,
  8. bool autoFocus = false,
  9. bool readOnly = false,
  10. TTextFieldTheme? theme,
  11. FocusNode? focusNode,
  12. VoidCallback? onTap,
  13. TextEditingController? textController,
  14. List<String? Function(V?)>? rules,
  15. List<T>? items,
  16. ItemTextAccessor<T>? itemText,
  17. ItemValueAccessor<T, V>? itemValue,
  18. ItemChildrenAccessor<T>? itemChildren,
  19. ItemKeyAccessor<T>? itemKey,
  20. bool multiLevel = false,
  21. int itemsPerPage = 10,
  22. TLoadListener<T>? onLoad,
  23. int searchDelay = 2500,
})

Implementation

static TFormField<V> select<T, V>(
  TFieldProp<V> prop,
  String? label, {
  String? tag,
  String? placeholder,
  String? helperText,
  bool isRequired = false,
  bool disabled = false,
  bool autoFocus = false,
  bool readOnly = false,
  TTextFieldTheme? theme,
  FocusNode? focusNode,
  VoidCallback? onTap,
  TextEditingController? textController,
  List<String? Function(V?)>? rules,
  List<T>? items,
  ItemTextAccessor<T>? itemText,
  ItemValueAccessor<T, V>? itemValue,
  ItemChildrenAccessor<T>? itemChildren,
  ItemKeyAccessor<T>? itemKey,
  bool multiLevel = false,
  int itemsPerPage = 10,
  TLoadListener<T>? onLoad,
  int searchDelay = 2500,
}) {
  return TFormField<V>(
    prop: prop,
    builder: (onValueChanged) => TSelect(
      label: label,
      tag: tag,
      placeholder: placeholder,
      helperText: helperText,
      isRequired: isRequired,
      disabled: disabled,
      autoFocus: autoFocus,
      readOnly: readOnly,
      theme: theme,
      focusNode: focusNode,
      onTap: onTap,
      textController: textController,
      rules: rules,
      items: items,
      itemText: itemText,
      itemValue: itemValue,
      itemChildren: itemChildren,
      itemKey: itemKey,
      multiLevel: multiLevel,
      itemsPerPage: itemsPerPage,
      onLoad: onLoad,
      searchDelay: searchDelay,
      value: prop.value,
      valueNotifier: prop.valueNotifier,
      onValueChanged: onValueChanged,
    ),
  );
}