fromJson static method

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

Implementation

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

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

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

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

    default:
      return null;
  }
}