SmartAutoSuggestView<T> constructor

const SmartAutoSuggestView<T>({
  1. Key? key,
  2. SmartAutoSuggestDataSource<T>? dataSource,
  3. @Deprecated('Use smartController instead') TextEditingController? controller,
  4. SmartAutoSuggestController<T>? smartController,
  5. OnChangeSmartAutoSuggestBox? onChanged,
  6. ValueChanged<SmartAutoSuggestItem<T>?>? onSelected,
  7. SmartAutoSuggestItemBuilder<T>? itemBuilder,
  8. WidgetOrNullBuilder? noResultsFoundBuilder,
  9. SmartAutoSuggestSorter<T>? sorter,
  10. TextStyle? style,
  11. InputDecoration? decoration,
  12. Color? cursorColor,
  13. double? cursorHeight,
  14. Radius cursorRadius = const Radius.circular(2.0),
  15. double cursorWidth = 1.5,
  16. bool? showCursor,
  17. Brightness? keyboardAppearance,
  18. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  19. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  20. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  21. TextInputAction? textInputAction,
  22. FocusNode? focusNode,
  23. bool autofocus = false,
  24. bool enableKeyboardControls = true,
  25. bool enabled = true,
  26. List<TextInputFormatter>? inputFormatters,
  27. double listMaxHeight = kSmartAutoSuggestBoxPopupMaxHeight,
  28. Widget waitingBuilder(
    1. BuildContext context
    )?,
  29. double tileHeight = kComboBoxItemHeight,
  30. TextInputType keyboardType = TextInputType.text,
  31. int? maxLength,
  32. bool showListWhenEmpty = true,
  33. SmartAutoSuggestTheme? theme,
})

Creates an inline auto-suggest view.

Implementation

const SmartAutoSuggestView({
  super.key,
  this.dataSource,
  @Deprecated('Use smartController instead') this.controller,
  this.smartController,
  this.onChanged,
  this.onSelected,
  this.itemBuilder,
  this.noResultsFoundBuilder,
  this.sorter,
  this.style,
  this.decoration,
  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.textInputAction,
  this.focusNode,
  this.autofocus = false,
  this.enableKeyboardControls = true,
  this.enabled = true,
  this.inputFormatters,
  this.listMaxHeight = kSmartAutoSuggestBoxPopupMaxHeight,
  this.waitingBuilder,
  this.tileHeight = kComboBoxItemHeight,
  this.keyboardType = TextInputType.text,
  this.maxLength,
  this.showListWhenEmpty = true,
  this.theme,
}) : autovalidateMode = AutovalidateMode.disabled,
     validator = null;