Fluent2FieldFrame class

Fluent's field frame: the face's fill at the field's corner (4; none for Fluent2InputAppearance.underline, which draws its bottom stroke alone), the 1 stroke with its accessible bottom, and the 2 brand underline (compoundBrandStroke) that grows from the middle while the field holds focus (in at durationNormal, out at durationUltraFast). Tracks the pointer for the hover face; child stands inside the strokes (strokesOf) with padding round it, at least minHeight tall.

Every field reads style, then Fluent2ThemeData.textFieldTheme, then Fluent's own, in its states (disabled, hovered, focused, pressed, error): fill, edge and side (the stroke all round, its bottom too), shape (its corner radius; Fluent's accessible bottom and underline follow a rounded rectangle, so an outline of another kind keeps the control radius), padding, minimumSize; the density moves the height and padding.

Inheritance

Constructors

Fluent2FieldFrame({required Fluent2InputAppearance appearance, required bool focused, required bool enabled, required Widget child, bool invalid = false, bool pressed = false, double minHeight = 32, EdgeInsetsGeometry padding = EdgeInsets.zero, MouseCursor cursor = SystemMouseCursors.text, double? radius, Fluent2Style? style, bool textNode = false, bool editable = false, bool touchTarget = true, Key? key})
A frame round child in appearance and its states.
const

Properties

appearance → Fluent2InputAppearance
Fluent's appearance: outline, underline or one of the fills.
final
child → Widget
The field's row: its slots and its editor.
final
cursor → MouseCursor
The pointer's cursor over the frame.
final
editable → bool
Whether the frame holds a text editor (a textNode frame always does): a tap anywhere in it focuses the editor and sets the caret nearest the tap, as a TextField takes a tap anywhere on its decorator, so the area a tap reaches is the frame a screen reader outlines, not the 20-tall line of words inside it.
final
enabled → bool
False draws the frame disabled.
final
focused → bool
Whether the field holds focus (the brand underline shows).
final
hashCode → int
The hash code for this object.
no setterinherited
invalid → bool
Whether the field's validation is an error (its stroke turns red).
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minHeight → double
The least height; under a finger the frame stands at least 48 (Fluent2Layout.touchHitTarget) overall, its strokes drawn over its line's edges, unless touchTarget is false. 0 sets none.
final
padding → EdgeInsetsGeometry
The room round child inside the strokes.
final
pressed → bool
Whether the field is pressed.
final
radius → double?
The corner radius; null is the style's, then Fluent's control radius (Fluent2Radius.medium).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → Fluent2Style?
The field's own look, over the text field theme.
final
textNode → bool
Whether the frame holds a text field whose node it is: the editor's words, flags and actions gather in one node as large as the frame (unless a Fluent2FormField round it is that node already).
final
touchTarget → bool
Whether the frame is a touch target of its own: false for a part of a control that is the target as a whole (a one-time code's box).
final

Methods

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

Static Methods

strokesOf(Fluent2InputAppearance appearance) → EdgeInsets
The room the strokes of a frame in appearance take inside it, which padding stands inside: the hairline at every side, at the bottom alone for Fluent2InputAppearance.underline (Fluent's underline field has no top, left or right border, so its words start at the root's padding from the edge and centre in the height over the stroke).