XL class
A Widget that allows the definition of a stack of XLayers
and/or PLayers and that will intrinsically animate them
with a parallax effect based on sensor events (X)
or pointer data (P).
Layers
A list of XLayers and/or PLayers, each with their own animatable properties.
Sharing Input
If this XL has both XLayers and PLayers, control the sharing of
sensors or pointer data with the opposing Layer variety
with the respective flags:
Dragging
A parameter class that primarily pertains to PLayers and their
parallax animation during an active drag or pointer hover event.
Normalization
A parameter class that primarily pertain to XLayers
for customizing the intake of SensorEvent data.
- Normalization.autocompensates, a flag for toggling autocompensation after steady sensor samples for some time
- Normalization.delay, how long to wait before kicking in
autocompensation, considering
sensitivityto past samples in a buffer
Animation
The default duration and curve for this XL's parallax animations
are controlled with these properties.
This applies when the layers are being transformed by sensor data or are resetting/autocompensating.
When PLayers are actively hovered/touched, Dragging applies instead.
Void Callbacks
For Function performance on state-change:
onPointerEnteronPointerExitonCompensation
- Inheritance
Constructors
-
XL({Key? key, required List<
Widget> layers, Dragging dragging = const Dragging(), Normalization normalization = const Normalization(), Duration duration = const Duration(milliseconds: 250), Curve curve = Curves.ease, bool useLocalPosition = true, ReferencePosition referencePosition = ReferencePosition.center, VoidCallback? onPointerEnter, VoidCallback? onPointerExit, VoidCallback? onCompensation}) -
A
Widgetthat allows the definition of a stack ofXLayers and/orPLayers and that will intrinsically animate them with a parallax effect based on sensor events (X) or pointer data (P).const
Properties
- curve → Curve
-
The default
Curvefor thisXL's parallax animations.final - dragging → Dragging
-
A parameter class that primarily pertains to
PLayers and their parallax animation during an active drag or pointer hover event.final - duration → Duration
-
The default
Durationfor thisXL's parallax animations.final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
layers
→ List<
Widget> -
A list of
XLayers and/orPLayers to stack in this parent XL.final - normalization → Normalization
-
A parameter class that primarily pertain to
XLayers for customizing the intake ofSensorEventdata.final - onCompensation → VoidCallback?
-
Provide a function to perform when this
XLbegins one of its autocompensation steps.final - onPointerEnter → VoidCallback?
-
Provide a function to perform when this
XL'sMouseRegionandListenerhave been entered by a pointer, either mouse or touch input.final - onPointerExit → VoidCallback?
-
Provide a function to perform when this
XL'sMouseRegionandListenerhave been exited by a pointer, either mouse or touch input.final - referencePosition → ReferencePosition
-
From where the parallax effect should be referenced
when derived from pointer data on a scale from
0..1.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
If this
XLhas bothXLayers andPLayers,sharesPointersettruewill contribute both sensors data and pointer data towardXLayers.final -
If this
XLhas bothXLayers andPLayers,sharesSensorssettruewill contribute both sensors data and pointer data towardPLayers.final - useLocalPosition → bool
-
Whether the parallax factors derived from pointer data should be
referenced from the size and position of this XL.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _XLState -
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