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