DropdownTextField<T> constructor
DropdownTextField<T> ({
- Key? key,
- required List<
DropdownItem> list, - bool autoCorrect = false,
- TextEditingController? controller,
- Widget emptyWidget = const SizedBox.shrink(),
- FocusNode? focusNode,
- bool hasOverlay = true,
- String labelText = "",
- String hintText = "",
- InputBorder border = const OutlineInputBorder(),
- InputDecoration? decoration,
- List<
TextInputFormatter> ? inputFormatters, - TextInputType? inputType,
- double itemHeight = 35.0,
- Color? marginColor,
- int maxSuggestionsInViewPort = 5,
- dynamic onSubmit()?,
- Offset? offset,
- dynamic onSuggestionTap()?,
- InputDecoration? searchInputDecoration,
- TextStyle? searchStyle,
- TextStyle? suggestionStyle,
- BoxDecoration? suggestionsDecoration,
- SuggestionDirection suggestionDirection = SuggestionDirection.down,
- Suggestion suggestionState = Suggestion.expand,
- BoxDecoration? suggestionItemDecoration,
- SuggestionAction? suggestionAction,
- TextInputAction? textInputAction,
- String? validator()?,
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));
}
}