SpriteWidget.asset constructor

SpriteWidget.asset({
  1. required String path,
  2. Images? images,
  3. Anchor anchor = Anchor.topLeft,
  4. double angle = 0,
  5. Vector2? srcPosition,
  6. Vector2? srcSize,
  7. WidgetBuilder? errorBuilder,
  8. WidgetBuilder? loadingBuilder,
  9. 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);