'flutter_html is not parsing some characters in flutter
I am using flutter_html package in my app, to parse the html code from my API. But, I am facing a problem that it is not able to parse some characters like arrows and it is not styling the default numbers which are coming from list tag in html code. Is there any solution/alternative for this?
/*: Html(
data: "<body><div>"+widget.dataList[widget.index].description!+"</div></body>",
style: {
//'p': Style(color: secondaryTextColor),
'body': Style(
color: secondaryTextColor,
textDecorationColor: secondaryTextColor,
fontSize: FontSize(bodyText2Size - 1),
),
},
),*/
Solution 1:[1]
Use this package
html: ^0.15.0
you can use:
import 'package:html/dom.dart';
import 'package:html/dom_parsing.dart';
import 'package:html/parser.dart';
import 'package:html/parser.dart' show parse;
import 'package:html/dom.dart';
main() {
var document = parse(
'<body>Hello world! <a href="www.html5rocks.com">HTML5 rocks!');
print(document.outerHtml);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anandh Krishnan |
