load static method
Future<ParallaxLayer>
load(
- ParallaxData data, {
- Vector2? velocityMultiplier,
- ImageRepeat repeat = ImageRepeat.repeatX,
- Alignment alignment = Alignment.bottomLeft,
- LayerFill fill = LayerFill.height,
- Images? images,
- FilterQuality? filterQuality,
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.
Implementation
static Future<ParallaxLayer> load(
ParallaxData data, {
Vector2? velocityMultiplier,
ImageRepeat repeat = ImageRepeat.repeatX,
Alignment alignment = Alignment.bottomLeft,
LayerFill fill = LayerFill.height,
Images? images,
FilterQuality? filterQuality,
}) async {
return ParallaxLayer(
await data.load(
repeat,
alignment,
fill,
images,
filterQuality,
),
velocityMultiplier: velocityMultiplier,
);
}