CarpenterFieldShell class final

Shared semantic frame for Carpenter field controls.

Field widgets own their interaction and value semantics. This shell owns the common visual anatomy: label, required marker, control surface, leading and trailing slots, supporting text, semantic feedback, focus ring, minimum target size, and field-role theming.

Inheritance

Constructors

CarpenterFieldShell({Key? key, required FieldAvailability availability, required FieldSize size, required CarpenterShape shape, required Set<WidgetState> states, required Widget child, bool fixedHeight = true, String? label, String? description, CarpenterFieldFeedback? feedback, String? errorText, bool required = false, Widget? leading, Widget? trailing})
Frames a caller-owned editing control. Supply the actual interaction states and enforce availability in the child; the shell styles the field but does not implement editing, focus ownership, validation, or event blocking.
const

Properties

availability FieldAvailability
Availability used to resolve field colors and feedback styling. The child remains responsible for disabling or restricting editing.
final
child Widget
Editing content placed in the expanding center slot. Its controller, focus node, and editing callbacks remain owned by the caller.
final
description String?
Supporting text below the control when neither errorText nor feedback supplies a message.
final
errorText String?
Compatibility shorthand for danger feedback. Non-null values take precedence over feedback; this property displays an error but does not run validation.
final
feedback CarpenterFieldFeedback?
Semantic supporting feedback. It replaces description and is overridden by any non-null errorText, including an empty string.
final
fixedHeight bool
Whether the control uses the themed fixed field height. When false, the field may grow beyond its themed minimum height for multiline content.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
Optional text above the control. A required marker is only drawn when a label is present.
final
leading Widget?
Optional content before the expanding child, separated with the themed field-content gap.
final
required bool
Whether to append a required marker to label. This is presentational and does not make the child value mandatory.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape CarpenterShape
Directional start and end shapes resolved to field radii for size and the surrounding text direction.
final
size FieldSize
Field role controlling height, typography, padding, and slot spacing through the active theme.
final
states Set<WidgetState>
Current interaction states supplied by the control. In particular, focused drives the focus ring; the shell does not detect focus itself.
final
trailing Widget?
Optional content after the expanding child, separated with the themed field-content gap.
final

Methods

build(BuildContext context) Widget
Resolves field geometry and feedback from CarpenterTheme, then composes the label, control slots, supporting text, and externally driven focus ring.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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