Skip to content

Make pub analyzer happy #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lib/src/network/parse_live_query_web.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:convert';
import 'dart:html';
// ignore: uri_does_not_exist
import 'dart:html' as HTML;

import '../../parse_server_sdk.dart';

Expand All @@ -18,7 +19,7 @@ class LiveQuery {
autoSendSessionId ?? ParseCoreData().autoSendSessionId ?? true;
}

WebSocket _webSocket;
HTML.WebSocket _webSocket;
ParseHTTPClient _client;
bool _debug;
bool _sendSessionId;
Expand Down Expand Up @@ -64,10 +65,10 @@ class LiveQuery {
final int requestId = _requestIdGenerator();

try {
_webSocket = WebSocket(_liveQueryURL);
_webSocket = HTML.WebSocket(_liveQueryURL);
await _webSocket.onOpen.first;

if (_webSocket != null && _webSocket.readyState == WebSocket.OPEN) {
if (_webSocket != null && _webSocket.readyState == HTML.WebSocket.OPEN) {
if (_debug) {
print('$_printConstLiveQuery: Socket opened');
}
Expand All @@ -78,7 +79,7 @@ class LiveQuery {
}
}

_webSocket.onMessage.listen((MessageEvent e) {
_webSocket.onMessage.listen((HTML.MessageEvent e) {
final dynamic message = e.data;
if (_debug) {
print('$_printConstLiveQuery: Listen: $message');
Expand Down Expand Up @@ -169,7 +170,7 @@ class LiveQuery {
}

Future<void> unSubscribe() async {
if (_webSocket != null && _webSocket.readyState == WebSocket.OPEN) {
if (_webSocket != null && _webSocket.readyState == HTML.WebSocket.OPEN) {
_webSocket.sendString(jsonEncode(_unsubscribeMessage));
if (_debug) {
print('$_printConstLiveQuery: Socket closed');
Expand Down