copyWith method

MessageCopyOptions copyWith({
  1. bool? sendCopy,
  2. bool? replaceCaption,
  3. FormattedText? newCaption()?,
})

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

Implementation

MessageCopyOptions copyWith({
  bool? sendCopy,
  bool? replaceCaption,
  FormattedText? Function()? newCaption,
}) =>
    MessageCopyOptions(
      sendCopy: sendCopy ?? this.sendCopy,
      replaceCaption: replaceCaption ?? this.replaceCaption,
      newCaption: newCaption != null ? newCaption() : this.newCaption,
    );