loadSprite method
Utility method to load and cache the image for a sprite based on its options.
Implementation
Future<Sprite> loadSprite(
String path, {
Vector2? srcSize,
Vector2? srcPosition,
}) {
return Sprite.load(
path,
srcPosition: srcPosition,
srcSize: srcSize,
images: images,
);
}