We know there is a Jsoup library for android developers to parse html text, code etc. As I am new in flutter mobile app development I want to know if there is any library like Jsoup to parse html text,code from a web site in flutter.
Flutter is growing with its libraries and community. Earlier, we could use Machine Learning and Flutter together to create powerful applications. Now, we can combine Flutter and HTML too.
This package allows you to use simple HTML and inline CSS styles to style your text in flutter.
You can parse a HTML string this way
import ‘package:html/parser.dart’;
//here goes the function
String _parseHtmlString(String htmlString) {
var document = parse(htmlString);
String parsedString = parse(document.body.text).documentElement.text;
return parsedString;
}
Please let me know this doesn’t solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With