diff --git a/packages/hms_room_kit/lib/src/hmssdk_interactor.dart b/packages/hms_room_kit/lib/src/hmssdk_interactor.dart index 558007313..ed488778c 100644 --- a/packages/hms_room_kit/lib/src/hmssdk_interactor.dart +++ b/packages/hms_room_kit/lib/src/hmssdk_interactor.dart @@ -164,7 +164,7 @@ class HMSSDKInteractor { Future getPeer({required String peerId}) async { List? peers = await hmsSDK.getPeers(); - return peers?.firstWhere((element) => element.peerId == peerId); + return peers.firstWhere((element) => element.peerId == peerId); } void changeTrackState(HMSTrack forRemoteTrack, bool mute, diff --git a/packages/hms_room_kit/lib/src/meeting/meeting_store.dart b/packages/hms_room_kit/lib/src/meeting/meeting_store.dart index e2e081e0f..81afa717e 100644 --- a/packages/hms_room_kit/lib/src/meeting/meeting_store.dart +++ b/packages/hms_room_kit/lib/src/meeting/meeting_store.dart @@ -710,7 +710,7 @@ class MeetingStore extends ChangeNotifier peerListIterators.clear(); List? offStageRoles = HMSRoomLayout.roleLayoutData?.screens ?.conferencing?.defaultConf?.elements?.onStageExp?.offStageRoles; - offStageRoles?.forEach((role) async { + offStageRoles.forEach((role) async { var peerListIterator = await _hmsSDKInteractor.getPeerListIterator( peerListIteratorOptions: PeerListIteratorOptions(limit: 10, byRoleName: role)); diff --git a/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_bottom_sheet.dart b/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_bottom_sheet.dart index 858278a11..902515cb1 100644 --- a/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_bottom_sheet.dart +++ b/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_bottom_sheet.dart @@ -114,7 +114,7 @@ class _ParticipantsBottomSheetState extends State { if (isOnStageRole) { if (peer.metadata != null) { String? peerMetadata = peer.metadata; - if (peerMetadata?.contains("prevRole") ?? false) { + if (peerMetadata.contains("prevRole") ?? false) { String? previousRole = jsonDecode(peer.metadata!)["prevRole"]; if (previousRole != null) { diff --git a/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_view_all_bottom_sheet.dart b/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_view_all_bottom_sheet.dart index 2a0ecb79e..967213563 100644 --- a/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_view_all_bottom_sheet.dart +++ b/packages/hms_room_kit/lib/src/widgets/bottom_sheets/participants_view_all_bottom_sheet.dart @@ -107,7 +107,7 @@ class _ParticipantsViewAllBottomSheetState if (isOnStageRole) { if (peer.metadata != null) { String? peerMetadata = peer.metadata; - if (peerMetadata?.contains("prevRole") ?? false) { + if (peerMetadata.contains("prevRole") ?? false) { String? previousRole = jsonDecode(peer.metadata!)["prevRole"]; if (previousRole != null) {