copyWith method

PremiumGiftCodeInfo copyWith({
  1. MessageSender? creatorId()?,
  2. int? creationDate,
  3. bool? isFromGiveaway,
  4. int? giveawayMessageId,
  5. int? monthCount,
  6. int? dayCount,
  7. int? userId,
  8. int? useDate,
  9. dynamic extra,
  10. int? clientId,
})

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

Implementation

PremiumGiftCodeInfo copyWith({
  MessageSender? Function()? creatorId,
  int? creationDate,
  bool? isFromGiveaway,
  int? giveawayMessageId,
  int? monthCount,
  int? dayCount,
  int? userId,
  int? useDate,
  dynamic extra,
  int? clientId,
}) => PremiumGiftCodeInfo(
  creatorId: creatorId != null ? creatorId() : this.creatorId,
  creationDate: creationDate ?? this.creationDate,
  isFromGiveaway: isFromGiveaway ?? this.isFromGiveaway,
  giveawayMessageId: giveawayMessageId ?? this.giveawayMessageId,
  monthCount: monthCount ?? this.monthCount,
  dayCount: dayCount ?? this.dayCount,
  userId: userId ?? this.userId,
  useDate: useDate ?? this.useDate,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);