AurisSwitch class

A toggle with a true slanted (parallelogram) track and thumb — the data-control HUD motif (§spec:design-tokens) Material's Switch cannot express, since its track is a fixed stadium shape (§spec:custom-widgets, §spec:theme-layer "known limits").

The track and thumb are both clipped/outlined with the signature right-leaning slant via AurisSlantBorder / SlantClipper. The thumb slides between the two ends and the track color crosses from the resting border to the active primary over the scheme's normal duration; both the position and the color animate together. An optional label sits beside the control and optional on/off statusLabels read out the state in monospace.

Animation respects reduced motion: when MediaQuery.disableAnimations is set the control renders its end state and the controller does not run (§spec:motion-performance). A disabled switch (null onChanged) renders at opacity 0.5 with no hover/focus and a forbidden cursor; an enabled switch shows a gold keyboard-focus outline (§spec:accessibility).

Inheritance

Constructors

AurisSwitch({Key? key, required bool value, required ValueChanged<bool>? onChanged, String? label, (String, String)? statusLabels, FocusNode? focusNode, bool autofocus = false})
Creates a slanted switch.
const

Properties

autofocus → bool
Whether the control should autofocus.
final
focusNode → FocusNode?
An optional external 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
label → String?
Optional descriptive label shown before the control.
final
onChanged → ValueChanged<bool>?
Called with the requested new value when the user toggles the control. Null disables the switch.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusLabels → (String, String)?
Optional (off, on) status words shown after the control in monospace (e.g. ('OFFLINE', 'ONLINE')); the active word is highlighted.
final
value → bool
Whether the switch is on.
final

Methods

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