DropdownFlutter<T> class

A dropdown with local or remote search, form validation, and selection controllers.

Inheritance

Constructors

Creates a single-select dropdown from a local list.
Creates a multi-select dropdown from a local list.
Creates a multi-select dropdown with local list filtering.
Creates a multi-select dropdown that fetches nonempty search queries.
const
Creates a single-select dropdown with local list filtering.
Creates a single-select dropdown that fetches nonempty search queries.
const

Properties

animationCurve → Curve?
Open/close animation curve.
final
animationDuration → Duration?
Open/close animation duration.
final
canCloseOutsideBounds → bool
Can close DropdownFlutter overlay by tapping outside. Here "outside" covers the entire screen.
final
clearAllText → String?
Label for the clear-all action. Defaults to "Clear all".
final
closedHeaderPadding → EdgeInsets?
Padding for DropdownFlutter header (closed state).
final
closeDropDownOnClearFilterSearch → bool
DropdownFlutter will close on tap Clear filter for all search and searchRequest constructors
final
controller → SingleSelectController<T?>?
The controller that can be used to control DropdownFlutter selected item.
final
decoration → CustomDropdownDecoration?
DropdownFlutter decoration. Contain sub-decorations SearchFieldDecoration, ListItemDecoration and ScrollbarThemeData.
final
disabledDecoration → CustomDropdownDisabledDecoration?
DropdownFlutter disabled decoration.
final
doneText → String?
Label for the multi-select completion action. Defaults to "Done".
final
enabled → bool
DropdownFlutter enabled/disabled state. If disabled, you can not open the dropdown.
final
enableHapticFeedback → bool
Provide haptic feedback when the dropdown opens and on item selection.
final
enableKeyboardNavigation → bool
Enable arrow-key navigation, Enter to select and Escape to close.
final
excludeSelected → bool
Hide the selected item from the items list.
final
expandedHeaderPadding → EdgeInsets?
Padding for DropdownFlutter header (opened/expanded state).
final
futureRequest → Future<List<T>> Function(String)?
The asynchronous computation from which the items list returns.
final
futureRequestDelay → Duration?
Duration after which the futureRequest is to be executed.
final
groupBy → String Function(T item)?
Groups items under section headers using the returned group label.
final
groupHeaderBuilder → DropdownGroupHeaderBuilder?
Builds a custom header for a group produced by groupBy.
final
hashCode → int
The hash code for this object.
no setterinherited
headerBuilder → DropdownHeaderBuilder<T>?
The headerBuilder that will be used to build DropdownFlutter header field.
final
headerListBuilder → DropdownHeaderListBuilder<T>?
The headerListBuilder that will be used to build DropdownFlutter header field.
final
hideSelectedFieldWhenExpanded → bool
Hide the header field when DropdownFlutter overlay opened/expanded.
final
highlightMatchedText → bool
Highlight the matched substring within search results.
final
hintBuilder → DropdownHintBuilder?
The hintBuilder that will be used to build DropdownFlutter hint of header field.
final
hintText → String?
Text that suggests what sort of data the dropdown represents.
final
initialItem → T?
Initial selected item from the list of items.
final
initialItems → List<T>?
Initial selected items from the list of items.
final
initialRecentItems → List<T>?
Seeds the recently-selected section.
final
items → List<T>?
The list of items user can select.
final
itemsListPadding → EdgeInsets?
Padding for DropdownFlutter items list.
final
itemsScrollController → ScrollController?
Scroll controller to access items list scroll behavior.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listItemBuilder → DropdownListItemBuilder<T>?
The listItemBuilder that will be used to build item on demand.
final
listItemHeight → double?
Fixed height for each item row in the opened dropdown.
final
listItemPadding → EdgeInsets?
Padding for DropdownFlutter each list item.
final
listValidator → String? Function(List<T>)?
A method that validates the selected items. Returns an error string to display as per the validation, or null otherwise.
final
maxlines → int
Text maxlines for header and list item text.
final
multiSelectController → MultiSelectController<T>?
The multiSelectController that can be used to control DropdownFlutter.multiSelect selected items.
final
noResultFoundBuilder → DropdownGroupHeaderBuilder?
The noResultFoundBuilder that will be used to build area when there's no search results match.
final
noResultFoundText → String?
Text that notify there's no search results match.
final
onChanged → dynamic Function(T?)?
Called when the item of the DropdownFlutter should change.
final
onListChanged → dynamic Function(List<T>)?
Called when the list of items of the DropdownFlutter should change.
final
onRecentItemsChanged → ValueChanged<List<T>>?
Called whenever the recently-selected list changes.
final
overlayController → OverlayPortalController?
The overlayController allows you to explicitly handle the DropdownFlutter overlay states (show/hide).
final
overlayHeight → double?
DropdownFlutter opened/expanded area height. Maximum menu height, further constrained to the available viewport.
final
recentSelectionsMaxCount → int
Maximum number of recently-selected items pinned at the top of the list.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
searchHintText → String?
Text that suggests what to search in the search field.
final
searchRequestErrorBuilder → DropdownSearchErrorBuilder?
Builds the request failure state. Call retry to repeat the current query. By default, shows a short error message and a Retry button.
final
searchRequestLoadingIndicator → Widget?
Widget to display while search request loading.
final
selectAllText → String?
Label for the select-all action. Defaults to "Select all".
final
showMultiSelectFooter → bool
Show a selection count and Done action in multi-select menus.
final
showSelectAll → bool
Show a "select all / clear all" action row.
final
validateOnChange → bool
Enable the validation listener on item change. This implies to validator everytime when the item change.
final
validator → String? Function(T?)?
A method that validates the selected item. Returns an error string to display as per the validation, or null otherwise.
final
visibility → dynamic Function(bool)?
Callback for dropdown visibility.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<DropdownFlutter<T>>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited