daohoangson / flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.
https://pub.dev/packages/flutter_widget_from_html
MIT License
614 stars 226 forks source link

About width of the HtmlWidget. shrinkWrap=true not working! #1151

Open reforge42 opened 7 months ago

reforge42 commented 7 months ago

I want the width of the HtmlWidget to follow the width of the content, and I will set the maximum width in the parent Widget. but i did not find how to do it! I tried to set shrinkWrap = true in ListViewMode(), but not working!

daohoangson commented 7 months ago

shrinkWrap deals with height more than width. What is your HTML? Can you share the current screenshot? And maybe describe how you want to change it?

reforge42 commented 7 months ago

Xnip2024-01-12_12-27-13 it will expand

reforge42 commented 7 months ago

Xnip2024-01-12_12-27-13 i will expand

the html is

What do u think about m2

MahanRahmati commented 3 weeks ago

I have a similar problem.

Screenshot 2024-08-02 at 20 12 46
HtmlWidget('<p>test </p>')
Negrig commented 2 weeks ago

Same problem. Any updates?

image

LimitedBox(maxWidth: 200, child: HtmlWidget('<p>html message</p>'),