-
-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad state: No element #569
Comments
Duplicate of #554? What version of flutter_html ar eyou using? |
@erickok Maybe, not sure.
and
|
i face the same issue after upgrading to flutter 2.0.0, try downgrade your flutter version to previous stable version 1.22.6. It works fine at 1.22.6 |
@Mattjevaas Can you specify which version to use? I got error :(
|
@roeniss change to flutter_html: ^1.2.0 on your pubspec.yaml, then do pub get here is mine
|
Yes this is a duplicate of #554, I just tested on my nullsafety branch and I do not get this error. If you'd like you can use master in your pubspec or wait for a new version of the package, and this will be fixed. |
Ok. now it works. Thank you @Mattjevaas and @tneotia ! BTW I still got two questions....
|
|
@tneotia are you sure it fixed? i change my pubspec to master and still got the issue, or am i do wrong here? here is my html
Note :
|
@roeniss actually there is no need to downgrade your flutter version XD, you can use flutter 2.0.+, just change the flutter_html verison to 1.2.0 without ^ to force using 1.2.0. like this
i just tested it, sorry |
@Mattjevaas hm can I get your full HTML to try and reproduce this? With @roeniss HTML it works great. |
@tneotia here is my full HTML
|
This is different from @roeniss issue, I think the CSS parser is having issues with parsing your font family due to the duplicate quotes ("font-family: "stuff";") as it returns an empty list causing the bad state error. This is pretty easy to fix with a catch so I've included it with the nullsafety PR. |
Ah thanks @tneotia ! It works now 😄 |
@erickok this can be closed once 2.0.0 is out. |
Please try 2.0.0-nullsafety.0 which is out now. |
I failed to parse html, but can't figure out why it happens because there are few log to check out.
When I tried to
Html(data: thatHtml)
, my console:It would be great if there are more detailed error log. Or am I missing something?
Actually this is pretty serious because I can't catch it before rendering:
Above trycatch doesn't catch the exception.
The text was updated successfully, but these errors were encountered: