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