Skip to content

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

@IgorMatias3

Description

@IgorMatias3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions