TappableTextSpan.wrapping constructor

const TappableTextSpan.wrapping({
  1. required List<InlineSpan> children,
  2. VoidCallback? onTap,
  3. TextStyle? hoverStyle,
  4. TextStyle? style,
  5. MouseCursor? mouseCursor,
})

Creates a tappable span over already-built children.

The whole subtree is one tap target. This is the form a link label takes — the label is parsed into spans before a builder ever sees it — and the form the streaming reveal rebuilds while the last characters are still arriving.

No semanticsLabel here: TextSpan asserts that one is only set alongside text. Put it on the leaves.

Implementation

const TappableTextSpan.wrapping({
  required List<InlineSpan> super.children,
  this.onTap,
  this.hoverStyle,
  super.style,
  super.mouseCursor,
});