ComicCombobox<T extends Object> class

An editable field that shows matching options in a menu.

Use displayStringForOption to provide labels or search to request suggestions asynchronously. A failed request can be retried from the menu. Arrow keys and the pointer move the active row. Enter or a tap selects it and returns focus to the field.

ComicCombobox<String>(label: 'City', options: const ['Lisbon', 'London', 'Lyon'], onSelected: pick)
Inheritance

Constructors

ComicCombobox({Key? key, ComicStyle? style, required List<T> options, String displayStringForOption(T option)?, ValueChanged<T>? onSelected, String? label, String? hint, String? helper, String? initialValue, int maxOptions = 6, bool isOptionEnabled(T option)?, FocusNode? focusNode, bool autofocus = false, DesignOptionSearch<T>? search, Duration? debounceDuration})
Creates an autocomplete field over options.
const

Properties

autofocus → bool
Whether the part asks for the focus when it first appears.
final
debounceDuration → Duration?
How long typing rests before search runs: one search a pause, not one a letter. Null runs it at every change.
final
displayStringForOption → String Function(T option)?
An option's words in the field and in the list; toString when absent.
final
focusNode → FocusNode?
The caller's focus node, if any; the part makes its own when null.
final
hashCode → int
The hash code for this object.
no setterinherited
helper → String?
label: the field's name. hint: its placeholder. helper: a line under it. initialValue: its starting text.
final
hint → String?
label: the field's name. hint: its placeholder. helper: a line under it. initialValue: its starting text.
final
initialValue → String?
label: the field's name. hint: its placeholder. helper: a line under it. initialValue: its starting text.
final
isOptionEnabled → bool Function(T option)?
Whether an option can be taken; null: all can. One that cannot shows in the secondary ink, and the keys, the pointer and Enter pass over it.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
label: the field's name. hint: its placeholder. helper: a line under it. initialValue: its starting text.
final
maxOptions → int
How many matches typed words show at most. With no words typed, or the words of the option taken, the list offers every option, scrolling.
final
onSelected → ValueChanged<T>?
Called with the option taken.
final
options → List<T>
Everything the field can offer, in the order offered. With a search, the options it offers before any words are typed are the search's for no words, and these go unused.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
Finds the options for the typed words in place of matching options: ui_core's DesignCombobox.search. Only the latest words' answer shows; while it is on its way the list says it is looking, and if it throws, the list says the search failed and offers Try again, the field keeping the focus.
final
style → ComicStyle?
Appearance of the list above the menu's component theme.
final

Methods

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