-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Small cyan box when rendering big html files #535
Comments
If the content is big and taking time then I would suggest rendering it in async way.
|
Gonna give it a try! Thank you! |
You are running on Flutter web? I believe the async builder doesn't work properly on web due to JS worker limitation on browser, see this https://html-widget-demo.vercel.app/#/hugehtml. But it shouldn't show any box anyway. That's weird. Do you have a screenshot? |
It is Flutter Web, with the async implementation it is showing this error:
Check this video to see the box I was thinking in something on my end, but only long html produces it. |
Ah that blue dot is part of the progress indicator. As I said, JS worker limitation prevents the async builder from working properly so it shows the progress indicator but the thread is busy so it can't rotate properly. There is not much to be done about this... It's possible to show a static text instead of the indicator though. It would be a better user experience. I try to avoid bundling text though, to avoid dealing with app localization issues. |
Hi, thanks for the response. It is doable to have a loading widget as param (child)? That way anyone can modify how the replacement of that square is going to be. For now I just tricked it with a stack with a widget that is above that little square and later disappears hehe. Thank you, the library is awesome! |
Yes, you can specify an async builder like this: HtmlWidget(
html,
buildAsyncBuilder: (_, snapshot) => snapshot.data ?? Text('Loading...'),
); |
The problem is that i'm using Web, but I saw a new issue reported by you so i'm going to wait to that implementation, it is not critical for now. |
Steps to Reproduce
HTML
An html with 600 lines with just div, p and h3.`HtmlWidget` configuration
Tesing environment
Expected results
Do not add any visible element when the content is being parsed, this does not happen on a small file.
Actual results
A little cyan box like 10px x 10px appears when package is parsing HTML when the HTML content is big.
The text was updated successfully, but these errors were encountered: