initialSelection property
final
The value used for an initial selection.
This property sets the initial value of the dropdown menu when the widget is first created. If the value matches one of the dropdownMenuEntries, the corresponding label will be displayed in the text field.
Setting this to null does not clear the text field.
To programmatically clear the text field, use a TextEditingController and call TextEditingController.clear on it.
Defaults to null.
See also:
- controller, which is required to programmatically clear or modify the text field content.
Implementation
final T? initialSelection;