-
Notifications
You must be signed in to change notification settings - Fork 503
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
Got NaN exception when first time scrolling to beginning or end of list #173
Comments
I am using "scrollable_positioned_list: ^0.1.7" |
I had the same problem in my project and was able to fix this in this PR (#180), but then I tried to reproduce this issue in the sample to create a test of this fix, but was not able to do this. @JmyW can you share your reproduce example or at least test my fix in your project?
|
It's weird, I took 3 hours tried previous version I did backup. I cannot reproduce it any more. I'm sorry I couldn't confirm it for you. |
@JmyW I thinks that the issue is in package : scrollable_positioned_list |
I have the same issue. Version 0.1.8. Steps:
|
which version of scrollable_positioned_list u r using ? |
I used 0.1.7 for issue creation and retest with same version, no change. |
Oops, I think you were asking @shushper |
Also @shushper could you check if my fix work as described here: #173 (comment) |
@justkawal I am using a 0.1.8 version. @mig35 Yes, your fix works because I made the same fix by myself and it helped. The reason for the issue is that through the computation of itemOffset in
When the issue occurs my logs are:
So it seems like we should prevent the |
Does someone have a public project where this can be repo'd? I've been trying with this one https://github.com/tarobins/spl_example_wrapper but no luck yet. |
It's happened the following exception at first time scrolling to beginning or end of list.
Steps:
or Swipe left to scroll to the end of list
════════ Exception caught by scheduler library ═════════════════════════════════════════════════════
The following UnsupportedError was thrown during a scheduler callback:
Unsupported operation: Infinity or NaN toInt
When the exception was thrown, this was the stack:
#0 double.toInt (dart:core-patch/double.dart:192:36)
#1 double.round (dart:core-patch/double.dart:160:34)
#2 _PositionedListState._schedulePositionNotificationUpdate. (package:scrollable_positioned_list/src/positioned_list.dart:334:26)
#3 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1116:15)
#4 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1063:9)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered: