Flutter_widget_from_html: Table tags not rendering

Created on 29 Apr 2020  路  9Comments  路  Source: daohoangson/flutter_widget_from_html

I could see the below set of tag is not getting rendered in HTML widget. However it gets rendered in browser.

 Age
 
 Age 2
  2-3 years   4-18 years
  1-2   6-8

What might be the reason for not rendering? Or is there any problem in the attributes / properties used within tags?

@daohoangson any help is welcomed.

question

Most helpful comment

After #157 is merged, your table should work correctly!

Simulator Screen Shot - iPhone 11 - 2020-07-08 at 15 19 31

All 9 comments

Looks like there is bug with background-color. I'll see and issue a fix asap.

Version 0.3.3+1 has been released with the fix for this. Please try upgrading and see if it works for you. Sorry for the inconvenience.

Does the fix will be available in dev version as well ??

Yes, the latest rc (0.4.0-rc.2020043001) also includes the fix.

@daohoangson , Thanks for fix. I have tried the latest version(0.4.0-rc.2020043001). But unfortunately , it is not working as expected. Please refer the screen shot of how it appears. And the relevant HTML code below.

Screenshot_1588605527

HTML Code :
<table border="1" style="text-align:left;" width="60%"> <tbody> <tr> <th style="padding: 6px;padding-left: 3px;color:white;background-color:#eabac2;border: 2px solid white;">&nbsp;Column 1<br /> &nbsp;</th> <th style="padding: 6px;padding-left: 3px;color:white;background-color:#eabac2;border: 2px solid white;">&nbsp;Column 2</th> <th style="padding: 6px;padding-left: 3px;color:white;background-color:#eabac2;border: 2px solid white;">&nbsp;Column 3</th> </tr> <tr> <td style="padding: 6px;padding-left: 3px;background-color:#f9c6b2;border: 2px solid white;">&nbsp; Data 1</td> <td style="padding: 6px;padding-left: 3px;background-color:#f9c6b2;border: 2px solid white;">&nbsp;265</td> <td style="padding: 6px;padding-left: 3px;background-color:#f9c6b2;border: 2px solid white;">&nbsp;278</td> </tr> <tr> <td style="padding: 6px;padding-left: 3px;background-color:#f9c6b2;border: 2px solid white;">&nbsp; 767</td><td style="padding: 6px;padding-left: 3px;background-color:#f9c6b2;border: 2px solid white;">&nbsp;89</td> <td style="padding: 6px;padding-left: 3px;background-color:#f9c6b2;border: 2px solid white;">&nbsp;78</td> </tr> </tbody> </table>

It is expected to fill the entire table cell as below. Same code when run in browser.
expected

Please let me know if we have any work around / fix for them.

It will be great if we have any samples on using the CustomStylesBuilder and CustomWidgetBuilder available in the recent dev version.

So, with the latest pre-release version (0.4.1-rc.2020052701), it works better but still not correct:

Screen Shot 2020-05-27 at 11 07 26 PM

Without the inline style in TABLE (style="text-align:left;"), it looks like this:

Screen Shot 2020-05-27 at 11 08 26 PM

Hmm, I'll see what can be done.

@daohoangson , Please let know, once the issue is fixed and available. By the way great work. 馃憤 馃憤 馃憤

After #157 is merged, your table should work correctly!

Simulator Screen Shot - iPhone 11 - 2020-07-08 at 15 19 31

Good news! Version 0.5.0-rc.2020071301 has been released with the new table rendering logic. Please try upgrading and see whether it works for you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SoFo12 picture SoFo12  路  4Comments

red42 picture red42  路  4Comments

leewonghao picture leewonghao  路  7Comments

LauDijksterhuis picture LauDijksterhuis  路  5Comments

ahmadkhedr picture ahmadkhedr  路  6Comments