StudioCombobox<T extends Object> class

A field that suggests: type, and the options whose words match open in a glass list under it; the arrows walk them, Enter takes the lit one and the field keeps the keyboard. With requireSelection only an option may stand in it. Given search in place of options, it asks for the options as the typing rests (debounceDuration): while it looks the list says so, and when the search fails the list says that and offers Try again.

Built on ui_core's DesignCombobox. Enter is taken in the entry's editing-complete (never its submit), so on the web the keyboard keeps typing after it.

StudioCombobox<String>(label: 'Show', options: shows, labelOf: (s) => s, value: show, onSelected: (s) => setState(() => show = s))
Inheritance

Constructors

StudioCombobox({Key? key, Iterable<T> options = const [], DesignOptionSearch<T>? search, Duration? debounceDuration, required String labelOf(T option), T? value, ValueChanged<T>? onSelected, String? label, String? hint, String? helper, String? error, String emptyText = 'Nothing matches', bool requireSelection = true, bool enabled = true, bool isOptionEnabled(T option)?, StudioStyle? style})
A combobox over options.
const

Properties

debounceDuration → Duration?
How long the typing rests before search runs; null runs it at once.
final
emptyText → String
What the list says when nothing matches.
final
enabled → bool
Whether it takes words.
final
error → String?
What is wrong, under it.
final
hashCode → int
The hash code for this object.
no setterinherited
helper → String?
A note under it.
final
hint → String?
What it says while empty.
final
isOptionEnabled → bool Function(T option)?
Whether option may be taken.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
The label above it.
final
labelOf → String Function(T option)
Each option's words.
final
onSelected → ValueChanged<T>?
Called with the option taken.
final
options → Iterable<T>
What may be chosen, when there is no search.
final
requireSelection → bool
Whether only an option may stand in it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
Finds the options for the words typed, in place of filtering options (a lookup on a server).
final
style → StudioStyle?
The window's style, over StudioThemeData.textFieldStyle.
final
value → T?
The option chosen.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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