ParallaxLayer class

Represents one layer in the parallax, draws out an image on a canvas in the manner specified by the parallaxImage.


ParallaxLayer(ParallaxRenderer parallaxRenderer, {Vector2? velocityMultiplier})
parallaxRenderer is the representation of the renderer with data of how the layer should behave. velocityMultiplier will be used to determine the velocity of the layer by multiplying the Parallax.baseVelocity with the velocityMultiplier.


hashCode int
The hash code for this object.
no setterinherited
parallaxRenderer ParallaxRenderer
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
velocityMultiplier Vector2
getter/setter pair


currentOffset() Vector2
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
render(Canvas canvas) → void
resize(Vector2 size) → void
toString() String
A string representation of this object.
update(Vector2 delta, double dt) → void


operator ==(Object other) bool
The equality operator.

Static Methods

load(ParallaxData data, {Vector2? velocityMultiplier, ImageRepeat repeat = ImageRepeat.repeatX, Alignment alignment = Alignment.bottomLeft, LayerFill fill = LayerFill.height, Images? images, FilterQuality? filterQuality}) Future<ParallaxLayer>
Takes a data of a parallax renderer, and optionally arguments for how it should repeat (repeat), which edge it should align with (alignment), which axis it should fill the image on (fill) and images which is the image cache that should be used. If no image cache is set, the global flame cache is used.