selectedItemBuilder property Null safety
final
A builder to customize the dropdown buttons corresponding to the DropdownMenuItems in items.
When a DropdownMenuItem is selected, the widget that will be displayed from the list corresponds to the DropdownMenuItem of the same index in items.
This sample shows a
DropdownButton
with a button with Text that
corresponds to but is unique from DropdownMenuItem.
To create a local project with this code sample, run:
flutter create --sample=material.DropdownButton.selectedItemBuilder.1 mysample
flutter create --sample=material.DropdownButton.selectedItemBuilder.1 mysample
If this callback is null, the DropdownMenuItem from items that matches value will be displayed.
Implementation
final DropdownButtonBuilder? selectedItemBuilder;