copyWith method
MessageCopyOptions
copyWith({
- bool? sendCopy,
- bool? replaceCaption,
- 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,
);