fromJson static method

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

Implementation

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

  return ChatBoostSlot(
    slotId: (json['slot_id'] as int?) ?? 0,
    currentlyBoostedChatId: (json['currently_boosted_chat_id'] as int?) ?? 0,
    startDate: (json['start_date'] as int?) ?? 0,
    expirationDate: (json['expiration_date'] as int?) ?? 0,
    cooldownUntilDate: (json['cooldown_until_date'] as int?) ?? 0,
  );
}