copyWith method

  1. @override
InputMessageSharedWidget copyWith({
  1. int? widgetId,
  2. String? chatData,
  3. FormattedText? caption()?,
  4. bool? showCaptionAboveMedia,
})
override

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

Implementation

@override
InputMessageSharedWidget copyWith({
  int? widgetId,
  String? chatData,
  FormattedText? Function()? caption,
  bool? showCaptionAboveMedia,
}) => InputMessageSharedWidget(
  widgetId: widgetId ?? this.widgetId,
  chatData: chatData ?? this.chatData,
  caption: caption != null ? caption() : this.caption,
  showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
);