ReceivedMessage.fromJson constructor

ReceivedMessage.fromJson(
  1. Map<String, dynamic> json
)

Implementation

ReceivedMessage.fromJson(Map<String, dynamic> json) {
  jsonrpc = json['jsonrpc'];
  id = json['id'];
  method = json['method'];
  reattachedParams = json['params'] != null
      ? ReattachedParams.fromJson(json['params'])
      : null;
  stateParams =
      json['params'] != null ? StateParams.fromJson(json['params']) : null;
  inviteParams = json['params'] != null
      ? IncomingInviteParams.fromJson(json['params'])
      : null;
  if (json['params']['dialogParams'] != null) {
    dialogParams = DialogParams.fromJson(json['params']['dialogParams']);
  }
  if (json['voice_sdk_id'] != null) {
    voiceSdkId = json['voice_sdk_id'];
    Logger().i('Voice SDK ID: $voiceSdkId');
  }
}