PlexFormField.dropDown constructor
PlexFormField.dropDown({
- required String title,
- required dynamic onChange(
- dynamic value
- bool editable = true,
- String itemAsString(
- dynamic item
- List? items,
- Future<
List> ? itemsAsync, - bool onSearch(
- String,
- dynamic
- Widget dropdownWidget(
- dynamic
- Widget dropdownLeadingWidget(
- dynamic
- dynamic initialValue,
- bool showWhen(
- dynamic formState
Implementation
PlexFormField.dropDown({
required this.title,
required this.onChange,
this.editable = true,
this.itemAsString,
this.items,
this.itemsAsync,
this.onSearch,
this.dropdownWidget,
this.dropdownLeadingWidget,
this.initialValue,
this.showWhen,
}) {
if (items == null && itemsAsync == null) {
throw Exception("Items must be initialized or async item function must be initialized");
}
itemAsString ??= (item) => item.toString();
fieldType = TYPE_DROPDOWN;
}