LinkBuilder typedef

  1. @Deprecated('Use InlineLinkBuilder via GptMarkdown.inlineLinkBuilder. ' 'This returns a Widget, which the package has to wrap in a WidgetSpan: the ' 'label sits off the baseline, cannot wrap across lines, is skipped by text ' 'selection, is one opaque character to the streaming reveal, and does not ' 'paint on iOS inside a link label. Its four positional parameters are the ' 'other half of the problem — the resolved LinkStyle, whether the link is an ' 'autolink, and a link title have nowhere to go without breaking every ' 'caller. Will be removed in 2.0.0.')
LinkBuilder = Widget Function(BuildContext context, InlineSpan text, String url, TextStyle style)

A builder function for the link.

Implementation

@Deprecated(
  'Use InlineLinkBuilder via GptMarkdown.inlineLinkBuilder. '
  'This returns a Widget, which the package has to wrap in a WidgetSpan: the '
  'label sits off the baseline, cannot wrap across lines, is skipped by text '
  'selection, is one opaque character to the streaming reveal, and does not '
  'paint on iOS inside a link label. Its four positional parameters are the '
  'other half of the problem — the resolved LinkStyle, whether the link is an '
  'autolink, and a link title have nowhere to go without breaking every '
  'caller. Will be removed in 2.0.0.',
)
typedef LinkBuilder =
    Widget Function(
      BuildContext context,
      InlineSpan text,
      String url,
      TextStyle style,
    );