SpritePainter(this.image, this.rect, this.color, this.flipHorizontally) { if (color != null) { _paint.colorFilter = ui.ColorFilter.mode(color!, BlendMode.srcIn); } }