fromJson static method

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

Implementation

static ReportChatResult? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case ReportChatResultMessagesRequired.constructor:
      return ReportChatResultMessagesRequired.fromJson(json);

    case ReportChatResultOk.constructor:
      return ReportChatResultOk.fromJson(json);

    case ReportChatResultOptionRequired.constructor:
      return ReportChatResultOptionRequired.fromJson(json);

    case ReportChatResultTextRequired.constructor:
      return ReportChatResultTextRequired.fromJson(json);

    default:
      return null;
  }
}