fromJson static method

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

Implementation

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

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

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

    default:
      return null;
  }
}