copyWith method

  1. @override
InputMessageWidget copyWith({
  1. int? width,
  2. int? height,
  3. String? html,
  4. String? publicData,
  5. String? chatData,
  6. FormattedText? caption()?,
  7. bool? showCaptionAboveMedia,
  8. bool? allowQueries,
  9. bool? isShared,
})
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
InputMessageWidget copyWith({
  int? width,
  int? height,
  String? html,
  String? publicData,
  String? chatData,
  FormattedText? Function()? caption,
  bool? showCaptionAboveMedia,
  bool? allowQueries,
  bool? isShared,
}) => InputMessageWidget(
  width: width ?? this.width,
  height: height ?? this.height,
  html: html ?? this.html,
  publicData: publicData ?? this.publicData,
  chatData: chatData ?? this.chatData,
  caption: caption != null ? caption() : this.caption,
  showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
  allowQueries: allowQueries ?? this.allowQueries,
  isShared: isShared ?? this.isShared,
);