SpriteWidget.asset constructor
SpriteWidget.asset({
- required String path,
- Images? images,
- Anchor anchor = Anchor.topLeft,
- double angle = 0,
- Vector2? srcPosition,
- Vector2? srcSize,
- WidgetBuilder? errorBuilder,
- WidgetBuilder? loadingBuilder,
- Key? key,
Implementation
SpriteWidget.asset({
required String path,
Images? images,
this.anchor = Anchor.topLeft,
this.angle = 0,
this.srcPosition,
this.srcSize,
this.errorBuilder,
this.loadingBuilder,
Key? key,
}) : _spriteFuture = (() => Sprite.load(
path,
srcSize: srcSize,
srcPosition: srcPosition,
images: images,
)),
super(key: key);