signalr_client icon indicating copy to clipboard operation
signalr_client copied to clipboard

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

Open AtrasM opened this issue 1 year ago • 1 comments

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<Object>> 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<Object>> streams = List.empty(growable: true); and Instead streams[streamId] set streams.add.

AtrasM avatar Jan 13 '24 08:01 AtrasM

Hi, this should be fixed with this pull request: https://github.com/sefidgaran/signalr_client/pull/99

greetings

tobsil avatar Oct 31 '24 14:10 tobsil