Map<String, dynamic> toJson() { final resolution = this.resolution; return { if (resolution != null) 'resolution': resolution.toValue(), }; }