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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save