fromJson static method

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

Implementation

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

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