fromJson static method

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

Implementation

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

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

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

    default:
      return null;
  }
}