fixes and updates.

dev_sultan
Sultan khan 11 hours ago
parent ce0eda7448
commit 9ff303d514

@ -51,12 +51,15 @@ _incomingCall(Map<String, dynamic> data) async {
// GetIt.instance<CacheService>().saveString(key: CacheConst.zoomRoomID, value: roomID);
// GetIt.instance<CacheService>().saveBool(key: CacheConst.isAppOpenedFromCall, value: true);
Utils.saveStringFromPrefs(CacheConst.zoomRoomID, roomID);
Utils.saveStringFromPrefs(CacheConst.callTypeID, callTypeID);
Utils.saveBoolFromPrefs(CacheConst.isAppOpenedFromCall, true);
await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, roomID);
await Utils.saveStringFromPrefs(CacheConst.callTypeID, callTypeID);
await Utils.saveBoolFromPrefs(CacheConst.isAppOpenedFromCall, true);
WidgetsFlutterBinding.ensureInitialized();
int callKitType = callTypeID == '2' ? 0 : 1;
var _currentUuid = Uuid().v4();
CallKitParams callKitParams = CallKitParams(
id: _currentUuid,
@ -64,7 +67,7 @@ _incomingCall(Map<String, dynamic> data) async {
appName: 'Dr Al Habib',
avatar: 'https://play-lh.googleusercontent.com/FBNNpxb7m6eM6wtW7MV1Ffp6OXOGLI38q47zcvP29OCYA1yhYH5mZzl5itZi0TgOyZpG',
// handle: LandingPage.incomingCallData.name,
type: 1,
type: callKitType,
textAccept: 'Accept',
textDecline: 'Decline',
missedCallNotification: NotificationParams(
@ -80,7 +83,11 @@ _incomingCall(Map<String, dynamic> data) async {
callbackText: 'Hang Up',
),
duration: 30000,
extra: <String, dynamic>{'userId': '1a2b3c4d'},
extra: <String, dynamic>{
'userId': '1a2b3c4d',
'callTypeID': callTypeID, // Store actual callTypeID here
'roomID': roomID, // Store roomID here for backup
},
headers: <String, dynamic>{'apiKey': 'Abc@123!', 'platform': 'flutter'},
android: const AndroidParams(
isImportant: true,

@ -151,7 +151,7 @@ class AppointmentDoctorCard extends StatelessWidget {
),
),
patientAppointmentHistoryResponseModel.isLiveCareAppointment! || patientAppointmentHistoryResponseModel.isClinicReBookingAllowed! || patientAppointmentHistoryResponseModel.isActiveDoctor! == false
patientAppointmentHistoryResponseModel.isLiveCareAppointment! || patientAppointmentHistoryResponseModel.isClinicReBookingAllowed! ==false || patientAppointmentHistoryResponseModel.isActiveDoctor! == false
? SizedBox.shrink()
: Utils.buildSvgWithAssets(icon: AppAssets.doctor_profile_icon, width: 20.h, height: 20.h, fit: BoxFit.scaleDown).onPress(() async {
DoctorsListResponseModel selectedDoctor = DoctorsListResponseModel();

@ -70,7 +70,8 @@ class LoginScreenState extends State<LoginScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.showLottie(context: context, assetPath: AppAnimations.login, width: 200.h, height: 200.h, repeat: true, fit: BoxFit.cover),
SizedBox(height: 130.h), // Adjusted to sizer unit
// SizedBox(height: 130.h),
SizedBox(height: MediaQuery.of(context).size.height * 0.12), // based on the screen height Adjusted to sizer unit
LocaleKeys.welcomeToDrSulaiman.tr(context: context).toText32(isBold: true, color: AppColors.textColor ),
SizedBox(height: 32.h),
Localizations.override(context: context, locale: Locale('en', 'US'), child: Container()), // Force English locale for this widget

@ -350,7 +350,8 @@ class _MedicalFileAppointmentCardState extends State<MedicalFileAppointmentCard>
),
SizedBox(height: 24.h),
// Countdown Timer - DD : HH : MM : SS format with labels
Row(
Directionality(
textDirection: ui.TextDirection.ltr, child:Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -378,7 +379,7 @@ class _MedicalFileAppointmentCardState extends State<MedicalFileAppointmentCard>
LocaleKeys.seconds.tr(context: context),
),
],
),
)),
SizedBox(height: 24.h),
// Green Acknowledge button with checkmark icon
CustomButton(

@ -80,7 +80,7 @@ class _TriagePageState extends State<TriagePage> {
}
// Case 2: Should stop flag is true OR Case 3: Probability >= 70% OR Case 4: 7 or more questions answered
if (viewModel.shouldStopTriage || highestProbability >= 70.0 || viewModel.triageQuestionCount >= 15) {
if (viewModel.shouldStopTriage || highestProbability >= 70.0 || viewModel.triageQuestionCount >= 30) {
// Navigate to results/possible conditions screen
context.navigateWithName(AppRoutes.possibleConditionsPage);
return;

@ -79,10 +79,9 @@ class _SplashScreenState extends State<SplashPage> {
}
navigateToTeleConsult() async {
String roomID = await Utils.getStringFromPrefs(CacheConst.zoomRoomID);
String callTypeID = await Utils.getStringFromPrefs(CacheConst.callTypeID);
print('RoomID: $roomID');
print('callTypeID: $callTypeID');
// GetIt.instance<CacheService>().remove(key: CacheConst.isAppOpenedFromCall);
Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall);
@ -116,6 +115,18 @@ class _SplashScreenState extends State<SplashPage> {
print('actionCallAccept Event Received: ------->');
FlutterCallkitIncoming.endAllCalls();
try {
// Get callTypeID and roomID from event's extra data
String? eventCallTypeID = event.body['extra']?['callTypeID'];
String? eventRoomID = event.body['extra']?['roomID'];
// Re-save to SharedPreferences to ensure they're available
if (eventCallTypeID != null && eventCallTypeID.isNotEmpty) {
await Utils.saveStringFromPrefs(CacheConst.callTypeID, eventCallTypeID);
}
if (eventRoomID != null && eventRoomID.isNotEmpty) {
await Utils.saveStringFromPrefs(CacheConst.zoomRoomID, eventRoomID);
}
navigateToTeleConsult();
// String roomID = await Utils.getStringFromPrefs(SharedPrefsConsts.ZOOM_ROOM_ID);
// String roomPass = await Utils.getStringFromPrefs(SharedPrefsConsts.ZOOM_ROOM_PASS);

@ -56,8 +56,7 @@ class _LanguageSelectorState extends State<LanguageSelector> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.language),
SizedBox(width: 6.h),
Text(
// currentLangData['name']?.toUpperCase() ?? 'EN',
widget.currentLanguage == 'ar' ? "ENGLISH" : "العربية",
@ -69,6 +68,9 @@ class _LanguageSelectorState extends State<LanguageSelector> {
isLanguageSwitcher: true,
fontFamily: widget.currentLanguage == 'ar' ? "Poppins" : "CairoArabic"),
),
SizedBox(width: 6.h),
Utils.buildSvgWithAssets(icon: AppAssets.language),
],
),
),

Loading…
Cancel
Save