I am developing an app using Flutter. Now I need to render the HTML content in my application that includes anchor links. But there is a problem with the links in the HTML content, it is not opening the links in the browser when it is clicked.
This is my code.
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 10, right: 10, bottom: 10, left: 10),
child: Html(
data: htmlContent,
onLinkTap: (link) {
launch(link);
},
))
When I click on it, it is not working.
I imported this library at the top.
import 'package:url_launcher/url_launcher.dart';
What is wrong with my code and how can I fix it?
htmContent? What is the thrown exception? I assume you also use theflutter_htmlpackage.). Assuming you have a MissingPluginException: Closing the app and executingflutter run(in the cli) should work.