StoryPrivacySettings.fromJson constructor

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

Implementation

factory StoryPrivacySettings.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case StoryPrivacySettingsEveryone.CONSTRUCTOR:
      return StoryPrivacySettingsEveryone.fromJson(json);
    case StoryPrivacySettingsContacts.CONSTRUCTOR:
      return StoryPrivacySettingsContacts.fromJson(json);
    case StoryPrivacySettingsCloseFriends.CONSTRUCTOR:
      return StoryPrivacySettingsCloseFriends.fromJson(json);
    case StoryPrivacySettingsSelectedContacts.CONSTRUCTOR:
      return StoryPrivacySettingsSelectedContacts.fromJson(json);
    default:
      return const StoryPrivacySettings();
  }
}