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:

  • sharesPointer provides pointer data to XLayers
  • sharesSensors provides sensors data to PLayers

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.

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:

  • onPointerEnter
  • onPointerExit
  • onCompensation
Inheritance
Implementers

Constructors

XL({Key? key, required List<Widget> layers, bool sharesPointer = true, bool sharesSensors = false, 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 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).
const

Properties

curve Curve
The default Curve for this XL'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 Duration for this XL'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/or PLayers to stack in this parent XL.
final
normalization Normalization
A parameter class that primarily pertain to XLayers for customizing the intake of SensorEvent data.
final
onCompensation VoidCallback?
Provide a function to perform when this XL begins one of its autocompensation steps.
final
onPointerEnter VoidCallback?
Provide a function to perform when this XL's MouseRegion and Listener have been entered by a pointer, either mouse or touch input.
final
onPointerExit VoidCallback?
Provide a function to perform when this XL's MouseRegion and Listener have 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
sharesPointer bool
If this XL has both XLayers and PLayers, sharesPointer set true will contribute both sensors data and pointer data toward XLayers.
final
sharesSensors bool
If this XL has both XLayers and PLayers, sharesSensors set true will contribute both sensors data and pointer data toward PLayers.
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}) 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