class SocketMessageModel{ int? id; String? profileimage; String? senderName; String? message; int? senderid; int? timestmp; SocketMessageModel({ this.id, this.profileimage, this.senderName, this.message, this.senderid, this.timestmp, }); factory SocketMessageModel.fromJson(Map json) => SocketMessageModel( id: json["id"], profileimage: json["profileimage"], senderName: json["senderName"], message: json["message"], senderid: json["senderid"], timestmp: json["timestmp"], ); Map toJson() => { "id": id, "profileimage": profileimage, "senderName": senderName, "message": message, "senderid": senderid, "timestmp": timestmp, }; }