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

Alert colormap error #4

Open
fccoelho opened this issue Apr 16, 2021 · 1 comment
Open

Alert colormap error #4

fccoelho opened this issue Apr 16, 2021 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@fccoelho
Copy link
Contributor

alert levels vary from 1 to 4
colormap levels vary from 0 to 3
so when cities are in level 4 we get a RangeError

@fccoelho fccoelho added the bug Something isn't working label Apr 16, 2021
@fccoelho fccoelho self-assigned this Apr 16, 2021
@fccoelho
Copy link
Contributor Author

Actually the error is due to the colormap being cast to a List before it is indexed instead of being used directly as a Map.
this is the line that needs to be fixed:

color: alertColors.values.toList()[snapshot.data[2]

@fccoelho fccoelho added the good first issue Good for newcomers label Apr 16, 2021
@fccoelho fccoelho added this to the First Release milestone Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant