WeFieldBox class
The outlined box behind dropdown fields such as WeSelect,
WeCascader and WeTreeSelect: border, hover, focus glow, a clear
button that replaces the arrow on hover, and the error state and size of
a surrounding WeFormItem.
It owns the Focus and the tap; the caller supplies the content and opens its panel from onTap.
WeFieldBox(
focusNode: _focus,
open: _open,
focused: _focused,
enabled: _enabled,
onTap: _toggle,
onClear: hasValue ? _clear : null,
child: Text(label),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- WeFieldBox
Constructors
- WeFieldBox({Key? key, required Widget child, required VoidCallback onTap, FocusNode? focusNode, FocusOnKeyEventCallback? onKeyEvent, bool open = false, bool focused = false, bool enabled = true, SizeEnum size = SizeEnum.defaultSize, SemanticEnum? status, VoidCallback? onClear, IconData? prefixIcon, bool multiline = false})
-
const
Properties
- child → Widget
-
final
- enabled → bool
-
final
- focused → bool
-
Draws the focus border and glow; usually
open || hasFocus.final - focusNode → FocusNode?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- multiline → bool
-
Grows with wrapped content, such as tags, instead of a fixed height.
final
- onClear → VoidCallback?
-
Shows a clear button on hover in place of the arrow.
nullhides it.final - onKeyEvent → FocusOnKeyEventCallback?
-
final
- onTap → VoidCallback
-
final
- open → bool
-
Turns the arrow up.
final
- prefixIcon → IconData?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → SizeEnum
-
final
- status → SemanticEnum?
-
Colours the border; falls back to the WeFormItem status.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< WeFieldBox> -
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
Static Methods
-
resolveSize(
BuildContext context, SizeEnum size) → SizeEnum -
sizewith a default size replaced by the WeFormItem's.