-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Add support for HtmlWidget.renderMode
#484
Conversation
Demo appDeployed 78b0aa6 to https://example-qcbruklwc-flutter-widget-from-html.vercel.app. Quick links: |
Codecov Report
@@ Coverage Diff @@
## next #484 +/- ##
==========================================
+ Coverage 97.94% 98.02% +0.08%
==========================================
Files 47 48 +1
Lines 3019 3145 +126
==========================================
+ Hits 2957 3083 +126
Misses 62 62
Continue to review full report at Codecov.
|
Check out this screen recording (demo_app, Android, release mode): https://youtu.be/5U10W0VJHOA
|
Looks really good :) The demo app with the huge html feels great. Thanks for this feature! |
fb7378c
to
20a3738
Compare
@DFelten yeah, the huge html is quite slow. There's probably some optimizations to make but it will still take some time in the end. |
@daohoangson I think the duration of 50 milliseconds looks better than 100. At least it feels better in my tests. One idea here would be to make the value overwritable from the outside. This way, everyone can adjust the value according to their own taste. |
In my testings, lowering the duration prevented it from working... That's why I kept it at 100ms. I'll do some more tests. Exposing the duration is possible but not ideal though, I want to avoid having a constructor with too many params. |
For me it also works at 30, but if I set the value too low, I also get an error. For example, a value of 10 will stop too early. The list of new indexes is built too late or the lists are still identical. But maybe it depends on how strong the device is and how slow it is when building the widgets. Couldn't the value rather be overwritten via the core Widget Factory? Then we don't need a larger constructor here either. |
I have just tested a little more. You are right, with a value of 50 it does not work with all articles. But even with 100 there are problems if the article is too long or there are too many images. But fortunately this happens only on the simulator. On the phone it's working with a duration of 50 and 100. |
The latest commit changed the way scrolling is done so it's much faster and more reliable. Please try it if you have a chance @DFelten. I think this PR is almost ready now, it maybe merged into |
The speed is so much better :) Thanks for the latest update, so this can definitely be merged. |
a1a6984
to
d155355
Compare
|
WidgetFactory breaking changes:
buildColumnPlaceholder
removedtrimMarginVertical
named parambuildColumnWidget
removedtsh
paramonTapAnchor
replacedanchorContext
param withscrollTo