copyWith method

SponsoredChat copyWith({
  1. int? uniqueId,
  2. int? chatId,
  3. String? sponsorInfo,
  4. String? additionalInfo,
})

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

Implementation

SponsoredChat copyWith({
  int? uniqueId,
  int? chatId,
  String? sponsorInfo,
  String? additionalInfo,
}) => SponsoredChat(
  uniqueId: uniqueId ?? this.uniqueId,
  chatId: chatId ?? this.chatId,
  sponsorInfo: sponsorInfo ?? this.sponsorInfo,
  additionalInfo: additionalInfo ?? this.additionalInfo,
);