Skip to content

Commit

Permalink
chore: downgrade get it
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper985 committed Dec 21, 2024
1 parent ae069a3 commit 6e49a53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions lib/waterbus_sdk_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6e49a53

Please sign in to comment.