Closed kealjones-wk closed 4 years ago
@pauldemarco This is ready for your review, dart decided to change things on us so the old method no longer works for web projects, i am unsure about vm/flutter projects, but this PR should remove the issue for everyone hopefully. If you have any questions/concerns, let me know :) Thanks!
I'm just testing this against Remote Devtools and have found issues trying to get the Socket to connect on Mobile.
I believe Remote Devtools is currently broken on mobile platforms
@kealjones-wk I am about to make a PR to your fork which fixes the platform selection between web and dart.io - looks like it has been broken for a while. If you merge my PR into your branch, we should be good
@MichaelMarner got your changes merged in and tested on web all is well on my end, sorry again if my previous pr unknowingly broke your repo MichaelMarner/dart-redux-remote-devtools, haha that was the opposite of what I wanted I was trying to make it usable for dart web projects with Workiva/over_react. We've got a react-redux wrapper in the works and your lib + this are essential to the dev flow :)
This should be fine to merge now - I have verified it still works in Flutter mobile, and @kealjones-wk has verified things work in web.
LGTM
New version 0.2.0 has been published to pubdev. https://pub.dev/packages/socketcluster_client
Issue
An issue was discovered today that prevents socketcluster_client from being used with js/web based projects due to dart 2 now rejecting
import 'dart:io';
being in a web project at all even when only being imported transitively and no code for it was executed, which was previously done in order to use theIoSocketPlatform
type insocket.dart
.Fix
dart:io
anddart:html
import containing files behind conditional imports.SocketPlatform
and other Base Types into separateinterface
class so they can be used for type checking._globalSocketPlatform
through a conditional importRuntimeSocketPlatform
constant in the respective file, this makes the platform be auto configured!globalSocketPlatform = httpSocketPlatform;
as the conditional import does this for them.QA