fromJson static method

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

Implementation

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

  switch (json['@type']) {
    case ProfileShareThemeEmoji.constructor:
      return ProfileShareThemeEmoji.fromJson(json);
    case ProfileShareThemeUpgradedGift.constructor:
      return ProfileShareThemeUpgradedGift.fromJson(json);
    default:
      return null;
  }
}