copyWith method

  1. @override
InputMessageText copyWith({
  1. FormattedText? text,
  2. bool? disableWebPagePreview,
  3. bool? clearDraft,
})
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
InputMessageText copyWith({
  FormattedText? text,
  bool? disableWebPagePreview,
  bool? clearDraft,
}) =>
    InputMessageText(
      text: text ?? this.text,
      disableWebPagePreview:
          disableWebPagePreview ?? this.disableWebPagePreview,
      clearDraft: clearDraft ?? this.clearDraft,
    );