From 408d47f3b1767514a445a5b569914792f7a62316 Mon Sep 17 00:00:00 2001 From: Tran Thai Tuan Date: Mon, 16 Dec 2024 22:50:47 +0700 Subject: [PATCH 1/2] fix: can not run in android --- lib/core/api/base/dio_configuration.dart | 6 ++++-- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core/api/base/dio_configuration.dart b/lib/core/api/base/dio_configuration.dart index 015d3fb..4e618fb 100644 --- a/lib/core/api/base/dio_configuration.dart +++ b/lib/core/api/base/dio_configuration.dart @@ -37,8 +37,10 @@ class DioConfiguration { await Rhttp.init(); final rhttpAdapter = await RhttpCompatibleClient.create( settings: ClientSettings( - timeout: 10.seconds, - connectTimeout: 10.seconds, + timeoutSettings: TimeoutSettings( + timeout: 10.seconds, + connectTimeout: 10.seconds, + ), throwOnStatusCode: false, ), ); diff --git a/pubspec.yaml b/pubspec.yaml index 99478d6..4b8e219 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: # Network connectivity_plus: ^6.0.5 - rhttp: ^0.6.1 + rhttp: ^0.9.8 http: ^1.2.2 dio: ^5.6.0 dio_smart_retry: ^6.0.0 From 6e49a53e3fe621c1fa3dfd8fe6748d17a24c8a4c Mon Sep 17 00:00:00 2001 From: Tran Thai Tuan Date: Sun, 22 Dec 2024 02:37:08 +0700 Subject: [PATCH 2/2] chore: downgrade get it --- lib/waterbus_sdk_impl.dart | 12 ++++++++---- pubspec.yaml | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/waterbus_sdk_impl.dart b/lib/waterbus_sdk_impl.dart index ad3a26c..c3d254d 100644 --- a/lib/waterbus_sdk_impl.dart +++ b/lib/waterbus_sdk_impl.dart @@ -117,8 +117,10 @@ class SdkCore extends WaterbusSdkInterface { ); } - if (room.value != null) { - final Meeting meeting = room.value!; + if (room.isSuccess) { + final Meeting? meeting = room.value; + + if (meeting == null) return Result.failure(room.error ?? ServerFailure()); final int mParticipantIndex = meeting.participants.lastIndexWhere( (participant) => participant.isMe, @@ -137,9 +139,11 @@ class SdkCore extends WaterbusSdkInterface { .toList(); _subscribe(targetIds); - } - return Result.success(meeting); + return Result.success(meeting); + } else { + return Result.failure(room.error ?? ServerFailure()); + } } @override diff --git a/pubspec.yaml b/pubspec.yaml index 3b63174..4672e9c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,8 @@ dependencies: # path: /Users/lambiengcode/Documents/waterbus/flutter-webrtc-plus # Dependency Injection - get_it: ^8.0.3 + get_it: ^7.6.8 + injectable: ^2.4.4 dev_dependencies: