load static method
Future<ParallaxImage>
load(
- String path, {
- ImageRepeat repeat = ImageRepeat.repeatX,
- Alignment alignment = Alignment.bottomLeft,
- LayerFill fill = LayerFill.height,
- Images? images,
- FilterQuality? filterQuality,
Takes a path of an image, and optionally arguments for how the image
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<ParallaxImage> load(
String path, {
ImageRepeat repeat = ImageRepeat.repeatX,
Alignment alignment = Alignment.bottomLeft,
LayerFill fill = LayerFill.height,
Images? images,
FilterQuality? filterQuality,
}) async {
images ??= Flame.images;
return ParallaxImage(
await images.load(path),
repeat: repeat,
alignment: alignment,
fill: fill,
filterQuality: filterQuality,
);
}