Closed mikeesouth closed 3 years ago
Hi @mikeesouth , Thanks for the PR. I managed to review and merge this PR then I published it but the problem is in the pub.dev its says that its compatible only with Web. image below: Can you please check this issue. Thanks
@sefidgaran Sorry for that, I had no idea that pub.dev would react like that. The import ofr http_client_browser is conditional and is only imported for web projects so the code fully supports iOS and Android even though pub.dev says it doesn't. I think we can just circumvent this by using "Client()" for both native and web projects, so remove the http_client_browser file. I can submit a new PR. But I'm curious what differs between this library and https://pub.dev/packages/signalr_core ? Maybe we should just switch to that library instead?
I will include this commit in the PR and it's not code that I'm very proud of: https://github.com/kattalo/signalr_client/commit/669084fb9e6a9bd2fc8f1691a581fee2f796c602 It's just a quick fix to get rid of "completer already completed" exceptions that could occur in different parts of the code.
If you have good reasons to why this library should be used instead of https://pub.dev/packages/signalr_core, then I can put time into improving the completer code to be more robust.
Maybe it's better for you to just revert my previous PR and add web support yourself, if you still want to maintain this repo.
New PR up, I hope that it solves the pub.dev issue: https://github.com/sefidgaran/signalr_client/pull/7
I haven't fixed/verified the tests. It wasn't as easy as "flutter test" so I didn't put time into it (yet). I can do that if the tests fail and if the author wants to merge this PR.