Closed rmasarovic closed 1 year ago
Thx for feedback, please upgrade to version 1.13.1
, or pull the latest code.
i try it and when i using mouse wheel this index dont work
firstChild.index -- 51 displaying -- [51, 52, 53, 54, 55, 56, 57, 58] item - 51 - -8.336594410433463 - 474.33659441043346 item - 52 - 46.66340558956654 - 389.33659441043346 item - 53 - 131.66340558956654 - 334.33659441043346 item - 54 - 186.66340558956654 - 249.33659441043346 item - 55 - 271.66340558956654 - 194.33659441043346 item - 56 - 326.66340558956654 - 109.33659441043346 item - 57 - 411.66340558956654 - 54.33659441043346 item - 58 - 466.66340558956654 - -30.663405589566537
It works fine on macos, this problem seems to only occur on windows. 🧐
hm i try it on mac and some
i think this edge-case depence when use mouse wheel scroller
I have tried to fix this problem on the fix_observe_web
branch and tested it, you can try it again after pulling the code.
I tried it and out of 100 attempts, it failed 1 time, but I haven't find the pattern yet, but still it's perfect now.
What else did I notice when I scroll a lot and then I go away from the page, the observer keeps printing values to console. it normal behavior?
Yes, this is normal behavior, because there was a lot of printing in the Example, and the IDE did not process it in time.
This bug is caused by scrolling in Flutter Web with mouse wheel is not smooth.
Related issues:
The problem has not been solved yet, so for now, i use delay
to solve it.
The key code is here: observer_widget.dart#L148
Future.delayed(const Duration(microseconds: 1), () {
Could you please replace microseconds
with milliseconds
in this line of code, and try it again?
Future.delayed(const Duration(milliseconds: 1), () {
i try it and maybe this is the best solution for now
Thank you, version 1.13.2
has been released to fix the above issues.
Hi i try your example and when i scroll fast with mouse on web i see different item on screen and different values are printing on observer update
this is screen
and this is last print on console firstChild.index -- 14 displaying -- [14] item - 14 - -20 - 456 visible -- true firstChild.index -- 24 displaying -- [24] item - 24 - -20 - 456
any idea what is wrong?