copyWith method

FormattableText copyWith({
  1. String? text,
  2. List<StringRange>? matches,
})

Implementation

FormattableText copyWith({String? text, List<StringRange>? matches}) {
  return FormattableText(
    text: text ?? this.text,
    matches:
        ((matches?.isNotEmpty ?? false) ? matches : null) ?? this.matches,
  );
}