fromJson static method

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

Implementation

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

  return GiftChatTheme(
    gift: UpgradedGift.fromJson(tdMapFromJson(json['gift'])),
    lightSettings: ThemeSettings.fromJson(
      tdMapFromJson(json['light_settings']),
    ),
    darkSettings: ThemeSettings.fromJson(
      tdMapFromJson(json['dark_settings']),
    ),
  );
}