As there were some issues with the stock HTML Viewer, I quickly made up this widget so that - if you need to visualize HTML in your app, you can do so, while waiting that the stock widget gets fixed.
[Screenshot 2022-08-09 at 2.15.45 PM.png]Dependencies: [Screenshot 2022-08-09 at 2.16.25 PM.png]Code:
import 'package:flutter_html/flutter_html.dart';
import 'package:html/dom.dart' as dom;
class Ffhtml extends StatefulWidget {
const Ffhtml({
Key key,
this.width,
this.height,
this.html,
}) : super(key: key);
final double width;
final double height;
final String html;
@override
_FfhtmlState createState() => _FfhtmlState();
}
class _FfhtmlState extends State {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Html(
data: widget.html,
),
);
}
}
Please note: this is based on an old version of the library and does not support many modern implementations. Use it for simple HTML visualizations (tables, etc) until the main widget is fixed. Currently Supported HTML Tags: a, abbr, acronym, address, article, aside, b, bdi, bdo, big, blockquote, body, br, caption, cite, code, data, dd, del, dfn, div, dl, dt, em, figcaption, figure, footer, h1, h2, h3, h4, h5, h6, header, hr, i, img, ins, kbd, li, main, mark, nav, noscript, ol, p, pre, q, rp, rt, ruby, s, samp, section, small, span, strike, strong, table, tbody, td, template, tfoot, th, thead, time, tr, tt, u, ul, var