Skip to content
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

RangeError (index): Invalid value: Not in inclusive range (iOS) #53

Open
Hassanmohsaid opened this issue Apr 13, 2022 · 0 comments
Open

Comments

@Hassanmohsaid
Copy link

Whenever I scroll to the top of the country list an exception always happens in iOS which is:

RangeError (index): Invalid value: Not in inclusive range 0..241: -3

I traced the code and found that the problem is in selection_list.dart line 305:

String? countryName = countries.elementAt(scrollPosition).name;

when scrollPosition is a negative number.

Fix:

Change the condition in line 304 to:

if (scrollPosition < countries.length && scrollPosition >= 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant