update_flutter_3.16.0
Sultan Khan 5 months ago
parent 95b4aa9833
commit 0268b796fe

@ -5,15 +5,15 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/'; // const BASE_URL_LIVE_CARE = 'https://uat.hmgwebservices.com/';
const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/'; const DOCTOR_ROTATION = 'https://doctorrota.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'http://10.20.200.111:1010/'; // const BASE_URL = 'http://10.20.200.111:1010/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
@ -413,7 +413,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z'; const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9'; const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 9.7; const VERSION_ID = 9.8;
const CHANNEL = 9; const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt'; const SESSION_ID = 'BlUSkYymTt';
const IS_LOGIN_FOR_DOCTOR_APP = true; const IS_LOGIN_FOR_DOCTOR_APP = true;

@ -1253,4 +1253,5 @@ const Map<String, Map<String, String>> localizedValues = {
"progressNoteCanNotBeEmpty": {"en": "Progress Note Can Not Be Empty", "ar":"تعذر تنفيذ الإجراء"}, "progressNoteCanNotBeEmpty": {"en": "Progress Note Can Not Be Empty", "ar":"تعذر تنفيذ الإجراء"},
"youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "ar":"لديك تدخلات معلقة. التي تحتاج إلى اهتمامك"}, "youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "ar":"لديك تدخلات معلقة. التي تحتاج إلى اهتمامك"},
"open": {"en": "Open", "ar":"يفتح"}, "open": {"en": "Open", "ar":"يفتح"},
"chiefComplaintLengthErrorMsg":{"en": "The text is too short; minimum 26 characters required.", "ar":"النص قصير جدًا؛ الحد الأدنى المطلوب هو 26 حرفًا."}
}; };

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/core/model/hospitals/VidaPlusProjectListModel.dart'; import 'package:doctor_app_flutter/core/model/hospitals/VidaPlusProjectListModel.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_request_model.dart';
import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart'; import 'package:doctor_app_flutter/core/model/hospitals/get_hospitals_response_model.dart';
@ -28,7 +29,7 @@ class HospitalsService extends BaseService {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, },
body: getHospitalsRequestModel.toJson(), body: {"LanguageID":await sharedPref.getString(APP_Language),"MemberID":getHospitalsRequestModel.memberID,"DoctorID":getHospitalsRequestModel.doctorID} //getHospitalsRequestModel.toJson(),
); );
} }
} }

@ -69,7 +69,6 @@ class PatientReferralService extends LookupService {
Future getProjectInfo(int projectId) async { Future getProjectInfo(int projectId) async {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ProjectID'] = projectId; body['ProjectID'] = projectId;
await baseAppClient.post( await baseAppClient.post(
PROJECT_GET_INFO, PROJECT_GET_INFO,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {

@ -232,6 +232,7 @@ class AuthenticationViewModel extends BaseViewModel {
GetHospitalsRequestModel getHospitalsRequestModel = GetHospitalsRequestModel(); GetHospitalsRequestModel getHospitalsRequestModel = GetHospitalsRequestModel();
getHospitalsRequestModel.memberID = memberID; getHospitalsRequestModel.memberID = memberID;
getHospitalsRequestModel.doctorID = memberID; getHospitalsRequestModel.doctorID = memberID;
await _hospitalsService.getHospitals(getHospitalsRequestModel); await _hospitalsService.getHospitals(getHospitalsRequestModel);
if (_hospitalsService.hasError) { if (_hospitalsService.hasError) {
error = _hospitalsService.error; error = _hospitalsService.error;
@ -441,6 +442,7 @@ class AuthenticationViewModel extends BaseViewModel {
logout({bool isFromLogin = false}) async { logout({bool isFromLogin = false}) async {
localToken = ""; localToken = "";
String? lang = await sharedPref.getString(APP_Language); String? lang = await sharedPref.getString(APP_Language);
//COMMENTED THE NOT TO CLEAR THE SHARED PREF //COMMENTED THE NOT TO CLEAR THE SHARED PREF
// await Utils.clearSharedPref(); // await Utils.clearSharedPref();
doctorProfile = null; doctorProfile = null;

@ -235,7 +235,7 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
model.complaintsControllerError = ''; model.complaintsControllerError = '';
model.medicationControllerError = ''; model.medicationControllerError = '';
model.illnessControllerError = ''; model.illnessControllerError = '';
if (complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty) { if (complaintsController.text.isNotEmpty && complaintsController.text.length > 25 && illnessController.text.isNotEmpty && illnessController.text.length >25) {
await model.postSubjectServices( await model.postSubjectServices(
patientInfo: widget.patientInfo, patientInfo: widget.patientInfo,
complaintsText: complaintsController.text, complaintsText: complaintsController.text,
@ -252,10 +252,14 @@ class _UpdateSubjectivePageState extends State<UpdateSubjectivePage> implements
setState(() { setState(() {
if (complaintsController.text.isEmpty) { if (complaintsController.text.isEmpty) {
model.complaintsControllerError = TranslationBase.of(context).emptyMessage; model.complaintsControllerError = TranslationBase.of(context).emptyMessage;
} else if(complaintsController.text.length < 25) {
model.complaintsControllerError = TranslationBase.of(context).chiefComplaintLengthErrorMsg;
} }
if (illnessController.text.isEmpty) { if (illnessController.text.isEmpty) {
model.illnessControllerError = TranslationBase.of(context).emptyMessage; model.illnessControllerError = TranslationBase.of(context).emptyMessage;
} else if(illnessController.text.length < 25) {
model.illnessControllerError = TranslationBase.of(context).chiefComplaintLengthErrorMsg;
} }
if (medicationController.text.isEmpty) { if (medicationController.text.isEmpty) {

@ -48,7 +48,7 @@ class _SplashScreenState extends State<SplashScreen> {
Future<String?> _getFirebaseToken() async { Future<String?> _getFirebaseToken() async {
try { try {
await Firebase.initializeApp(); await Firebase.initializeApp();
Future.delayed(Duration(seconds: 1), () { await Future.delayed(Duration(seconds: 1), () {
}); });
if (Platform.isIOS) { if (Platform.isIOS) {
// Request permissions first // Request permissions first
@ -68,19 +68,18 @@ class _SplashScreenState extends State<SplashScreen> {
final fcmToken = await _firebaseMessaging.getToken(); final fcmToken = await _firebaseMessaging.getToken();
debugPrint("FCM Token: $fcmToken"); debugPrint("FCM Token: $fcmToken");
// APNS token might not be immediately available // // APNS token might not be immediately available
String? apnsToken; // String? apnsToken;
int retries = 0; // int retries = 0;
while (apnsToken == null && retries < 3) { // while (apnsToken == null && retries < 3) {
apnsToken = await _firebaseMessaging.getAPNSToken(); // apnsToken = await _firebaseMessaging.getAPNSToken();
if (apnsToken == null) { // if (apnsToken == null) {
await Future.delayed(Duration(milliseconds: 500)); // await Future.delayed(Duration(milliseconds: 500));
retries++; // retries++;
} // }
} // }
// print(apnsToken);
debugPrint("APNS Token: $apnsToken"); return fcmToken; // Fallback to FCM token if APNS is null
return apnsToken ?? fcmToken; // Fallback to FCM token if APNS is null
} else { } else {
return await _firebaseMessaging.getToken(); return await _firebaseMessaging.getToken();
} }

@ -1995,6 +1995,7 @@ class TranslationBase {
String get dateToCanNotBeEmpty => localizedValues['dateToCanNotBeEmpty']![locale.languageCode]!; String get dateToCanNotBeEmpty => localizedValues['dateToCanNotBeEmpty']![locale.languageCode]!;
String get dateFromCanNotBeEmpty => localizedValues['dateFromCanNotBeEmpty']![locale.languageCode]!; String get dateFromCanNotBeEmpty => localizedValues['dateFromCanNotBeEmpty']![locale.languageCode]!;
String get open => localizedValues['open']![locale.languageCode]!; String get open => localizedValues['open']![locale.languageCode]!;
String get chiefComplaintLengthErrorMsg => localizedValues['chiefComplaintLengthErrorMsg']![locale.languageCode]!;
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save