|
|
|
@ -17,6 +17,7 @@ import 'package:flutter_zoom_videosdk/native/zoom_videosdk_event_listener.dart';
|
|
|
|
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_live_transcription_message_info.dart';
|
|
|
|
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_live_transcription_message_info.dart';
|
|
|
|
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_share_action.dart';
|
|
|
|
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_share_action.dart';
|
|
|
|
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_user.dart';
|
|
|
|
import 'package:flutter_zoom_videosdk/native/zoom_videosdk_user.dart';
|
|
|
|
|
|
|
|
import 'package:get_it/get_it.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/app_export.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/cache_consts.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/cache_consts.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/jwt.dart';
|
|
|
|
import 'package:hmg_patient_app_new/core/utils/jwt.dart';
|
|
|
|
@ -26,6 +27,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/tele_consultation/zoom/video_view.dart';
|
|
|
|
import 'package:hmg_patient_app_new/presentation/tele_consultation/zoom/video_view.dart';
|
|
|
|
import 'package:hmg_patient_app_new/services/livecare_permission_service.dart';
|
|
|
|
import 'package:hmg_patient_app_new/services/livecare_permission_service.dart';
|
|
|
|
|
|
|
|
import 'package:hmg_patient_app_new/services/navigation_service.dart';
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
|
@ -326,12 +328,15 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
// If no remote users remain, the other participant has left — end the session
|
|
|
|
// If no remote users remain, the other participant has left — end the session
|
|
|
|
if (remoteUserList == null || remoteUserList.isEmpty) {
|
|
|
|
if (remoteUserList == null || remoteUserList.isEmpty) {
|
|
|
|
await zoom.leaveSession(true);
|
|
|
|
await zoom.leaveSession(true);
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
final navContext = GetIt.instance<NavigationService>().navigatorKey.currentContext;
|
|
|
|
context,
|
|
|
|
if (navContext != null && Navigator.canPop(navContext)) {
|
|
|
|
CustomPageRoute(
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
page: LandingNavigation(),
|
|
|
|
navContext,
|
|
|
|
),
|
|
|
|
CustomPageRoute(
|
|
|
|
(r) => false);
|
|
|
|
page: LandingNavigation(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
(r) => false);
|
|
|
|
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -522,15 +527,15 @@ class _CallScreenState extends State<CallScreen> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconnecting) {
|
|
|
|
if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconnecting) {
|
|
|
|
Timer(
|
|
|
|
// Timer(
|
|
|
|
const Duration(milliseconds: 1000),
|
|
|
|
// const Duration(milliseconds: 1000),
|
|
|
|
() => {
|
|
|
|
// () {
|
|
|
|
Navigator.popAndPushNamed(
|
|
|
|
// Navigator.popAndPushNamed(
|
|
|
|
context,
|
|
|
|
// context,
|
|
|
|
"Join",
|
|
|
|
// "Join",
|
|
|
|
arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role),
|
|
|
|
// arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role),
|
|
|
|
),
|
|
|
|
// );
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|