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

PictureSequenceMemory activity crashes after two rounds with 6 images each #23

Open
IgorMatias3 opened this issue Feb 19, 2024 · 0 comments

Comments

@IgorMatias3
Copy link
Contributor

The output of the debug console is this:

E/flutter (19446): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (index): Invalid value: Not in inclusive range 0..12: 13 E/flutter (19446): #0 List.[] (dart:core-patch/growable_array.dart:264:36) E/flutter (19446): #1 PictureSequenceMemoryState.getPictures.<anonymous closure> (package:cognition_package/src/ui/ActivityBody/rpui_picture_sequence_memory_activity_body.dart:250:30)

What is happening is that the available images URL are 12, but in

List<Picture> getPictures(int start, int end, int num) => List.generate( num, (index) => Picture( name: index.toString(), urlImage: urlImages[index + start], ), );

the urlImages is being asked for the position 13, which does not exist.

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