Closed andrea-h10 closed 4 years ago
I've got it working fine using the Linkify widget.
BUT when I use SelectableLinkify: links still show using the link style (blue underline) BUT links no longer load when clicked.
Thank you!
code to replicate:
import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:flutter_linkify/flutter_linkify.dart'; class TestingScreen extends StatefulWidget { @override _TestingScreenState createState() => _TestingScreenState(); } class _TestingScreenState extends State<TestingScreen> { _launchURL(String url) async { if (await canLaunch(url)) { await launch(url, forceWebView: true); } else { throw 'Could not launch $url'; } } @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Center( child: SelectableLinkify( onOpen: (link) { _launchURL(link.url); }, text: 'I have an awesome website https://google.com', ), ), ), ); } }
Please upgrade your Flutter with flutter upgrade
flutter upgrade
https://github.com/Cretezy/flutter_linkify/issues/31
I've got it working fine using the Linkify widget.
BUT when I use SelectableLinkify: links still show using the link style (blue underline) BUT links no longer load when clicked.
Thank you!
code to replicate: