Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.79k stars 860 forks source link

Have a problem, html table not showing in screen, I resolve with this solution but when updating latest version custom render and tableMatcher, tableRender not founding #1324

Closed Tigran-Kosemyan closed 1 year ago

Tigran-Kosemyan commented 1 year ago

Html(data: htmlData '', style: { "table": Style( height: Height.auto(), width: Width.auto(), border: const Border( left: BorderSide(color: Colors.black, width: 0.5), bottom: BorderSide(color: Colors.black, width: 0.5)), ), "tr": Style( height: Height.auto(), border: const Border( top: BorderSide(color: Colors.black, width: 0.5), right: BorderSide(color: Colors.black, width: 0.5), ), ), "th": Style(padding: HtmlPaddings.all(6), height: Height.auto()), "td": Style(padding: HtmlPaddings.all(6), height: Height.auto()), "col": Style(height: Height.auto(), width: Width.auto()), }, customRenders: { tableMatcher(): CustomRender.widget(widget: (context, child) { return SingleChildScrollView( scrollDirection: Axis.horizontal, // this calls the table CustomRender to render a table as normal (it uses a widget so we know widget is not null) child: tableRender.call().widget!.call(context, child), ); }), }),

erickok commented 1 year ago

Duplicate of #1326 1326