class ReportUser { String id; String reportID; String reportName; String userID; String userName; ReportUser({ this.id, this.reportID, this.reportName, this.userID, this.userName, }); factory ReportUser.fromMap(Map map, String docID) { return ReportUser( id: docID, reportID: map['report_id'], reportName: map['report_name'], userID: map['user_id'], userName: map['user_name'], ); } Map toMap() { return { "id": id, "report_id": reportID, "report_name": reportName, "user_id": userID, "user_name": userName }; } }