copyWith method

ChatBoostSlot copyWith({
  1. int? slotId,
  2. int? currentlyBoostedChatId,
  3. int? startDate,
  4. int? expirationDate,
  5. int? cooldownUntilDate,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

ChatBoostSlot copyWith({
  int? slotId,
  int? currentlyBoostedChatId,
  int? startDate,
  int? expirationDate,
  int? cooldownUntilDate,
}) =>
    ChatBoostSlot(
      slotId: slotId ?? this.slotId,
      currentlyBoostedChatId:
          currentlyBoostedChatId ?? this.currentlyBoostedChatId,
      startDate: startDate ?? this.startDate,
      expirationDate: expirationDate ?? this.expirationDate,
      cooldownUntilDate: cooldownUntilDate ?? this.cooldownUntilDate,
    );