Sprite constructor

Sprite({
  1. required Rect texture,
  2. required Vec2 position,
  3. double originX = 0.5,
  4. double originY = 0.5,
  5. int opacity = 255,
  6. double scale = 1.0,
  7. double rotation = 0,
  8. bool flip = false,
  9. bool mask = false,
  10. Color tint = Colors.white,
})

Implementation

Sprite({
  required this.texture,
  required this.position,
  this.originX = 0.5,
  this.originY = 0.5,
  this.opacity = 255,
  this.scale = 1.0,
  this.rotation = 0,
  this.flip = false,
  this.mask = false,
  this.tint = Colors.white,
});