class SystemNotificationModel { String userId; String userName; String title; String text; int referenceId; int sourceId; String sourceName; bool readed; String readingDate; int id; String createdOn; String modifiedOn; SystemNotificationModel( {this.userId, this.userName, this.title, this.text, this.referenceId, this.sourceId, this.sourceName, this.readed, this.readingDate, this.id, this.createdOn, this.modifiedOn}); SystemNotificationModel.fromJson(Map json) { userId = json['userId']; userName = json['userName']; title = json['title']; text = json['text']; referenceId = json['referenceId']; sourceId = json['sourceId']; sourceName = json['sourceName']; readed = json['readed']; readingDate = json['readingDate']; id = json['id']; createdOn = json['createdOn']; modifiedOn = json['modifiedOn']; } Map toNotificationJson() { final Map data = new Map(); data['userId'] = this.userId; data['userName'] = this.userName; data['title'] = this.title; data['text'] = this.text; data['requestNumber'] = this.referenceId; data['sourceId'] = this.sourceId; data['requestType'] = this.sourceName; data['readed'] = this.readed; data['readingDate'] = this.readingDate; data['id'] = this.id; data['createdOn'] = this.createdOn; data['modifiedOn'] = this.modifiedOn; data['priority'] = "Low Priority"; return data; } Map toJson() { final Map data = new Map(); data['userId'] = this.userId; data['userName'] = this.userName; data['title'] = this.title; data['text'] = this.text; data['referenceId'] = this.referenceId; data['sourceId'] = this.sourceId; data['sourceName'] = this.sourceName; data['readed'] = this.readed; data['readingDate'] = this.readingDate; data['id'] = this.id; data['createdOn'] = this.createdOn; data['modifiedOn'] = this.modifiedOn; return data; } }