copyWith method

MessageForwardInfo copyWith({
  1. MessageOrigin? origin,
  2. int? date,
  3. ForwardSource? source()?,
  4. String? publicServiceAnnouncementType,
})

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

Implementation

MessageForwardInfo copyWith({
  MessageOrigin? origin,
  int? date,
  ForwardSource? Function()? source,
  String? publicServiceAnnouncementType,
}) =>
    MessageForwardInfo(
      origin: origin ?? this.origin,
      date: date ?? this.date,
      source: source != null ? source() : this.source,
      publicServiceAnnouncementType:
          publicServiceAnnouncementType ?? this.publicServiceAnnouncementType,
    );