copyWith method

TextSpan copyWith({
  1. String? text,
  2. List<InlineSpan>? children,
  3. TextStyle? style,
  4. GestureRecognizer? recognizer,
  5. String? semanticsLabel,
  6. bool noText = false,
  7. bool noChildren = false,
})

Implementation

TextSpan copyWith({
  String? text,
  List<InlineSpan>? children,
  TextStyle? style,
  GestureRecognizer? recognizer,
  String? semanticsLabel,
  bool noText = false,
  bool noChildren = false,
}) =>
    TextSpan(
      text: noText ? null : (text ?? this.text),
      children: noChildren ? null : (children ?? this.children),
      style: style ?? this.style,
      recognizer: recognizer ?? this.recognizer,
      semanticsLabel: semanticsLabel ?? this.semanticsLabel,
    );