copyWith method

ComposeTextWithAi copyWith({
  1. FormattedText? text,
  2. String? translateToLanguageCode,
  3. String? styleName,
  4. bool? addEmojis,
})

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

Implementation

ComposeTextWithAi copyWith({
  FormattedText? text,
  String? translateToLanguageCode,
  String? styleName,
  bool? addEmojis,
}) => ComposeTextWithAi(
  text: text ?? this.text,
  translateToLanguageCode:
      translateToLanguageCode ?? this.translateToLanguageCode,
  styleName: styleName ?? this.styleName,
  addEmojis: addEmojis ?? this.addEmojis,
);