CarpenterControl class
Поведенческий primitive для интерактивных компонентов Carpenter.
CarpenterControl собирает semantics, focus, hover, pressed, pointer
gestures, keyboard activation и enabled state. Он не задает внешний вид:
визуальная часть приходит через builder и обычно читает context.face.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CarpenterControl
Constructors
- CarpenterControl({Key? key, required CarpenterControlBuilder builder, VoidCallback? onTap, bool enabled = true, String? semanticLabel, bool semanticButton = true, bool? semanticChecked, bool? semanticToggled, bool? semanticSelected, bool semanticLink = false, MouseCursor? cursor, FocusNode? focusNode, bool autofocus = false})
-
Создает интерактивную оболочку.
const
Properties
- autofocus → bool
-
Запрашивать фокус при первом построении.
final
- builder → CarpenterControlBuilder
-
Builder визуальной части компонента.
final
- cursor → MouseCursor?
-
Курсор мыши. Если не задан, выбирается из enabled-состояния.
final
- enabled → bool
-
Явно включает или выключает control.
final
- focusNode → FocusNode?
-
Внешний focus node для программного управления фокусом.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onTap → VoidCallback?
-
Действие при активации pointer или keyboard.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticButton → bool
-
Помечает control как button в semantics-дереве.
final
- semanticChecked → bool?
-
Checked-состояние для checkbox/radio-like controls.
final
- semanticLabel → String?
-
Семантическая подпись для accessibility.
final
- semanticLink → bool
-
Помечает control как ссылку в semantics-дереве.
final
- semanticSelected → bool?
-
Selected-состояние для selectable controls.
final
- semanticToggled → bool?
-
Toggled-состояние для switch-like controls.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CarpenterControl> -
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