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

Issue in table rendering in flutter_html version ^3.0.0-alpha.1 #1240

Closed Payalpatel-wrteam closed 1 year ago

Payalpatel-wrteam commented 1 year ago

I cant use thie old syntax for rendering table in html.

customRender: { tableMatcher(): CustomRender.widget(widget: (context, child) { return SingleChildScrollView( scrollDirection: Axis.horizontal, child: (context.tree as TableLayoutElement).toWidget(context), ); }), }, And in custommRenders also doent have sufficient synytax to render table

fabianotavallini commented 1 year ago

@Payalpatel-wrteam you can take a look to my workaround solution here

Sub6Resources commented 1 year ago

Proper solution for 3.0.0 (from https://github.com/Sub6Resources/flutter_html/issues/1262#issuecomment-1547921921):

extensions: [
  WrapperExtension(
    tagsToWrap: {'table'},
    builder: (child) {
      return SingleChildScrollView(
        scrollDirection: Axis.horizontal,
        child: child,
      );
    }
  ),
],