Fluent2FieldButton class

A field-faced button (a dropdown's, a date picker's): it takes focus and Enter, Space and the down arrow (onOpen), the pointer's hover and click, and says it is a button that opens hint; the face is builder's, told whether the field is focused (the brand underline is Fluent's focus indicator on a field, not a ring) and pressed.

Inheritance

Constructors

Fluent2FieldButton({required VoidCallback? onOpen, required Widget builder(BuildContext context, bool focused, bool pressed), required String label, String? value, String? hint, bool? expanded, FocusNode? focusNode, bool autofocus = false, Key? key})
A field-faced button that opens what onOpen shows.
const

Properties

autofocus → bool
Whether it takes focus when it first builds.
final
builder → Widget Function(BuildContext context, bool focused, bool pressed)
Builds the face, told whether the button is focused and pressed.
final
expanded → bool?
Whether what it opens is open, as a screen reader reads it; null says nothing.
final
focusNode → FocusNode?
The focus node it takes focus with; null makes its own.
final
hashCode → int
The hash code for this object.
no setterinherited
hint → String?
The words read while nothing is chosen.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String
What a screen reader calls the button.
final
onOpen → VoidCallback?
Called when the button is pressed or opened from the keyboard; null puts it out of use.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → String?
The chosen value's words, read with label.
final

Methods

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