Skip to content

Commit

Permalink
fixed lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ygit committed Oct 30, 2023
1 parent 811d631 commit 2f73cbe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/hms_room_kit/lib/src/hmssdk_interactor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class HMSSDKInteractor {
}

Future<HMSPeer?> getPeer({required String peerId}) async {
List<HMSPeer>? peers = await hmsSDK.getPeers();
List<HMSPeer> peers = await hmsSDK.getPeers() ?? [];

return peers.firstWhere((element) => element.peerId == peerId);
}
Expand Down
5 changes: 3 additions & 2 deletions packages/hms_room_kit/lib/src/meeting/meeting_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,9 @@ class MeetingStore extends ChangeNotifier
}
log("Calling refresh PeerList Method $peerListIterators");
peerListIterators.clear();
List<String>? offStageRoles = HMSRoomLayout.roleLayoutData?.screens
?.conferencing?.defaultConf?.elements?.onStageExp?.offStageRoles;
List<String> offStageRoles = HMSRoomLayout.roleLayoutData?.screens
?.conferencing?.defaultConf?.elements?.onStageExp?.offStageRoles ??
[];
offStageRoles.forEach((role) async {
var peerListIterator = await _hmsSDKInteractor.getPeerListIterator(
peerListIteratorOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class _ParticipantsBottomSheetState extends State<ParticipantsBottomSheet> {
///which will be used while removing the peer from stage
if (isOnStageRole) {
if (peer.metadata != null) {
String? peerMetadata = peer.metadata;
if (peerMetadata.contains("prevRole") ?? false) {
String peerMetadata = peer.metadata!;
if (peerMetadata.contains("prevRole")) {
String? previousRole =
jsonDecode(peer.metadata!)["prevRole"];
if (previousRole != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ class _ParticipantsViewAllBottomSheetState
///which will be used while removing the peer from stage
if (isOnStageRole) {
if (peer.metadata != null) {
String? peerMetadata = peer.metadata;
if (peerMetadata.contains("prevRole") ?? false) {
String peerMetadata = peer.metadata!;
if (peerMetadata.contains("prevRole")) {
String? previousRole =
jsonDecode(peer.metadata!)["prevRole"];
if (previousRole != null) {
Expand Down

0 comments on commit 2f73cbe

Please sign in to comment.