Skip to content

Commit fbbdadd

Browse files
rostopiraphillwiggins
authored andcommitted
Make pub analyzer happy (#257)
1 parent df1ad5e commit fbbdadd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/src/network/parse_live_query_web.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:convert';
2-
import 'dart:html';
2+
// ignore: uri_does_not_exist
3+
import 'dart:html' as HTML;
34

45
import '../../parse_server_sdk.dart';
56

@@ -18,7 +19,7 @@ class LiveQuery {
1819
autoSendSessionId ?? ParseCoreData().autoSendSessionId ?? true;
1920
}
2021

21-
WebSocket _webSocket;
22+
HTML.WebSocket _webSocket;
2223
ParseHTTPClient _client;
2324
bool _debug;
2425
bool _sendSessionId;
@@ -64,10 +65,10 @@ class LiveQuery {
6465
final int requestId = _requestIdGenerator();
6566

6667
try {
67-
_webSocket = WebSocket(_liveQueryURL);
68+
_webSocket = HTML.WebSocket(_liveQueryURL);
6869
await _webSocket.onOpen.first;
6970

70-
if (_webSocket != null && _webSocket.readyState == WebSocket.OPEN) {
71+
if (_webSocket != null && _webSocket.readyState == HTML.WebSocket.OPEN) {
7172
if (_debug) {
7273
print('$_printConstLiveQuery: Socket opened');
7374
}
@@ -78,7 +79,7 @@ class LiveQuery {
7879
}
7980
}
8081

81-
_webSocket.onMessage.listen((MessageEvent e) {
82+
_webSocket.onMessage.listen((HTML.MessageEvent e) {
8283
final dynamic message = e.data;
8384
if (_debug) {
8485
print('$_printConstLiveQuery: Listen: $message');
@@ -169,7 +170,7 @@ class LiveQuery {
169170
}
170171

171172
Future<void> unSubscribe() async {
172-
if (_webSocket != null && _webSocket.readyState == WebSocket.OPEN) {
173+
if (_webSocket != null && _webSocket.readyState == HTML.WebSocket.OPEN) {
173174
_webSocket.sendString(jsonEncode(_unsubscribeMessage));
174175
if (_debug) {
175176
print('$_printConstLiveQuery: Socket closed');

0 commit comments

Comments
 (0)