CarpenterSelectionButtonGroup<T> class final

Controlled single-choice group for switching one local content scope.

Inheritance

Constructors

CarpenterSelectionButtonGroup({Key? key, required List<CarpenterSelectionButtonOption<T>> options, required T value, required ValueChanged<T>? onChanged, ControlSize size = ControlSize.medium, ActionColorRole colorRole = ActionColorRole.primary, String semanticLabel = 'View selection'})
Creates a connected single-choice button group. Asserts that options is not empty; the caller owns the selected value.
const

Properties

colorRole ActionColorRole
Semantic action or selection color resolved from the current Carpenter theme.
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<T>?
Receives the value of an activated enabled option. Update value to commit the choice; null disables the group.
final
options List<CarpenterSelectionButtonOption<T>>
Choices in presentation and keyboard order. Keep values stable and distinct across rebuilds.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String
Accessible name for the whole choice group; defaults to "View selection".
final
size ControlSize
Semantic control size, resolving coordinated height, spacing, icon, and typography metrics.
final
value → T
Current selected option value; the group compares option values using equality.
final

Methods

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