fromJson static method

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

Implementation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    default:
      return null;
  }
}