updates #400

Merged
Haroon6138 merged 1 commits from haroon_dev into master 1 day ago

@ -210,7 +210,7 @@ class ApiClientImp implements ApiClient {
}
// body['TokenID'] = "@dm!n";
// body['PatientID'] = 2101020;
// body['PatientID'] = 1018977;
// body['PatientID'] = 53320;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;

@ -317,7 +317,6 @@ class PushNotificationHandler {
final voIPKit = FlutterIOSVoIPKit.instance;
late Timer timeOutTimer;
bool isTalking = false;
var data = {
@ -390,9 +389,7 @@ class PushNotificationHandler {
try {
log('🎈 example: onDidRejectIncomingCall $uuid - $callerId');
await voIPKit.endCall();
await voIPKit.dispose();
await FlutterCallkitIncoming.endAllCalls();
timeOutTimer.cancel();
// Cleanup on reject with API call
if (_currentCallId != null) {
await _endCallAndCleanup(_currentCallId!, isDeclined: true);
@ -410,7 +407,7 @@ class PushNotificationHandler {
String zoomSessionID = callerId.split("_").sublist(0, callerId.split("_").length - 1).join("_");
await voIPKit.acceptIncomingCall(callerState: CallStateType.idle);
await voIPKit.acceptIncomingCall(callerState: CallStateType.calling);
await voIPKit.callConnected();
// Cleanup on accept - cancel timer and reset flags
@ -418,16 +415,15 @@ class PushNotificationHandler {
_callTimeoutTimer = null;
_isCallInProgress = false;
_currentCallId = null;
await Future.delayed(Duration(milliseconds: 1500)).then((val) async {
await Future.delayed(Duration(milliseconds: 2000)).then((val) async {
await voIPKit.endCall();
await voIPKit.dispose();
await FlutterCallkitIncoming.endAllCalls();
});
await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, zoomSessionID);
Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall);
Navigator.of(GetIt.instance<NavigationService>().navigatorKey.currentContext!).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation())));
// Navigator.of(GetIt.instance<NavigationService>().navigatorKey.currentContext!).pushReplacement(FadePage(page: SplashAnimationScreen(routeWidget: LandingNavigation())));
Navigator.pushReplacementNamed(
// context,
GetIt.instance<NavigationService>().navigatorKey.currentContext!,

@ -170,7 +170,7 @@ class _LandingPageState extends State<LandingPage> {
emergencyServicesViewModel.checkPatientERAdvanceBalance();
// myAppointmentsViewModel.getPatientAppointmentQueueDetails();
notificationsViewModel.initNotificationsViewModel();
medicalFileViewModel.getPatientAllergiesList();
// medicalFileViewModel.getPatientAllergiesList();
if (Utils.havePrivilege(122)) {
insuranceViewModel.initInsuranceProvider(isFromHomePage: true);
@ -292,7 +292,7 @@ class _LandingPageState extends State<LandingPage> {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false, isForTimeLine: true);
medicalFileViewModel.getPatientAllergiesList();
medicalFileViewModel.getPatientAllergiesList();
// Refresh Appointments Data
// habibWalletVM.initHabibWalletProvider();
// habibWalletVM.getPatientBalanceAmount();
@ -312,6 +312,7 @@ class _LandingPageState extends State<LandingPage> {
// appointmentRatingViewModel.getAppointmentDetails(
// appointmentRatingViewModel.appointmentRatedList.last.appointmentNo!,
// appointmentRatingViewModel.appointmentRatedList.last.projectID!,
// appointmentRatingViewModel.appointmentRatedList.last.clinicID!,
// onSuccess: ((response) {
// appointmentRatingViewModel.setClinicOrDoctor(false);
// appointmentRatingViewModel.setTitle(LocaleKeys.rateDoctor.tr(context: context));

@ -327,6 +327,9 @@ class _CallScreenState extends State<CallScreen> {
// If no remote users remain, the other participant has left — end the session
if (remoteUserList == null || remoteUserList.isEmpty) {
if (Platform.isIOS) {
await voIPKit.endCall();
}
await zoom.leaveSession(true);
final navContext = GetIt.instance<NavigationService>().navigatorKey.currentContext;
if (navContext != null && Navigator.canPop(navContext)) {
@ -1297,6 +1300,9 @@ class _CallScreenState extends State<CallScreen> {
// }
void onLeaveSession(bool isEndSession) async {
if (Platform.isIOS) {
await voIPKit.endCall();
}
await zoom.leaveSession(isEndSession);
Navigator.pushAndRemoveUntil(
context,
@ -1547,7 +1553,7 @@ class _CallScreenState extends State<CallScreen> {
multiCameraIndex: "0",
videoAspect: VideoAspect.Original,
fullScreen: false,
resolution: VideoResolution.Resolution180,
resolution: VideoResolution.Resolution720,
),
),
);

Loading…
Cancel
Save