Cube class
An interactive 3D cube widget driven by a CubeController.
Drag off the cube to orbit the view. If onMove is provided, dragging on the cube turns the grabbed layer (following the finger, snapping to the nearest quarter-turn on release). If onFaceTap is provided, tapping a face reports the front-most face under the tap.
- Inheritance
Constructors
Properties
- controller → CubeController
-
The controller that owns the cube state and view rotation.
final
- enableGestures → bool
-
Whether drag/tap gestures are handled. When false the cube is display-only.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onFaceTap → void Function(CubieFace face)?
-
Called when the user taps a visible face of the cube, with the cube face
that is front-most under the tap (so a tap never "passes through" to the
opposite side). Null disables tap-to-select.
final
- onMove → void Function(CubeMove move)?
-
Called when the user finishes a drag that turns a layer, with the committed
move. Providing this enables drag-to-turn: dragging on the cube turns the
grabbed layer (following the finger, snapping on release); dragging off the
cube still orbits the view. Null disables drag-to-turn (all drags orbit).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Cube> -
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