UiSelect<T> class

Generic dropdown select.

Value-based API — pass value + onChanged like a standard controlled input. The menu is rendered through the ambient Overlay so its styling stays consistent with the rest of the kit (no Material popup inside the list).

Inheritance

Constructors

UiSelect({Key? key, required List<UiSelectOption<T>> options, required ValueChanged<T>? onChanged, T? value, String? label, String? hint, String? helper, String? errorText, UiSelectValidator<T>? validator, bool enabled = true, UiSize size = UiSize.lg, UiSelectPlacement placement = UiSelectPlacement.auto, UiSelectOptionBuilder<T>? optionBuilder, UiSelectValueBuilder<T>? valueBuilder, bool shrinkWrap = false, bool dismissOnTapOutside = true})
const

Properties

dismissOnTapOutside bool
Whether a pointer tap outside the trigger and menu dismisses it. Scroll gestures keep the menu open and outside taps pass through to the underlying control. Defaults to true.
final
enabled bool
final
errorText String?
final
hashCode int
The hash code for this object.
no setterinherited
helper String?
final
hint String?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
final
onChanged ValueChanged<T>?
final
optionBuilder UiSelectOptionBuilder<T>?
Optional override for rendering each dropdown row.
final
options List<UiSelectOption<T>>
final
placement UiSelectPlacement
How the overlay positions itself relative to the trigger.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shrinkWrap bool
When true the trigger sizes to its content instead of stretching to the parent's full width — for compact, inline placements (e.g. a top-bar language switcher).
final
size UiSize
Defaults to UiSize.lg to match UiInput's default so a Select trigger and a text field placed side by side in a form render at the same height without callers having to pass size explicitly.
final
validator UiSelectValidator<T>?
final
value → T?
final
valueBuilder UiSelectValueBuilder<T>?
Optional override for rendering the value inside the closed trigger.
final

Methods

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