Closed kealjones-wk closed 5 years ago
@pauldemarco Just curious if you've seen this yet. :)
I’ll take a look, thanks!
no rush, i can always just fork this while this is in review, I was just hoping to contribute to everyone's benefit.
This all looks good to me!
Also, love that this is being used in the remote devtools, that's super cool!
Could this also be published to pub.dev? Latest version is still 0.0.3:
https://pub.dev/packages/socketcluster_client
I can then update the devtools dependency.
Thanks
Motivation
This repo currently only worked for io based projects meaning that it could not be used in a browser. This project also happens to be the main websocket connection method used by https://github.com/MichaelMarner/dart-redux-remote-devtools which we would like to take advantage of in the browser.
Changes
Socket
class, defaults todart:io
's WebSocket.Socket
class logic to useglobalSocketPlatform
in order to allow platform specific logicThis update allows users who would like to use the html based websocket to do so by simply adding:
and then in main adding:
Review
globalSocketPlatform
usage works as intended@pauldemarco I would love your feedback on this PR. If you have any issue with its approach please let me know and i would be happy to discuss. My teammates will also be reviewing to double check my work.