flutter_form_builder icon indicating copy to clipboard operation
flutter_form_builder copied to clipboard

How can I handle the default selected item in FormBuilderDropdown?

Open SergeBerwert opened this issue 2 years ago • 2 comments

Environment

"7.6.0"

Describe your question

How can I handle the default selected item in FormBuilderDropdown? When the date contains a value that is not in the items list or the value is null is there a way to set a default value instead of getting an error?

SergeBerwert avatar Sep 15 '22 21:09 SergeBerwert

That's how Flutter's DropdownField works.

Also, remember that the 'error' is a failed assertion and happens only in debug mode. In release mode, the default value becomes null if the value set is not in the list.

danvick avatar Sep 16 '22 16:09 danvick

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 18 '22 02:10 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Oct 25 '22 02:10 github-actions[bot]