sefidgaran / signalr_client

A Flutter SignalR Client for ASP.NET Core
https://pub.dev/packages/signalr_netcore
MIT License
71 stars 111 forks source link

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

Open AtrasM opened 7 months ago

AtrasM commented 7 months ago

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.