class WebRTCSocketModel{ dynamic id; String fromuser; String too; String type; String data; dynamic candidate; dynamic sdp; int timestmp; WebRTCSocketModel({ this.id, this.fromuser, this.too, this.type, this.data, this.candidate, this.sdp, this.timestmp, }); factory WebRTCSocketModel.fromJson(Map json) => WebRTCSocketModel( id: json["id"], fromuser: json["fromuser"], too: json["too"], type: json["type"], data: json["data"], candidate: json["candidate"], sdp: json["sdp"], timestmp: json["timestmp"], ); Map toJson() => { "id": id, "fromuser": fromuser, "too": too, "type": type, "data": data, "candidate": candidate, "sdp": sdp, "timestmp": timestmp, }; }