copyWith method

PremiumGiveawayParameters copyWith({
  1. int? boostedChatId,
  2. List<int>? additionalChatIds,
  3. int? winnersSelectionDate,
  4. bool? onlyNewMembers,
  5. bool? hasPublicWinners,
  6. List<String>? countryCodes,
  7. String? prizeDescription,
})

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

Implementation

PremiumGiveawayParameters copyWith({
  int? boostedChatId,
  List<int>? additionalChatIds,
  int? winnersSelectionDate,
  bool? onlyNewMembers,
  bool? hasPublicWinners,
  List<String>? countryCodes,
  String? prizeDescription,
}) =>
    PremiumGiveawayParameters(
      boostedChatId: boostedChatId ?? this.boostedChatId,
      additionalChatIds: additionalChatIds ?? this.additionalChatIds,
      winnersSelectionDate: winnersSelectionDate ?? this.winnersSelectionDate,
      onlyNewMembers: onlyNewMembers ?? this.onlyNewMembers,
      hasPublicWinners: hasPublicWinners ?? this.hasPublicWinners,
      countryCodes: countryCodes ?? this.countryCodes,
      prizeDescription: prizeDescription ?? this.prizeDescription,
    );