DropdownTextField<T> constructor

DropdownTextField<T>({
  1. Key? key,
  2. required List<DropdownItem> list,
  3. bool autoCorrect = false,
  4. TextEditingController? controller,
  5. Widget emptyWidget = const SizedBox.shrink(),
  6. FocusNode? focusNode,
  7. bool hasOverlay = true,
  8. String labelText = "",
  9. String hintText = "",
  10. InputBorder border = const OutlineInputBorder(),
  11. InputDecoration? decoration,
  12. List<TextInputFormatter>? inputFormatters,
  13. TextInputType? inputType,
  14. double itemHeight = 35.0,
  15. Color? marginColor,
  16. int maxSuggestionsInViewPort = 5,
  17. dynamic onSubmit(
    1. String
    )?,
  18. Offset? offset,
  19. dynamic onSuggestionTap(
    1. String
    )?,
  20. InputDecoration? searchInputDecoration,
  21. TextStyle? searchStyle,
  22. TextStyle? suggestionStyle,
  23. BoxDecoration? suggestionsDecoration,
  24. SuggestionDirection suggestionDirection = SuggestionDirection.down,
  25. Suggestion suggestionState = Suggestion.expand,
  26. BoxDecoration? suggestionItemDecoration,
  27. SuggestionAction? suggestionAction,
  28. TextInputAction? textInputAction,
  29. String? validator(
    1. String?
    )?,
})

Implementation

DropdownTextField({
  super.key,
  required this.list,
  this.autoCorrect = false,
  this.controller,
  this.emptyWidget = const SizedBox.shrink(),
  this.focusNode,
  this.hasOverlay = true,
  this.labelText = "",
  this.hintText = "",
  this.border = const OutlineInputBorder(),
  this.decoration,
  this.inputFormatters,
  this.inputType,
  this.itemHeight = 35.0,
  this.marginColor,
  this.maxSuggestionsInViewPort = 5,
  this.onSubmit,
  this.offset,
  this.onSuggestionTap,
  this.searchInputDecoration,
  this.searchStyle,
  this.suggestionStyle,
  this.suggestionsDecoration,
  this.suggestionDirection = SuggestionDirection.down,
  this.suggestionState = Suggestion.expand,
  this.suggestionItemDecoration,
  this.suggestionAction,
  this.textInputAction,
  this.validator,
})  : initialValue = null {
  for (DropdownItem item in list) {
    suggestions.add(SearchFieldListItem(item.value));
  }
}