copyWith method

BuyGiftUpgrade copyWith({
  1. MessageSender? ownerId,
  2. String? prepaidUpgradeHash,
  3. int? starCount,
})

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

Implementation

BuyGiftUpgrade copyWith({
  MessageSender? ownerId,
  String? prepaidUpgradeHash,
  int? starCount,
}) => BuyGiftUpgrade(
  ownerId: ownerId ?? this.ownerId,
  prepaidUpgradeHash: prepaidUpgradeHash ?? this.prepaidUpgradeHash,
  starCount: starCount ?? this.starCount,
);