copyWith method

SpannedTextEditingController copyWith({
  1. TextAttribute? compositionAttribute,
  2. ProcessTextValue? processTextValue,
  3. String? text,
  4. SpanList? spans,
})

Create a new spanned text editing controller with the same state as this one, but with the given fields replaced with the new values.

Implementation

SpannedTextEditingController copyWith({
  TextAttribute? compositionAttribute,
  ProcessTextValue? processTextValue,
  String? text,
  SpanList? spans,
}) {
  return SpannedTextEditingController(
    compositionAttribute: compositionAttribute ?? this.compositionAttribute,
    processTextValue: processTextValue ?? this.processTextValue,
    text: text ?? this.text,
    spans: spans ?? this.spans,
  );
}