loadSpriteBatch method
Future<SpriteBatch>
loadSpriteBatch(
- String path, {
- Color? defaultColor,
- BlendMode? defaultBlendMode,
- RSTransform? defaultTransform,
- Images? imageCache,
- bool useAtlas = true,
Utility method to load and cache the image for a SpriteBatch
based on
its options.
Implementation
Future<SpriteBatch> loadSpriteBatch(
String path, {
Color? defaultColor,
BlendMode? defaultBlendMode,
RSTransform? defaultTransform,
Images? imageCache,
bool useAtlas = true,
}) {
return SpriteBatch.load(
path,
defaultColor: defaultColor,
defaultBlendMode: defaultBlendMode,
defaultTransform: defaultTransform,
images: imageCache ?? images,
useAtlas: useAtlas,
);
}