LinkTextSpan constructor
LinkTextSpan({
- required Link link,
- required BuildContext context,
- VoidCallback? onTap,
- VoidCallback? onLaunchUrlError,
- TextStyle? style,
Implementation
LinkTextSpan({
required Link link,
required BuildContext context,
VoidCallback? onTap,
VoidCallback? onLaunchUrlError,
TextStyle? style,
}) : super(
text: link.display,
style: style ?? Theme.of(context).linkTextStyle,
recognizer: TapGestureRecognizer()
..onTap = () async {
onTap?.call();
await launchUrl(link.url, onError: onLaunchUrlError);
},
);