copyWith method

GiftCollection copyWith({
  1. int? id,
  2. String? name,
  3. Sticker? icon()?,
  4. int? giftCount,
  5. dynamic extra,
  6. 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

GiftCollection copyWith({
  int? id,
  String? name,
  Sticker? Function()? icon,
  int? giftCount,
  dynamic extra,
  int? clientId,
}) => GiftCollection(
  id: id ?? this.id,
  name: name ?? this.name,
  icon: icon != null ? icon() : this.icon,
  giftCount: giftCount ?? this.giftCount,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);