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

@ -4,16 +4,16 @@ const MAX_SMALL_SCREEN = 660;
const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://livecareuat.hmg.com/';
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL_LIVE_CARE = 'https://uat.hmgwebservices.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 = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
@ -413,7 +413,7 @@ const TRANSACTION_NO = 0;
const LANGUAGE_ID = 2;
const STAMP = '2020-04-27T12:17:17.721Z';
const IP_ADDRESS = '9.9.9.9';
const VERSION_ID = 9.7;
const VERSION_ID = 9.8;
const CHANNEL = 9;
const SESSION_ID = 'BlUSkYymTt';
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":"تعذر تنفيذ الإجراء"},
"youHavePendingInterventions": {"en": "You Have Pending Interventions. That need your attention", "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/shared_pref_kay.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_response_model.dart';
@ -28,7 +29,7 @@ class HospitalsService extends BaseService {
hasError = true;
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 {
Map<String, dynamic> body = Map();
body['ProjectID'] = projectId;
await baseAppClient.post(
PROJECT_GET_INFO,
onSuccess: (dynamic response, int statusCode) {

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

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

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

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

Loading…
Cancel
Save