copyWith method
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,
);