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

final List<Stream<Object>> streams = [] error valid range #75

Open
AtrasM opened this issue Jan 13, 2024 · 1 comment
Open

final List<Stream<Object>> streams = [] error valid range #75

AtrasM opened this issue Jan 13, 2024 · 1 comment

Comments

@AtrasM
Copy link

AtrasM commented Jan 13, 2024

signalr netcore 1.3.6
hello.
in hub_connection class and in method _replaceStreamingParams and another method created the variable as this format:
final List<Stream> streams = [];
and the next line call streams[streamId].
this line errored: RangeError (index): Valid value range is empty: 1.
Because the streams variable is empety list and no item has been added to it yet, and it is not even growable.
you must make streams variable like this:
final List<Stream> streams = List.empty(growable: true);
and Instead streams[streamId] set streams.add.

@tobsil
Copy link

tobsil commented Oct 31, 2024

Hi,
this should be fixed with this pull request: #99

greetings

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

2 participants