selectedItemBuilder property
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
link
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
If this callback is null, the DropdownMenuItem from items that matches value will be displayed.
The list of widgets returned by this builder must be exactly the same length as the items list.
Implementation
final DropdownButtonBuilder? selectedItemBuilder;