BeuiSelect class
A dropdown select whose panel unfolds out of the trigger — the Flutter port
of beUI's select (the gooey/accordion variant), built on BeuiOverlay and
anchored to the trigger with a LayerLink + CompositedTransformFollower,
the same overlay pattern as BeuiTooltip.
Open choreography (mirrors the source's per-channel transitions): the
panel starts flush against the trigger (gap 0, near corners square) then
separates — its height springs open on _heightSpring
(duration 0.42, bounce 0.14), a gap springs apart on the bouncy
_gapSpring (0.6/0.5), and the corners facing the trigger round from 0→12
while the far corners stay rounded. Options stagger in (source
staggerChildren 0.035, delayChildren 0.05), each rising 6px through a
blur(3px)→0 opacity fade. The chevron rotates 180° on _chevronSpring, and
the trigger edge facing the panel stays flat then rounds back up on open
(source [0,0,12]) and pinches on close ([12,0,12]). The panel flips above
the trigger when there
isn't room below. Each channel springs on enter (via from: 0, like the
tooltip) and eases forward to its collapse on exit — the exit is not a
time-reversed entrance.
Controlled or uncontrolled: pass value + onChanged to control it, or omit value and seed defaultValue for internal state. Keyboard: Enter / Space / ArrowDown open it; Up/Down move the highlight; Enter commits; Esc closes. Reduced motion keeps a quick height + opacity reveal but drops the gap, the corner pinch and the per-option movement (options fade only).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BeuiSelect
Constructors
-
BeuiSelect({required List<
BeuiSelectOption> options, String? value, String? defaultValue, ValueChanged<String> ? onChanged, String placeholder = 'Select', bool enabled = true, Key? key}) -
Creates a select over
options.const
Properties
- defaultValue → String?
-
Uncontrolled initial value (used only when value is null).
final
- enabled → bool
-
Whether the trigger is interactive.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onChanged
→ ValueChanged<
String> ? -
Called with the chosen option's value.
final
-
options
→ List<
BeuiSelectOption> -
The options to choose from.
final
- placeholder → String
-
Shown in the trigger until a value is selected.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String?
-
Controlled selected value. When null the select owns its state.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BeuiSelect> -
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