then method

Widget then(
  1. InlineSpan span
)

Implementation

Widget then(InlineSpan span) {
  if (this is RichText) {
    final text = this as RichText;
    return _RichTextThenWidget(text: text, then: [span]);
  }
  if (this is SelectableText) {
    final text = this as SelectableText;
    return _SelectableTextThenWidget(text: text, then: [span]);
  }
  if (this is Text) {
    final text = this as Text;
    return _TextThenWidget(text: text, then: [span]);
  }
  if (this is _RichTextThenWidget) {
    final text = this as _RichTextThenWidget;
    return _RichTextThenWidget(
      text: text.text,
      then: [...text.then, span],
    );
  }
  if (this is _TextThenWidget) {
    final text = this as _TextThenWidget;
    return _TextThenWidget(
      text: text.text,
      then: [...text.then, span],
    );
  }
  if (this is _SelectableTextThenWidget) {
    final text = this as _SelectableTextThenWidget;
    return _SelectableTextThenWidget(
      text: text.text,
      then: [...text.then, span],
    );
  }
  InlineSpan currentSpan = WidgetSpan(
    child: this,
  );
  return RichText(
    text: TextSpan(
      children: [currentSpan, span],
    ),
  );
}