Sprite([Texture texture ])

Creates a new sprite from the provided texture.

var mySprite = new Sprite(myTexture)

Source

Sprite([this.texture]) : super(Size.zero) {
  if (texture != null) {
    size = texture.size;
    pivot = texture.pivot;
  } else {
    pivot = new Point(0.5, 0.5);
  }
}