SimpleDropdown<T>.list constructor
SimpleDropdown<T>.list ({
- Key? key,
- required WidgetBuilder builder,
- required DropdownController<
T> controller, - bool enableListen = true,
- bool crossAxisConstrained = true,
- bool dismissible = true,
- bool enabled = true,
- required MenuItemBuilder<
T> itemBuilder, - IndexedWidgetBuilder? separatorBuilder,
- WidgetBuilder? loadingBuilder,
- WidgetBuilder? emptyListBuilder,
Implementation
SimpleDropdown.list({
super.key,
required this.builder,
required this.controller,
this.menuConstraints,
this.menuDecoration,
this.enableListen = true,
this.menuPosition = const DropdownMenuPosition(),
this.crossAxisConstrained = true,
this.dismissible = true,
this.enabled = true,
/// The builder that will be used to build the items in the dropdown menu.
required MenuItemBuilder<T> itemBuilder,
/// The builder that will be used to build the separator in the dropdown menu.
/// it would use [LiveView.separated] internally to build the dropdown menu if provided.
IndexedWidgetBuilder? separatorBuilder,
/// The builder that will be used to build the loading indicator in the dropdown menu.
/// Default to a [CircularProgressIndicator] if not provided.
WidgetBuilder? loadingBuilder,
/// The builder that will be used to build the empty list indicator in the dropdown menu.
/// Default to Text("No items") if not provided.
WidgetBuilder? emptyListBuilder,
}) : delegate = ListViewMenuBuilderDelegate<T>(
itemBuilder: itemBuilder,
position: menuPosition,
separatorBuilder: separatorBuilder,
loadingBuilder: loadingBuilder,
emptyListBuilder: emptyListBuilder,
);