SelectField<T> constructor
const
SelectField<T> ({
- Key? key,
- required List<
Option< options,T> > - Option<
T> ? initialOption, - void onTextChanged(
- String value
- void onOptionSelected(
- Option<
T> option
- Option<
- TextEditingController? textController,
- FocusNode? focusNode,
- void onTap()?,
- void onTapOutside()?,
- String? hint,
- InputDecoration? inputDecoration,
- TextStyle? inputStyle,
- TextAlign textAlign = TextAlign.start,
- IconBuilder? prefixIconBuilder,
- IconBuilder? suffixIconBuilder,
- Widget optionBuilder(
- BuildContext context,
- Option<
T> option, - bool isSelected,
- void onOptionSelected(
- Option<
T> option
- Option<
- SearchOptions<
T> ? searchOptions, - String? restorationId,
- StrutStyle? strutStyle,
- TextDirection? textDirection,
- TextAlignVertical? textAlignVertical,
- int maxLines = 1,
- bool? enabled,
- void onSaved(
- String? value
- String? validator(
- String? value
Implementation
const SelectField({
Key? key,
required this.options,
this.initialOption,
this.onTextChanged,
this.onOptionSelected,
this.textController,
this.menuController,
this.focusNode,
this.onTap,
this.onTapOutside,
this.hint,
this.inputDecoration,
this.inputStyle,
this.menuPosition = MenuPosition.below,
this.menuDecoration,
this.textAlign = TextAlign.start,
this.prefixIconBuilder,
this.suffixIconBuilder,
this.optionBuilder,
this.searchOptions,
this.restorationId,
this.strutStyle,
this.textDirection,
this.textAlignVertical,
this.maxLines = 1,
this.enabled,
this.onSaved,
this.validator,
}) : super(key: key);