SearchDropDown<T> class

This creates a single selection dropdown widget.

Inheritance

Constructors

SearchDropDown({Key? key, required List<ValueItem<T>> listItems, bool addMode = true, dynamic onAddItem(ValueItem<T>)?, ValueItem<T> newValueItem(String input)?, bool deleteMode = true, dynamic onDeleteItem(ValueItem<T>)?, required dynamic updateSelectedItem(ValueItem<T>?), int sortType = 0, bool confirmDelete = false, SimpleSearchbarSettings searchBarSettings = defaultSearchBarSettings, SimpleOverlaySettings overlayListSettings = defaultOverlaySettings, ValueItem<T>? selectedItem, DialogSettings? deleteDialogSettings, bool verifyInputItem(ValueItem<T>)?, DialogSettings? verifyDialogSettings, Widget? addAditionalWidget, Widget? defaultAditionalWidget, bool enabled = true})
const

Properties

addAditionalWidget Widget?
A custom aditional widget to be inserted on the add item cell between the text and the create button.
final
addMode bool
Allow the user to add items to the list.
final
confirmDelete bool
Force the user to confirm delete
final
defaultAditionalWidget Widget?
A custom aditional widget to be inserted on the default item cell between the text and the delete button.
final
deleteDialogSettings DialogSettings?
Visual delete dialog settings
final
deleteMode bool
Allow the user to delete items of the list.
final
enabled bool
A parameter to define if the widget is enabled or disabled (default: true).
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listItems List<ValueItem<T>>
List of the items to be presented on the dropdown.
final
newValueItem → (ValueItem<T> Function(String input)?)
Function that defines how the user input transforms into a new ValueItem on the list.
final
onAddItem → (dynamic Function(ValueItem<T>)?)
Function to be executed after the item was added.
final
onDeleteItem → (dynamic Function(ValueItem<T>)?)
Function to be executed after the item was deleted.
final
overlayListSettings SimpleOverlaySettings
The settings for the overlay list of items.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBarSettings SimpleSearchbarSettings
The SearchBarSettings.
final
selectedItem ValueItem<T>?
The initial selected value of the dropdown.
final
sortType int
The way the items should be sorted.
final
updateSelectedItem → dynamic Function(ValueItem<T>?)
The function to be executed after the user selects a value.
final
verifyDialogSettings DialogSettings?
Visual verify dialog settings
final
verifyInputItem → (bool Function(ValueItem<T>)?)
Function to check if the item added is valid or not.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SearchDropDown<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}) 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