// To parse this JSON data, do // // final callDataModel = callDataModelFromJson(jsonString); import 'dart:convert'; class CallDataModel { CallDataModel({ this.callerId, this.callReciverId, this.notificationForeground, this.message, this.title, this.type, this.identity, this.name, this.isCall, this.isWebrtc, this.contant, this.contantNo, this.chatEventId, this.fileTypeId, this.currentUserId, this.chatSource, this.userChatHistoryLineRequestList, this.server, }); String? callerId; String? callReciverId; String? notificationForeground; String? message; String? title; String? type; String? identity; String? name; String? isCall; String? isWebrtc; String? contant; String? contantNo; String? chatEventId; dynamic? fileTypeId; String? currentUserId; String? chatSource; List? userChatHistoryLineRequestList; String? server; factory CallDataModel.fromRawJson(String str) => CallDataModel.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory CallDataModel.fromJson(Map json) => CallDataModel( callerId: json["callerID"] == null ? null : json["callerID"], callReciverId: json["callReciverID"] == null ? null : json["callReciverID"], notificationForeground: json["notification_foreground"] == null ? null : json["notification_foreground"], message: json["message"] == null ? null : json["message"], title: json["title"] == null ? null : json["title"], type: json["type"] == null ? null : json["type"], identity: json["identity"] == null ? null : json["identity"], name: json["name"] == null ? null : json["name"], isCall: json["is_call"] == null ? null : json["is_call"], isWebrtc: json["is_webrtc"] == null ? null : json["is_webrtc"], contant: json["contant"] == null ? null : json["contant"], contantNo: json["contantNo"] == null ? null : json["contantNo"], chatEventId: json["chatEventId"] == null ? null : json["chatEventId"], fileTypeId: json["fileTypeId"], currentUserId: json["currentUserId"] == null ? null : json["currentUserId"], chatSource: json["chatSource"] == null ? null : json["chatSource"], userChatHistoryLineRequestList: json["userChatHistoryLineRequestList"] == null ? null : List.from( json["userChatHistoryLineRequestList"].map( (x) => UserChatHistoryLineRequestList.fromJson(x), ), ), server: json["server"] == null ? null : json["server"], ); Map toJson() => { "callerID": callerId == null ? null : callerId, "callReciverID": callReciverId == null ? null : callReciverId, "notification_foreground": notificationForeground == null ? null : notificationForeground, "message": message == null ? null : message, "title": title == null ? null : title, "type": type == null ? null : type, "identity": identity == null ? null : identity, "name": name == null ? null : name, "is_call": isCall == null ? null : isCall, "is_webrtc": isWebrtc == null ? null : isWebrtc, "contant": contant == null ? null : contant, "contantNo": contantNo == null ? null : contantNo, "chatEventId": chatEventId == null ? null : chatEventId, "fileTypeId": fileTypeId, "currentUserId": currentUserId == null ? null : currentUserId, "chatSource": chatSource == null ? null : chatSource, "userChatHistoryLineRequestList": userChatHistoryLineRequestList == null ? null : List.from( userChatHistoryLineRequestList!.map( (x) => x.toJson(), ), ), "server": server == null ? null : server, }; } class UserChatHistoryLineRequestList { UserChatHistoryLineRequestList({ this.isSeen, this.isDelivered, this.targetUserId, this.targetUserStatus, }); bool? isSeen; bool? isDelivered; int? targetUserId; int? targetUserStatus; factory UserChatHistoryLineRequestList.fromJson(Map json) => UserChatHistoryLineRequestList( isSeen: json["isSeen"] == null ? null : json["isSeen"], isDelivered: json["isDelivered"] == null ? null : json["isDelivered"], targetUserId: json["targetUserId"] == null ? null : json["targetUserId"], targetUserStatus: json["targetUserStatus"] == null ? null : json["targetUserStatus"], ); Map toJson() => { "isSeen": isSeen == null ? null : isSeen, "isDelivered": isDelivered == null ? null : isDelivered, "targetUserId": targetUserId == null ? null : targetUserId, "targetUserStatus": targetUserStatus == null ? null : targetUserStatus, }; }