flutter_widget_from_html
flutter_widget_from_html copied to clipboard
Nested Tables?
Hi there,
I was wondering if this package is able to handle nested tables? I know that this has been challenging for flutter html packages.
Scroll to the bottom here for an example:
https://github.com/Sub6Resources/flutter_html/issues/917
Thank you!
It should work. You can nest table inside each other, inside list item, etc.
https://try.fwfh.dev/?id=178389000ff93267b1b4b77ee4554855

Hey friend,
This does work in regards to having ul and li elements. This is more along the lines of the html that I'm dealing with:
<html> <head></head> <body> <table border="1"> <tr> <td width="25" valign="top">A.</td> <td>This is where the A starts.</td> </tr> <tr> <td width="25" valign="top">B.</td> <td>This is where the B starts.</td> </tr> <tr> <td width="25" valign="top"></td> <td><table width="100%"> <tr> <td width="25" valign="top">(1)</td> <td>This is for number one</td> </tr> <tr> <td width="25" valign="top"></td> <td>This is a whole bunch of text blank</td> </tr> <tr> <td width="25" valign="top">(2)</td> <td>This is for number two</td> </tr> <tr> <td width="25" valign="top"></td> <td>This is another blank text type</td> </tr> </table> </td> </tr> </table> </body> </html>
- Is there a way for your pub to handle this?
- Maybe I can inject a ul element to wrap the nested table? Would this work? Suggested approach?
You don't need to wrap it inside an UL, it was just a demo. Your HTML should work as is.
https://try.fwfh.dev/?id=9af7a91a789992c2c64cbb79867990ed

Hey there, I am still facing an issue where I see large gaps between td elements that are inside of a tr, inside of a table, as such:
https://try.fwfh.dev/?id=178389000ff93267b1b4b77ee4554855

Thoughts?
Thank you!!
The try.fwfh.dev URL shows a different HTML so I couldn't take a closer look. According to the screenshot, the table columns don't specify width so they are equally divided and there were huge space between the texts. New version of this package have had improvements in this area so I'm closing this issue for now. Feel free to create a new one if you are still facing problem with the latest version.