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