AutoSuggestBox<T>.form constructor

const AutoSuggestBox<T>.form({
  1. Key? key,
  2. required List<AutoSuggestBoxItem<T>> items,
  3. TextEditingController? controller,
  4. OnChangeAutoSuggestBox? onChanged,
  5. ValueChanged<AutoSuggestBoxItem<T>>? onSelected,
  6. ValueChanged<bool>? onOverlayVisibilityChanged,
  7. AutoSuggestBoxItemBuilder? itemBuilder,
  8. WidgetBuilder? noResultsFoundBuilder,
  9. AutoSuggestBoxSorter<T>? sorter,
  10. Widget? leadingIcon,
  11. Widget? trailingIcon,
  12. bool clearButtonEnabled = true,
  13. String? placeholder,
  14. TextStyle? placeholderStyle,
  15. TextStyle? style,
  16. BoxDecoration? decoration,
  17. BoxDecoration? foregroundDecoration,
  18. Color? highlightColor,
  19. Color? unfocusedColor,
  20. Color? cursorColor,
  21. double? cursorHeight,
  22. Radius cursorRadius = const Radius.circular(2.0),
  23. double cursorWidth = 1.5,
  24. bool? showCursor,
  25. Brightness? keyboardAppearance,
  26. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  27. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  28. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  29. FormFieldValidator<String>? validator,
  30. AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
  31. TextInputAction? textInputAction,
  32. FocusNode? focusNode,
  33. bool autofocus = false,
  34. bool enableKeyboardControls = true,
  35. bool enabled = true,
  36. List<TextInputFormatter>? inputFormatters,
  37. double maxPopupHeight = kAutoSuggestBoxPopupMaxHeight,
})

Creates a fluent-styled auto suggest form box.

Implementation

const AutoSuggestBox.form({
  super.key,
  required this.items,
  this.controller,
  this.onChanged,
  this.onSelected,
  this.onOverlayVisibilityChanged,
  this.itemBuilder,
  this.noResultsFoundBuilder,
  this.sorter,
  this.leadingIcon,
  this.trailingIcon,
  this.clearButtonEnabled = true,
  this.placeholder,
  this.placeholderStyle,
  this.style,
  this.decoration,
  this.foregroundDecoration,
  this.highlightColor,
  this.unfocusedColor,
  this.cursorColor,
  this.cursorHeight,
  this.cursorRadius = const Radius.circular(2.0),
  this.cursorWidth = 1.5,
  this.showCursor,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.selectionHeightStyle = ui.BoxHeightStyle.tight,
  this.selectionWidthStyle = ui.BoxWidthStyle.tight,
  this.validator,
  this.autovalidateMode = AutovalidateMode.disabled,
  this.textInputAction,
  this.focusNode,
  this.autofocus = false,
  this.enableKeyboardControls = true,
  this.enabled = true,
  this.inputFormatters,
  this.maxPopupHeight = kAutoSuggestBoxPopupMaxHeight,
});