View({Paint? paint, this.zIndex = 0}) { if (paint != null) { this.paint = paint; } else { this.paint = Paint(); } }