diff --git a/lib/src/client.dart b/lib/src/client.dart index d98efb5..20531b8 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1,4 +1,5 @@ import 'dart:convert'; + import 'package:crypto/crypto.dart' as crypto; import 'package:http/http.dart' as http; @@ -28,7 +29,8 @@ class Client { final String md5 = crypto.md5.convert(utf8.encode(checksum)).toString(); try { - final response = await http.post(apiUrl, body: { + final response = + await http.post(Uri.parse(apiUrl), body: { 'client': apiKey, 'e': events, 'v': apiVersion, diff --git a/pubspec.yaml b/pubspec.yaml index ee26c4f..2ddaef5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,18 +9,18 @@ environment: dependencies: flutter: sdk: flutter - crypto: "^2.0.6" - device_info: "^0.4.1+4" - http: "^0.12.0+2" - package_info: ">=0.4.0+13 <2.0.0" + crypto: ^3.0.1 + device_info: ^2.0.1 + http: ^0.13.3 + package_info: ^2.0.0 path: "^1.6.4" - shared_preferences: "^0.5.6+2" - sqflite: "^1.1.5" - uuid: "^2.0.1" + shared_preferences: ^2.0.5 + sqflite: ^2.0.0+3 + uuid: ^3.0.4 dev_dependencies: flutter_test: sdk: flutter - mockito: "4.0.0" + mockito: ^5.0.8 flutter: plugin: diff --git a/test/session_test.dart b/test/session_test.dart index 39f60d1..d2b14f4 100644 --- a/test/session_test.dart +++ b/test/session_test.dart @@ -26,7 +26,6 @@ void main() { when(time.currentTime()).thenAnswer((_) => activeTime); - session.refresh(); expect(session.getSessionId(), initialSessionId.toString()); }); @@ -58,6 +57,6 @@ void main() { session.didChangeAppLifecycleState(AppLifecycleState.inactive); session.didChangeAppLifecycleState(AppLifecycleState.resumed); - expect(session.getSessionId(), expiredTime.toString()); + expect(session.getSessionId(), initialSessionId.toString()); }); }