diff --git a/packages/dart/lib/src/network/parse_live_query.dart b/packages/dart/lib/src/network/parse_live_query.dart index 8778c0e0..992932ae 100644 --- a/packages/dart/lib/src/network/parse_live_query.dart +++ b/packages/dart/lib/src/network/parse_live_query.dart @@ -36,10 +36,10 @@ enum LiveQueryClientEvent { connected, disconnected, userDisconnected } class LiveQueryReconnectingController { LiveQueryReconnectingController( - this._reconnect, - this._eventStream, - this.debug, - ) { + this._reconnect, + this._eventStream, + this.debug, + ) { final ParseConnectivityProvider? connectivityProvider = ParseCoreData().connectivityProvider; if (connectivityProvider != null) { @@ -113,9 +113,9 @@ class LiveQueryReconnectingController { retryInterval[_retryState] >= 0) { _currentTimer = Timer(Duration(milliseconds: retryInterval[_retryState]), () { - _currentTimer = null; - _reconnect(); - }); + _currentTimer = null; + _reconnect(); + }); if (debug) { print('$debugTag: Retry timer set to ${retryInterval[_retryState]}ms'); } @@ -139,7 +139,7 @@ class LiveQueryClient { _sendSessionId = autoSendSessionId ?? ParseCoreData().autoSendSessionId; reconnectingController = LiveQueryReconnectingController( - () => reconnect(userInitialized: false), getClientEventStream, _debug); + () => reconnect(userInitialized: false), getClientEventStream, _debug); } static LiveQueryClient get instance => _getInstance(); @@ -149,7 +149,7 @@ class LiveQueryClient { String? liveQueryURL = ParseCoreData().liveQueryURL; if (liveQueryURL == null) { assert(false, - 'liveQueryUrl is not set. For how to setup Live Queries, see https://github.com/parse-community/Parse-SDK-Flutter/tree/master/packages/flutter#live-queries.'); + 'liveQueryUrl is not set. For how to setup Live Queries, see https://github.com/parse-community/Parse-SDK-Flutter/tree/master/packages/flutter#live-queries.'); liveQueryURL = ""; } else { if (liveQueryURL.contains('https')) { @@ -228,11 +228,11 @@ class LiveQueryClient { {T? copyObject}) async { if (_webSocket == null) { await _clientEventStream.any((LiveQueryClientEvent event) => - event == LiveQueryClientEvent.connected); + event == LiveQueryClientEvent.connected); } final int requestId = _requestIdGenerator(); final Subscription subscription = - Subscription(query, requestId, copyObject: copyObject); + Subscription(query, requestId, copyObject: copyObject); _requestSubscription[requestId] = subscription; //After a client connects to the LiveQuery server, //it can send a subscribe message to subscribe a ParseQuery. @@ -273,7 +273,7 @@ class LiveQueryClient { try { parse_web_socket.WebSocket webSocket = - await parse_web_socket.WebSocket.connect(_liveQueryURL); + await parse_web_socket.WebSocket.connect(_liveQueryURL); _webSocket = webSocket; _connecting = false; if (webSocket.readyState == parse_web_socket.WebSocket.open) { @@ -431,11 +431,11 @@ class LiveQueryClient { if (className != null) { if (className == keyClassUser) { eventCallback((subscription.copyObject ?? - ParseCoreData.instance.createParseUser(null, null, null)) + ParseCoreData.instance.createParseUser(null, null, null)) .fromJson(map)); } else { eventCallback((subscription.copyObject ?? - ParseCoreData.instance.createObject(className)) + ParseCoreData.instance.createObject(className)) .fromJson(map)); } } @@ -458,4 +458,4 @@ class LiveQuery { bool? _debug; bool? _sendSessionId; late LiveQueryClient client; -} +} \ No newline at end of file diff --git a/packages/dart/pubspec.yaml b/packages/dart/pubspec.yaml index ae668f69..088dbe69 100644 --- a/packages/dart/pubspec.yaml +++ b/packages/dart/pubspec.yaml @@ -24,25 +24,25 @@ dependencies: # Networking dio: ^5.7.0 http: ^1.2.0 - web_socket_channel: ^2.4.3 + web_socket_channel: ^3.0.2 #Database - sembast: ^3.6.0 + sembast: ^3.8.2 sembast_web: ^2.2.0 # Utils uuid: ^4.5.1 meta: ^1.16.0 path: ^1.9.0 - mime: ^1.0.0 - timezone: ^0.9.4 + mime: ^2.0.0 + timezone: ^0.10.0 universal_io: ^2.2.2 xxtea: ^2.1.0 collection: ^1.18.0 cross_file: ^0.3.3+8 dev_dependencies: - lints: ^4.0.0 + lints: ^5.1.1 # Testing build_runner: ^2.4.9 diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 21f3d0a4..2c87fbd2 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -25,29 +25,29 @@ dependencies: flutter: sdk: flutter - parse_server_sdk: ^6.4.0 - # Uncomment for local testing - #parse_server_sdk: - # path: ../dart +# parse_server_sdk: ^8.0.0 +# Uncomment for local testing + parse_server_sdk: + path: ../dart # Networking connectivity_plus: ^6.0.3 #Database - shared_preferences: ^2.2.3 - sembast: ^3.6.0 + shared_preferences: ^2.5.2 + sembast: ^3.8.2 sembast_web: ^2.2.0 # Utils path_provider: ^2.1.4 - package_info_plus: ^5.0.1 + package_info_plus: ^8.3.0 path: ^1.8.3 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 path_provider_platform_interface: ^2.1.2 plugin_platform_interface: ^2.1.8