copyWith method

SendResoldGift copyWith({
  1. String? giftName,
  2. MessageSender? ownerId,
  3. GiftResalePrice? price,
  4. FormattedText? text,
  5. bool? isPrivate,
})

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

Implementation

SendResoldGift copyWith({
  String? giftName,
  MessageSender? ownerId,
  GiftResalePrice? price,
  FormattedText? text,
  bool? isPrivate,
}) => SendResoldGift(
  giftName: giftName ?? this.giftName,
  ownerId: ownerId ?? this.ownerId,
  price: price ?? this.price,
  text: text ?? this.text,
  isPrivate: isPrivate ?? this.isPrivate,
);