Sprite constructor
Sprite({
- required SpriteTexture texture,
Creates a new sprite from the provided texture.
var mySprite = Sprite(myTexture)
Implementation
Sprite({required this.texture}) : super(Size.zero) {
size = texture.size;
pivot = texture.pivot;
}