master
haroon amjad 1 month ago
parent 519768c6eb
commit 3501fe42e9

@ -19,10 +19,10 @@ class _BookingOptionsState extends State<BookingOptions> {
@override @override
void initState() { void initState() {
locationUtils = // locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context); // new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance // WidgetsBinding.instance
.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); // .addPostFrameCallback((_) => locationUtils.getCurrentLocation());
super.initState(); super.initState();
} }

@ -70,7 +70,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
@override @override
void initState() { void initState() {
locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context); // locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
checkPVM(); checkPVM();
super.initState(); super.initState();

@ -25,9 +25,9 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
locationUtils = // locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context); // new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(); // locationUtils.getCurrentLocation();
_isButtonDisabled = true; _isButtonDisabled = true;
} }

@ -51,8 +51,8 @@ class _SearchByHospitalState extends State<SearchByHospital> {
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); // locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
locationUtils.getCurrentLocation(); // locationUtils.getCurrentLocation();
getProjectsList(); getProjectsList();
}); });
} }
@ -303,13 +303,13 @@ class _SearchByHospitalState extends State<SearchByHospital> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
} else {} } else {}
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
locationUtils.getCurrentLocation(); // locationUtils.getCurrentLocation();
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
locationUtils.getCurrentLocation(); // locationUtils.getCurrentLocation();
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
locationUtils.getCurrentLocation(); // locationUtils.getCurrentLocation();
print(err); print(err);
}); });
} }

@ -631,6 +631,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
break; break;
case 20: case 20:
getPatientShare(context, appo); getPatientShare(context, appo);
// getAppoQR(context, appo);
// checkPatientNphiesEligibility(context, appo); // checkPatientNphiesEligibility(context, appo);
break; break;
case 30: case 30:

@ -54,7 +54,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.clear(); hmgServices.clear();
hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin));
hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); // hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
// projectViewModel.isIndoorNavigationEnabled // projectViewModel.isIndoorNavigationEnabled
// ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, // ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin,

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:health/health.dart'; // import 'package:health/health.dart';
class syncHealthDataButton extends StatefulWidget { class syncHealthDataButton extends StatefulWidget {
syncHealthDataButton(); syncHealthDataButton();
@ -21,7 +21,7 @@ class syncHealthDataButton extends StatefulWidget {
} }
class _syncHealthDataButtonState extends State<syncHealthDataButton> { class _syncHealthDataButtonState extends State<syncHealthDataButton> {
List<HealthDataPoint> _healthDataList = []; // List<HealthDataPoint> _healthDataList = [];
List<healthData> Med_InsertTransactionsInputsList = []; List<healthData> Med_InsertTransactionsInputsList = [];
List<healthData> Med_InsertTransactionsInputsList2 = []; List<healthData> Med_InsertTransactionsInputsList2 = [];
@ -35,7 +35,7 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
int MedCategoryID = 0; int MedCategoryID = 0;
// HealthFactory health = HealthFactory(); // HealthFactory health = HealthFactory();
List<HealthDataType> types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING]; // List<HealthDataType> types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING];
@override @override
void initState() { void initState() {
@ -91,32 +91,32 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
// _healthDataList = HealthFactory.removeDuplicates(_healthDataList); // _healthDataList = HealthFactory.removeDuplicates(_healthDataList);
_healthDataList.forEach((x) { // _healthDataList.forEach((x) {
if (x.type == HealthDataType.STEPS) { // if (x.type == HealthDataType.STEPS) {
Med_InsertTransactionsInputsList.add(healthData( // Med_InsertTransactionsInputsList.add(healthData(
MedCategoryID: 6, // MedCategoryID: 6,
MedSubCategoryID: MedSubCategoryID, // MedSubCategoryID: MedSubCategoryID,
MachineDate: DateUtil.convertDateToString(x.dateFrom), // MachineDate: DateUtil.convertDateToString(x.dateFrom),
Value: double.tryParse(x.value.toString()), // Value: double.tryParse(x.value.toString()),
TransactionsListID: TransactionsListID++)); // TransactionsListID: TransactionsListID++));
} // }
if (x.type == HealthDataType.HEART_RATE) { // if (x.type == HealthDataType.HEART_RATE) {
Med_InsertTransactionsInputsList.add(healthData( // Med_InsertTransactionsInputsList.add(healthData(
MedCategoryID: 3, // MedCategoryID: 3,
MedSubCategoryID: MedSubCategoryID, // MedSubCategoryID: MedSubCategoryID,
MachineDate: DateUtil.convertDateToString(x.dateFrom), // MachineDate: DateUtil.convertDateToString(x.dateFrom),
Value: double.tryParse(x.value.toString()), // Value: double.tryParse(x.value.toString()),
TransactionsListID: TransactionsListID++)); // TransactionsListID: TransactionsListID++));
} // }
if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) { // if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) {
Med_InsertTransactionsInputsList.add(healthData( // Med_InsertTransactionsInputsList.add(healthData(
MedCategoryID: 7, // MedCategoryID: 7,
MedSubCategoryID: MedSubCategoryID, // MedSubCategoryID: MedSubCategoryID,
MachineDate: DateUtil.convertDateToString(x.dateFrom), // MachineDate: DateUtil.convertDateToString(x.dateFrom),
Value: double.tryParse(x.value.toString()), // Value: double.tryParse(x.value.toString()),
TransactionsListID: TransactionsListID++)); // TransactionsListID: TransactionsListID++));
} // }
}); // });
getAllHealthDataLists(); getAllHealthDataLists();
} }

@ -173,7 +173,8 @@ class PayfortService extends BaseService {
customerName: customerName!, customerName: customerName!,
customerEmail: customerEmail!, customerEmail: customerEmail!,
// orderDescription: orderDescription!, // orderDescription: orderDescription!,
orderDescription: "Dr. Sulaiman Al Habib Hospital", // orderDescription: "Dr. Sulaiman Al Habib Hospital",
orderDescription: "Red Sea Health",
sdkToken: sdkTokenResponse?.sdkToken ?? '', sdkToken: sdkTokenResponse?.sdkToken ?? '',
merchantReference: merchantReference!, merchantReference: merchantReference!,
currency: currency, currency: currency,

@ -7,11 +7,10 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:geolocator/geolocator.dart' as geo; import 'package:geolocator/geolocator.dart' as geo;
class PermissionService extends BaseService { class PermissionService extends BaseService {
late LocalStorage storage;
PermissionService(){ PermissionService(){
initLocalStorage();
storage = localStorage; storage = localStorage;
} }
LocalStorage? storage;
geo.LocationPermission? locationPermission; geo.LocationPermission? locationPermission;
AppGlobal appGlobal = new AppGlobal(); AppGlobal appGlobal = new AppGlobal();

Loading…
Cancel
Save