EditableComboBox<T> class

By default, a combo box lets the user select from a pre-defined list of options. However, there are cases where the list contains only a subset of valid values, and the user should be able to enter other values that aren't listed. To support this, you can make the combo box editable.

See also:

Inheritance
Available Extensions

Constructors

EditableComboBox({Key? key, bool autofocus = false, Color? popupColor, Widget? disabledPlaceholder, int elevation = 8, Color? focusColor, FocusNode? focusNode, Widget icon = const Icon(FluentIcons.chevron_down), Color? iconDisabledColor, Color? iconEnabledColor, double iconSize = 8.0, bool isExpanded = false, List<ComboBoxItem<T>>? items, ValueChanged<T?>? onChanged, VoidCallback? onTap, Widget? placeholder, ComboBoxBuilder? selectedItemBuilder, TextStyle? style, T? value, required SubmitEditableCombobox onFieldSubmitted, TextEditingController? textController, ValueChanged<String>? onTextChanged})
Creates an editable combo box.
const

Properties

autofocus bool
True if this widget will be selected as the initial focus when no other node in its scope is currently focused.
finalinherited
disabledPlaceholder Widget?
A preferred placeholder widget that is displayed when the combo box is disabled.
finalinherited
elevation int
The z-coordinate at which to place the menu when open.
finalinherited
focusColor Color?
The color for the button's Material when it has the input focus.
finalinherited
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
icon Widget
The widget to use for the comobo box button's icon.
finalinherited
iconDisabledColor Color?
The color of any Icon descendant of icon if this button is disabled, i.e. if onChanged is null.
finalinherited
iconEnabledColor Color?
The color of any Icon descendant of icon if this button is enabled, i.e. if onChanged is defined.
finalinherited
iconSize double
The size to use for the checkbox button's down arrow icon button.
finalinherited
isExpanded bool
Set the combo box's inner contents to horizontally fill its parent.
finalinherited
items List<ComboBoxItem<T>>?
The list of items the user can select.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<T?>?
Called when the user selects an item.
finalinherited
onFieldSubmitted SubmitEditableCombobox
Called when the text field text is submitted
final
onTap VoidCallback?
Called when the combo box button is tapped.
finalinherited
onTextChanged ValueChanged<String>?
Called when the text field text is changed.
final
placeholder Widget?
A placeholder widget that is displayed by the combo box button.
finalinherited
popupColor Color?
The background color of the combo box menu.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItemBuilder ComboBoxBuilder?
A builder to customize the combo box buttons corresponding to the ComboBoxItems in items.
finalinherited
style TextStyle?
The text style to use for text in the combo box button and the combo box menu that appears when you tap the button.
finalinherited
textController TextEditingController?
The text controller attached to the text field.
final
value → T?
The value of the currently selected ComboBoxItem.
finalinherited

Methods

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