Merge pull request 'haroon_dev' (#279) from haroon_dev into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/279
pull/282/head
Haroon6138 1 day ago
commit ee4d6c1c81

@ -14,7 +14,8 @@
tools:node="remove" /> tools:node="remove" />
<uses-permission <uses-permission
android:name="android.permission.READ_PHONE_STATE" android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/> --> tools:node="remove" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove"/>
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/> --> <!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove"/> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/> --> <!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" tools:node="remove"/> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/> --> <!-- <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="remove"/> -->
@ -42,7 +43,7 @@
<!-- Gallery/Photo permissions for Android 13+ (API 33+) --> <!-- Gallery/Photo permissions for Android 13+ (API 33+) -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" />
<!-- Gallery/Photo permissions for Android 12 and below --> <!-- Gallery/Photo permissions for Android 12 and below -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />

@ -382,7 +382,7 @@
"myWallet": "محفظتي", "myWallet": "محفظتي",
"balanceAmount": "مبلغ المحفظة", "balanceAmount": "مبلغ المحفظة",
"totalBalance": "إجمالي الرصيد", "totalBalance": "إجمالي الرصيد",
"createAdvancedPayment": "إعادة شحن المحفظة", "createAdvancedPayment": "شحن المحفظة",
"advancePayment": "دفع مسبق", "advancePayment": "دفع مسبق",
"advancePaymentLabel": "يمكنك إنشاء وإضافة دفعة مقدمة لحسابك أو حسابات أخرى.", "advancePaymentLabel": "يمكنك إنشاء وإضافة دفعة مقدمة لحسابك أو حسابات أخرى.",
"fileNumber": "رقم الملف", "fileNumber": "رقم الملف",

@ -43,37 +43,36 @@ class CalenderUtilsNew {
} }
Future<void> _loadCalendars() async { Future<void> _loadCalendars() async {
print("the get calenders is called");
CalendarPermissionStatus result = await DeviceCalendar.instance.hasPermissions(); CalendarPermissionStatus result = await DeviceCalendar.instance.hasPermissions();
if (result != CalendarPermissionStatus.granted) { if (result != CalendarPermissionStatus.granted) {
await DeviceCalendar.instance.requestPermissions(); await DeviceCalendar.instance.requestPermissions();
result = await DeviceCalendar.instance.hasPermissions(); result = await DeviceCalendar.instance.hasPermissions();
// if (result != CalendarPermissionStatus.granted) { if (result != CalendarPermissionStatus.granted) {
// print("the permission is not granted"); print("the permission is not granted");
// showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
// title: LocaleKeys.notice.tr(context: GetIt title: LocaleKeys.notice.tr(context: GetIt
// .instance<NavigationService>() .instance<NavigationService>()
// .navigatorKey .navigatorKey
// .currentContext!), .currentContext!),
// GetIt GetIt
// .instance<NavigationService>() .instance<NavigationService>()
// .navigatorKey .navigatorKey
// .currentContext!, .currentContext!,
// child: Utils.getWarningWidget( child: Utils.getWarningWidget(
// loadingText: LocaleKeys.calendarPermissionAlert.tr(), loadingText: LocaleKeys.calendarPermissionAlert.tr(),
// isShowActionButtons: true, isShowActionButtons: true,
// onCancelTap: () { onCancelTap: () {
// GetIt.instance<NavigationService>().pop(); GetIt.instance<NavigationService>().pop();
// }, },
// onConfirmTap: () async { onConfirmTap: () async {
// GetIt.instance<NavigationService>().pop(); GetIt.instance<NavigationService>().pop();
// openAppSettings(); openAppSettings();
// }), }),
// callBackFunc: () {}, callBackFunc: () {},
// isFullScreen: false, isFullScreen: false,
// isCloseButtonVisible: true, isCloseButtonVisible: true,
// ); );
// } }
} }
var calenders = await calender.listCalendars(); var calenders = await calender.listCalendars();
calenders.forEach((calender) { calenders.forEach((calender) {

@ -718,7 +718,7 @@ class HmgServicesViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
notifyListeners(); notifyListeners();
await errorHandlerService.handleError(failure: failure); // await errorHandlerService.handleError(failure: failure);
if (onError != null) { if (onError != null) {
onError(failure.toString()); onError(failure.toString());
} }

@ -134,11 +134,17 @@ class _NewReferralPageState extends State<NewReferralPage> {
onSuccess: (GenericApiModel response) { onSuccess: (GenericApiModel response) {
LoaderBottomSheet.hideLoader(); LoaderBottomSheet.hideLoader();
showSuccessBottomSheet(int.parse(response.data), hmgServicesVM); showSuccessBottomSheet(int.parse(response.data), hmgServicesVM);
}, },
onError: (errorMessage) { onError: (errorMessage) {
// Handle error (e.g., show error message) // Handle error (e.g., show error message)
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.error.tr(context: context),
child: Utils.getErrorWidget(
loadingText: errorMessage.toString(),
), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
print(errorMessage); print(errorMessage);
}, },
); );

@ -36,6 +36,7 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
DialogService dialogService = getIt.get<DialogService>(); DialogService dialogService = getIt.get<DialogService>();
return CollapsingListView( return CollapsingListView(
isLeading: Navigator.canPop(context),
title: widget.type == HealthCalConEnum.calculator ? LocaleKeys.healthCalculators.tr(context: context) : LocaleKeys.healthConverters.tr(), title: widget.type == HealthCalConEnum.calculator ? LocaleKeys.healthCalculators.tr(context: context) : LocaleKeys.healthConverters.tr(),
child: widget.type == HealthCalConEnum.calculator child: widget.type == HealthCalConEnum.calculator
? CustomExpandableList( ? CustomExpandableList(

@ -34,6 +34,7 @@ import 'package:hmg_patient_app_new/presentation/home/service_info_page.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart';
import 'package:hmg_patient_app_new/presentation/hmg_services/widgets/weather_widget.dart'; import 'package:hmg_patient_app_new/presentation/hmg_services/widgets/weather_widget.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart';
import 'package:hmg_patient_app_new/presentation/parking/paking_page.dart'; import 'package:hmg_patient_app_new/presentation/parking/paking_page.dart';
import 'package:hmg_patient_app_new/presentation/servicesPriceList/services_price_list_page.dart'; import 'package:hmg_patient_app_new/presentation/servicesPriceList/services_price_list_page.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart';
@ -586,7 +587,7 @@ class _ServicesPageState extends State<ServicesPage> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Utils.buildSvgWithAssets(icon: AppAssets.services_medical_file_icon, width: 40.w, height: 40.h, applyThemeColor: false), Utils.buildSvgWithAssets(icon: AppAssets.services_medical_file_icon, width: 40.w, height: 40.h, applyThemeColor: false),
LocaleKeys.medicalFile.tr().toText16(isBold: true, maxlines: 2).expanded, LocaleKeys.familyTitle.tr().toText16(isBold: true, maxlines: 2).expanded,
Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward), Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward),
], ],
), ),
@ -653,9 +654,15 @@ class _ServicesPageState extends State<ServicesPage> {
], ],
).onPress(() async { ).onPress(() async {
if (getIt.get<AppState>().isAuthenticated) { if (getIt.get<AppState>().isAuthenticated) {
// Navigator.of(context).push(
// CustomPageRoute(
// page: MedicalFilePage(),
// ),
// );
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: MedicalFilePage(), direction: AxisDirection.down,
page: FamilyMedicalScreen(),
), ),
); );
} else { } else {

@ -1292,9 +1292,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Selector<MedicalFileViewModel,({bool isLoading, List<PatientMedicalReportResponseModel> listRequest, List<PatientMedicalReportResponseModel> listReady})>( Selector<MedicalFileViewModel,({bool isLoading, List<PatientMedicalReportResponseModel> listRequest, List<PatientMedicalReportResponseModel> listReady})>(
selector: (context, vm) => (isLoading: vm.isPatientMedicalReportsListLoading, listRequest: vm.patientMedicalReportRequestedList, listReady: vm.patientMedicalReportReadyList), selector: (context, vm) => (isLoading: vm.isPatientMedicalReportsListLoading, listRequest: vm.patientMedicalReportRequestedList, listReady: vm.patientMedicalReportReadyList),
builder: (context, data, _){ builder: (context, data, _){
print("isloading are ${data.isLoading}");
print("listRequest are ${data.listRequest}");
print("listReady are ${data.listReady}");
return MedicalReportCard( return MedicalReportCard(
isLoading: data.isLoading, listRequest: data.listRequest, listReady: data.listReady isLoading: data.isLoading, listRequest: data.listRequest, listReady: data.listReady
); );

@ -89,7 +89,8 @@ class MedicalReportCard extends StatelessWidget {
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
fontSize: 14.f, fontSize: 14.f,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
isBold: true,
borderRadius: 12.r, borderRadius: 12.r,
height: 48.h, height: 48.h,
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),

@ -437,7 +437,16 @@ class _FamilyCardsState extends State<FamilyCards> {
); );
}), }),
SizedBox(width: 4.h), SizedBox(width: 4.h),
Utils.buildSvgWithAssets(icon: AppAssets.arrowRight), Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrowRight,
iconColor: AppColors.blackColor,
width: 22.w,
height: 22.h,
fit: BoxFit.contain,
)
),
], ],
), ),
SizedBox(height: 24.h), SizedBox(height: 24.h),

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'dart:ui' as ui;
class ScrollWheelTimePicker extends StatefulWidget { class ScrollWheelTimePicker extends StatefulWidget {
@ -87,97 +88,99 @@ class _ScrollWheelTimePickerState extends State<ScrollWheelTimePicker> {
final digitStyle = widget.digitTextStyle ?? _defaultDigitStyle; final digitStyle = widget.digitTextStyle ?? _defaultDigitStyle;
final separatorStyle = widget.separatorTextStyle ?? _defaultSeparatorStyle; final separatorStyle = widget.separatorTextStyle ?? _defaultSeparatorStyle;
return SizedBox( return Directionality(
height: widget.pickerHeight, textDirection: ui.TextDirection.ltr,
child: Row( child: SizedBox(
mainAxisAlignment: MainAxisAlignment.center, height: widget.pickerHeight,
mainAxisSize: MainAxisSize.min, child: Row(
children: [ mainAxisAlignment: MainAxisAlignment.center,
SizedBox( mainAxisSize: MainAxisSize.min,
width: 150.w, children: [
child: ListWheelScrollView.useDelegate( SizedBox(
controller: _hourController, width: 150.w,
itemExtent: widget.itemExtent, child: ListWheelScrollView.useDelegate(
physics: const FixedExtentScrollPhysics(), controller: _hourController,
perspective: 0.005, itemExtent: widget.itemExtent,
diameterRatio: 1.2, physics: const FixedExtentScrollPhysics(),
onSelectedItemChanged: (index) { perspective: 0.005,
setState(() { diameterRatio: 1.2,
_selectedHour = onSelectedItemChanged: (index) {
widget.use24HourFormat ? index : index + 1; setState(() {
}); _selectedHour =
_notifyChange(); widget.use24HourFormat ? index : index + 1;
}, });
childDelegate: ListWheelChildBuilderDelegate( _notifyChange();
childCount: _maxHour, },
builder: (context, index) { childDelegate: ListWheelChildBuilderDelegate(
final hour = childCount: _maxHour,
widget.use24HourFormat ? index : index + 1; builder: (context, index) {
final isSelected = hour == _selectedHour; final hour =
return Visibility( widget.use24HourFormat ? index : index + 1;
visible: true, final isSelected = hour == _selectedHour;
child: Center( return Visibility(
child: AnimatedDefaultTextStyle( visible: true,
duration: const Duration(milliseconds: 200), child: Center(
style: digitStyle.copyWith( child: AnimatedDefaultTextStyle(
color: isSelected duration: const Duration(milliseconds: 200),
? AppColors.textColor style: digitStyle.copyWith(
: AppColors.textColor.withValues(alpha: 0.3), color: isSelected
), ? AppColors.textColor
child: Text( : AppColors.textColor.withValues(alpha: 0.3),
hour.toString().padLeft(2, '0'), ),
child: Text(
hour.toString().padLeft(2, '0'),
),
), ),
), ),
), );
); },
}, ),
), ),
), ),
),
Padding(
Padding( padding: EdgeInsets.symmetric(horizontal: 2.w),
padding: EdgeInsets.symmetric(horizontal: 2.w), child: Text(':', style: separatorStyle),
child: Text(':', style: separatorStyle), ),
),
SizedBox(
SizedBox( width: 150.w,
width: 150.w, child: ListWheelScrollView.useDelegate(
child: ListWheelScrollView.useDelegate( controller: _minuteController,
controller: _minuteController, itemExtent: widget.itemExtent,
itemExtent: widget.itemExtent, physics: const FixedExtentScrollPhysics(),
physics: const FixedExtentScrollPhysics(), perspective: 0.005,
perspective: 0.005, diameterRatio: 1.2,
diameterRatio: 1.2, onSelectedItemChanged: (index) {
onSelectedItemChanged: (index) { setState(() {
setState(() { _selectedMinute = index;
_selectedMinute = index; });
}); _notifyChange();
_notifyChange();
},
childDelegate: ListWheelChildBuilderDelegate(
childCount: 60,
builder: (context, index) {
final isSelected = index == _selectedMinute;
return Visibility(
visible: true,
child:
Center(
child: AnimatedDefaultTextStyle(
duration: const Duration(milliseconds: 200),
style: digitStyle.copyWith(
color: isSelected
? AppColors.textColor
: AppColors.transparent.withValues(alpha: 0.3),
),
child: Text(index.toString().padLeft(2, '0')),
),
));
}, },
childDelegate: ListWheelChildBuilderDelegate(
childCount: 60,
builder: (context, index) {
final isSelected = index == _selectedMinute;
return Visibility(
visible: true,
child:
Center(
child: AnimatedDefaultTextStyle(
duration: const Duration(milliseconds: 200),
style: digitStyle.copyWith(
color: isSelected
? AppColors.textColor
: AppColors.transparent.withValues(alpha: 0.3),
),
child: Text(index.toString().padLeft(2, '0')),
),
));
},
),
), ),
), ),
), ],
], ),
), ),
); );
} }

@ -2,8 +2,8 @@ name: hmg_patient_app_new
description: "New HMG Patient App" description: "New HMG Patient App"
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.16+13 version: 0.0.19+18
#version: 0.0.1+16 #version: 0.0.1+18
environment: environment:
sdk: ">=3.6.0 <4.0.0" sdk: ">=3.6.0 <4.0.0"

Loading…
Cancel
Save