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

Reviewed-on: #91
pull/94/head
Haroon6138 4 months ago
commit 955f3c1888

@ -174,7 +174,7 @@ class ApiClientImp implements ApiClient {
} }
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// body['PatientID'] = 3966014; // body['PatientID'] = 3111528;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// //
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;

@ -57,7 +57,7 @@ class EmergencyServicesRepoImp implements EmergencyServicesRepo {
@override @override
Future<Either<Failure, GenericApiModel<List<RRTProceduresResponseModel>>>> getRRTProcedures() async { Future<Either<Failure, GenericApiModel<List<RRTProceduresResponseModel>>>> getRRTProcedures() async {
Map<String, dynamic> mapDevice = {}; Map<String, dynamic> mapDevice = {"ProjectID": 15};
try { try {
GenericApiModel<List<RRTProceduresResponseModel>>? apiResponse; GenericApiModel<List<RRTProceduresResponseModel>>? apiResponse;

@ -256,7 +256,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.secondaryLightRedBorderColor, borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 10, fontSize: 10.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 8, borderRadius: 8,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0), padding: EdgeInsets.fromLTRB(15, 0, 15, 0),

@ -93,7 +93,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
children: [ children: [
Visibility(visible: myAppointmentsVM.availableFilters.isNotEmpty, child: getAppointmentFilters(myAppointmentsVM)), Visibility(visible: myAppointmentsVM.availableFilters.isNotEmpty, child: getAppointmentFilters(myAppointmentsVM)),
ListView.separated( ListView.separated(
padding: EdgeInsets.only(top: 24.h), padding: EdgeInsets.only(top: 16.h),
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemCount: myAppointmentsVM.isMyAppointmentsLoading itemCount: myAppointmentsVM.isMyAppointmentsLoading
@ -169,6 +169,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
Widget getAppointmentFilters(MyAppointmentsViewModel myAppointmentsVM) { Widget getAppointmentFilters(MyAppointmentsViewModel myAppointmentsVM) {
return SizedBox( return SizedBox(
height: 60.h,
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -177,6 +178,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
width: 8.h, width: 8.h,
), ),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: myAppointmentsVM.availableFilters.length, itemCount: myAppointmentsVM.availableFilters.length,
itemBuilder: (_, index) => AppointmentFilters( itemBuilder: (_, index) => AppointmentFilters(
selectedFilter: myAppointmentsVM.selectedFilter, selectedFilter: myAppointmentsVM.selectedFilter,
@ -205,6 +207,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
)), )),
), ),
], ],
)).paddingOnly(top: 24.h, left: 24.h, right: 24.h); )).paddingOnly(top: 16.h, left: 24.h, right: 24.h);
} }
} }

@ -101,7 +101,7 @@ class HospitalListItem extends StatelessWidget {
child: AppCustomChipWidget( child: AppCustomChipWidget(
labelText: "Location turned off".needTranslation, labelText: "Location turned off".needTranslation,
deleteIcon: AppAssets.location_unavailable, deleteIcon: AppAssets.location_unavailable,
deleteIconSize: Size(9, 12), deleteIconSize: Size(9.w, 12.h),
textColor: AppColors.blackColor, textColor: AppColors.blackColor,
)), )),
], ],

@ -61,7 +61,7 @@ class RegionListItem extends StatelessWidget {
Widget placesCountItem(String svgPath, String count, String title) { Widget placesCountItem(String svgPath, String count, String title) {
return AppCustomChipWidget( return AppCustomChipWidget(
iconSize: 14, iconSize: 14.h,
icon: svgPath, icon: svgPath,
iconHasColor: false, iconHasColor: false,
richText: RichText( richText: RichText(

@ -67,7 +67,6 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
title: LocaleKeys.bookAppo.tr(context: context), title: LocaleKeys.bookAppo.tr(context: context),
isLeading: Navigator.of(context).canPop(),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) { child: Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
return Column( return Column(
@ -476,9 +475,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 16, fontSize: 16.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h, height: 50.h,
icon: AppAssets.login1, icon: AppAssets.login1,

@ -180,10 +180,10 @@ class DoctorsFilters extends StatelessWidget{
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
textColor: Colors.white, textColor: Colors.white,
fontSize: 16, fontSize: 16.f,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 10.r,
icon: AppAssets.add_icon, icon: AppAssets.add_icon,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
).paddingAll(24.h), ).paddingAll(24.h),

@ -250,9 +250,9 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 16, fontSize: 16.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h, height: 50.h,
icon: AppAssets.search_icon, icon: AppAssets.search_icon,

@ -107,9 +107,9 @@ class SelectLivecareClinicPage extends StatelessWidget {
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 16, fontSize: 16.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h, height: 50.h,
icon: AppAssets.livecare_book_icon, icon: AppAssets.livecare_book_icon,
@ -122,18 +122,13 @@ class SelectLivecareClinicPage extends StatelessWidget {
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
onNegativeClicked?.call(); onNegativeClicked?.call();
// Navigator.of(context).push(
// CustomPageRoute(
// page: SelectDoctorPage(),
// ),
// );
}, },
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
fontSize: 16, fontSize: 16.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h, height: 50.h,
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),

@ -111,7 +111,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
selectionDecoration: ShapeDecoration( selectionDecoration: ShapeDecoration(
color: AppColors.transparent, color: AppColors.transparent,
shape: SmoothRectangleBorder( shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(12 ?? 0), borderRadius: BorderRadius.circular(10.r),
smoothness: 1, smoothness: 1,
side: BorderSide(color: AppColors.primaryRedColor, width: 1.5), side: BorderSide(color: AppColors.primaryRedColor, width: 1.5),
), ),
@ -246,10 +246,10 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor, textColor: AppColors.whiteColor,
fontSize: 16, fontSize: 16.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h, height: 50.h,
), ),
], ],

@ -159,10 +159,10 @@ class DoctorCard extends StatelessWidget {
backgroundColor: Color(0xffFEE9EA), backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA), borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B), textColor: Color(0xffED1C2B),
fontSize: 14, fontSize: 14.f,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12, borderRadius: 10.r,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0), padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
height: 40.h, height: 40.h,
icon: AppAssets.add_icon, icon: AppAssets.add_icon,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,

@ -12,8 +12,8 @@ class RrtRequestTypeSelect extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// return Consumer<EmergencyServicesViewModel>(builder: (context, emergencyServicesVM, child) { return Consumer<EmergencyServicesViewModel>(builder: (context, emergencyServicesVM, child) {
return Column( return Column(
children: [ children: [
Container( Container(
padding: EdgeInsets.all(16.h), padding: EdgeInsets.all(16.h),
@ -41,6 +41,6 @@ class RrtRequestTypeSelect extends StatelessWidget {
SizedBox(height: 32.h), SizedBox(height: 32.h),
], ],
); );
// }); });
} }
} }

@ -122,7 +122,7 @@ class TrackingScreen extends StatelessWidget {
height: 40.h, height: 40.h,
backgroundColor: AppColors.lightRedButtonColor, backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent, borderColor: Colors.transparent,
text: "Share Your Live Locatin on Whatsapp".needTranslation, text: "Share Your Live Location on Whatsapp".needTranslation,
fontSize: 12.f, fontSize: 12.f,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
@ -216,11 +216,7 @@ class TrackingScreen extends StatelessWidget {
informationRegardingTrackingSection() { informationRegardingTrackingSection() {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [currentStatus(), SizedBox(height: 4.h), "You will receive a call from HMG for confirmation ".toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500)],
currentStatus(),
SizedBox(height: 4.h),
"You will receive a call from HMG for confirmation ".toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500)
],
); );
} }
@ -235,49 +231,50 @@ class TrackingScreen extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
), ),
TextSpan( TextSpan(
text: "...".needTranslation, text: "...".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.errorColor, color: AppColors.errorColor,
), ),
), ),
]), ]),
); );
case OrderTrackingState.returning: case OrderTrackingState.returning:
return RichText( return RichText(
text: TextSpan(children: <TextSpan>[ text: TextSpan(children: <TextSpan>[
TextSpan( TextSpan(
text: "15:30".needTranslation, text: "15:30".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
), ),
TextSpan( TextSpan(
text: " mins ".needTranslation, text: " mins ".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.errorColor, color: AppColors.errorColor,
), ),
), ),
TextSpan( TextSpan(
text: "to hospital".needTranslation, text: "to hospital".needTranslation,
style: TextStyle( style: TextStyle(
fontSize: 21.f, fontSize: 21.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
), ),
]), ]),
); );
case OrderTrackingState.ended: case OrderTrackingState.ended:
return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600); return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600);
} }
} }

@ -17,6 +17,7 @@ import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:lottie/lottie.dart'; import 'package:lottie/lottie.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -241,16 +242,22 @@ class EmergencyServicesPage extends StatelessWidget {
text: LocaleKeys.confirm.tr(context: context), text: LocaleKeys.confirm.tr(context: context),
onPressed: () async { onPressed: () async {
Navigator.of(context).pop(); Navigator.of(context).pop();
showCommonBottomSheetWithoutHeight(
title: "Rapid Response Team (RRT)".needTranslation, LoaderBottomSheet.showLoader();
context, await emergencyServicesViewModel.getRRTProcedures(onSuccess: (val) {
child: RrtRequestTypeSelect(), LoaderBottomSheet.hideLoader();
isFullScreen: false, showCommonBottomSheetWithoutHeight(
isCloseButtonVisible: true, title: "Rapid Response Team (RRT)".needTranslation,
hasBottomPadding: false, context,
backgroundColor: AppColors.bottomSheetBgColor, child: RrtRequestTypeSelect(),
callBackFunc: () {}, isFullScreen: false,
); isCloseButtonVisible: true,
hasBottomPadding: false,
backgroundColor: AppColors.bottomSheetBgColor,
callBackFunc: () {},
);
});
}, },
backgroundColor: AppColors.whiteColor, backgroundColor: AppColors.whiteColor,
borderColor: AppColors.whiteColor, borderColor: AppColors.whiteColor,

@ -461,7 +461,7 @@ class _LandingPageState extends State<LandingPage> {
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
SizedBox( SizedBox(
height: 340.h, height: 280.h,
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: LandingPageData.getServiceCardsList.length, itemCount: LandingPageData.getServiceCardsList.length,

@ -5,6 +5,7 @@ import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointme
import 'package:hmg_patient_app_new/presentation/hmg_services/services_page.dart'; import 'package:hmg_patient_app_new/presentation/hmg_services/services_page.dart';
import 'package:hmg_patient_app_new/presentation/home/landing_page.dart'; import 'package:hmg_patient_app_new/presentation/home/landing_page.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/todo/todo_page.dart';
import 'package:hmg_patient_app_new/widgets/bottom_navigation/bottom_navigation.dart'; import 'package:hmg_patient_app_new/widgets/bottom_navigation/bottom_navigation.dart';
class LandingNavigation extends StatefulWidget { class LandingNavigation extends StatefulWidget {
@ -30,7 +31,7 @@ class _LandingNavigationState extends State<LandingNavigation> {
const LandingPage(), const LandingPage(),
appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ const LandingPage(), appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ const LandingPage(),
BookAppointmentPage(), BookAppointmentPage(),
const LandingPage(), const ToDoPage(),
appState.isAuthenticated ? /* need add news page */ ServicesPage() : const LandingPage(), appState.isAuthenticated ? /* need add news page */ ServicesPage() : const LandingPage(),
], ],
), ),

@ -136,7 +136,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
).withHorizontalPadding(24.w).onPress(() { ).withHorizontalPadding(24.w).onPress(() {
DialogService dialogService = getIt.get<DialogService>(); DialogService dialogService = getIt.get<DialogService>();
dialogService.showFamilyBottomSheetWithoutH( dialogService.showFamilyBottomSheetWithoutH(
label: "Who do you want to book for?".needTranslation, label: "Family Files".needTranslation,
message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation, message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation,
onSwitchPress: (FamilyFileResponseModelLists profile) { onSwitchPress: (FamilyFileResponseModelLists profile) {
medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber); medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
@ -144,134 +144,131 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
profiles: medicalFileViewModel.patientFamilyFiles); profiles: medicalFileViewModel.patientFamilyFiles);
}), }),
isLeading: false, isLeading: false,
child: SingleChildScrollView( child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ SizedBox(height: 16.h),
SizedBox(height: 16.h), TextInputWidget(
TextInputWidget( labelText: LocaleKeys.search.tr(context: context),
labelText: LocaleKeys.search.tr(context: context), hintText: "Type any record".needTranslation,
hintText: "Type any record".needTranslation, controller: TextEditingController(),
controller: TextEditingController(), keyboardType: TextInputType.number,
keyboardType: TextInputType.number, isEnable: true,
isEnable: true, prefix: null,
prefix: null, autoFocus: false,
autoFocus: false, isBorderAllowed: false,
isBorderAllowed: false, isAllowLeadingIcon: true,
isAllowLeadingIcon: true, padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h), leadingIcon: AppAssets.student_card,
leadingIcon: AppAssets.student_card, ).paddingSymmetrical(24.w, 0.0),
).paddingSymmetrical(24.w, 0.0), SizedBox(height: 16.h),
SizedBox(height: 16.h), Container(
Container( width: double.infinity,
width: double.infinity, decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r), child: Padding(
child: Padding( padding: EdgeInsets.all(16.w),
padding: EdgeInsets.all(16.w), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Row(
Row( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [
Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg, Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.male_img : AppAssets.femaleImg,
width: 56.w, height: 56.h), width: 56.w, height: 56.h),
SizedBox(width: 8.w), SizedBox(width: 8.w),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}" "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), .toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 4.w, spacing: 4.w,
runSpacing: 6.w, runSpacing: 6.w,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.file_icon, icon: AppAssets.file_icon,
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}", labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}",
labelPadding: EdgeInsetsDirectional.only(end: 6.w), labelPadding: EdgeInsetsDirectional.only(end: 6.w),
onChipTap: () { onChipTap: () {
navigationService.pushPage( navigationService.pushPage(
page: FamilyMedicalScreen( page: FamilyMedicalScreen(
profiles: medicalFileViewModel.patientFamilyFiles, profiles: medicalFileViewModel.patientFamilyFiles,
onSelect: (FamilyFileResponseModelLists p1) {}, onSelect: (FamilyFileResponseModelLists p1) {},
)); ));
}, },
), ),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.checkmark_icon, icon: AppAssets.checkmark_icon,
labelText: LocaleKeys.verified.tr(context: context), labelText: LocaleKeys.verified.tr(context: context),
iconColor: AppColors.successColor, iconColor: AppColors.successColor,
labelPadding: EdgeInsetsDirectional.only(end: 6.w), labelPadding: EdgeInsetsDirectional.only(end: 6.w),
), ),
], ],
), ),
], ],
) )
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Divider(color: AppColors.dividerColor, height: 1.h), Divider(color: AppColors.dividerColor, height: 1.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
spacing: 4.h, spacing: 4.h,
runSpacing: 4.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: "${appState.getAuthenticatedUser()!.age} Years Old", labelText: "${appState.getAuthenticatedUser()!.age} Years Old",
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w), labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
), ),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.blood_icon, icon: AppAssets.blood_icon,
labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}", labelText: "Blood: ${appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup.isEmpty}",
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
labelPadding: EdgeInsetsDirectional.only(end: 8.w), labelPadding: EdgeInsetsDirectional.only(end: 8.w),
), ),
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) { Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
return AppCustomChipWidget( return AppCustomChipWidget(
icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon, icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon,
labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation, labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation,
iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor, textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
iconSize: 12.w, iconSize: 12.w,
backgroundColor: backgroundColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1),
insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor.withOpacity(0.1) : AppColors.successColor.withOpacity(0.1), labelPadding: EdgeInsetsDirectional.only(end: 8.w),
labelPadding: EdgeInsetsDirectional.only(end: 8.w), );
); }),
}),
],
),
],
),
),
).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 16.h),
Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
return Column(
children: [
CustomTabBar(
activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.more, "More".needTranslation),
], ],
onTabChange: (index) { ),
medicalFileVM.onTabChanged(index);
},
).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 24.h),
getSelectedTabData(medicalFileVM.selectedTabIndex),
], ],
); ),
}), ),
], ).paddingSymmetrical(24.w, 0.0),
), SizedBox(height: 16.h),
Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
return Column(
children: [
CustomTabBar(
activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.more, "More".needTranslation),
],
onTabChange: (index) {
medicalFileVM.onTabChanged(index);
},
).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 24.h),
getSelectedTabData(medicalFileVM.selectedTabIndex),
],
);
}),
],
), ),
); );
} }
@ -668,7 +665,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
).paddingSymmetrical(24.w, 0.h) ).paddingSymmetrical(24.w, 0.h)
: SizedBox( : SizedBox(
height: 200.h, height: 100.h,
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: myAppointmentsVM.patientMyDoctorsList.length, itemCount: myAppointmentsVM.patientMyDoctorsList.length,
@ -741,7 +738,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
crossAxisCount: 3, crossAxisCount: 3,
crossAxisSpacing: 16.h, crossAxisSpacing: 16.h,
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
mainAxisExtent: 130.h, mainAxisExtent: 110.h,
), ),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
@ -847,7 +844,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
crossAxisCount: 3, crossAxisCount: 3,
crossAxisSpacing: 16.h, crossAxisSpacing: 16.h,
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
mainAxisExtent: 150.h, mainAxisExtent: 120.h,
), ),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(top: 12.h), padding: EdgeInsets.only(top: 12.h),
@ -934,7 +931,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
crossAxisCount: 3, crossAxisCount: 3,
crossAxisSpacing: 16.h, crossAxisSpacing: 16.h,
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
mainAxisExtent: 140.h, mainAxisExtent: 110.h,
), ),
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,

@ -177,8 +177,8 @@ class _FamilyCardsState extends State<FamilyCards> {
: profile.gender == 1 : profile.gender == 1
? ((profile.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.male_img) ? ((profile.age ?? 0) < 7 ? AppAssets.babyBoyImg : AppAssets.male_img)
: (profile.age! < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg), : (profile.age! < 7 ? AppAssets.babyGirlImg : AppAssets.femaleImg),
width: 80.h, width: 72.h,
height: 78.h, height: 70.h,
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
(profile.patientName ?? "Unknown").toText14(isBold: false, isCenter: true, maxlines: 1, weight: FontWeight.w600), (profile.patientName ?? "Unknown").toText14(isBold: false, isCenter: true, maxlines: 1, weight: FontWeight.w600),
@ -186,7 +186,7 @@ class _FamilyCardsState extends State<FamilyCards> {
CustomChipWidget( CustomChipWidget(
chipType: ChipTypeEnum.alert, chipType: ChipTypeEnum.alert,
backgroundColor: AppColors.lightGrayBGColor, backgroundColor: AppColors.lightGrayBGColor,
chipText: "Relation:${profile.relationship ?? "N/A"}", chipText: "Relation:${profile.relationship ?? " N/A"}",
iconAsset: AppAssets.heart, iconAsset: AppAssets.heart,
isShowBorder: false, isShowBorder: false,
borderRadius: 8.h, borderRadius: 8.h,

@ -184,10 +184,7 @@ class _ProfileSettingsState extends State<ProfileSettings> {
), ),
], ],
), ),
"Quick Actions" "Quick Actions".needTranslation.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w),
.needTranslation
.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
.paddingOnly(left: 24.w, right: 24.w),
Container( Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h), margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h),
padding: EdgeInsets.only(top: 4.h, bottom: 4.h), padding: EdgeInsets.only(top: 4.h, bottom: 4.h),
@ -195,8 +192,7 @@ class _ProfileSettingsState extends State<ProfileSettings> {
child: Column( child: Column(
children: [ children: [
actionItem(AppAssets.language_change, "Language".needTranslation, () { actionItem(AppAssets.language_change, "Language".needTranslation, () {
showCommonBottomSheetWithoutHeight(context, showCommonBottomSheetWithoutHeight(context, title: "Application Language".needTranslation, child: AppLanguageChange(), callBackFunc: () {}, isFullScreen: false);
title: "Application Language".needTranslation, child: AppLanguageChange(), callBackFunc: () {}, isFullScreen: false);
}, trailingLabel: Utils.appState.isArabic() ? "العربية".needTranslation : "English".needTranslation), }, trailingLabel: Utils.appState.isArabic() ? "العربية".needTranslation : "English".needTranslation),
1.divider, 1.divider,
actionItem(AppAssets.accessibility, "Accessibility".needTranslation, () {}), actionItem(AppAssets.accessibility, "Accessibility".needTranslation, () {}),
@ -207,10 +203,7 @@ class _ProfileSettingsState extends State<ProfileSettings> {
], ],
), ),
), ),
"Personal Information" "Personal Information".needTranslation.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w),
.needTranslation
.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
.paddingOnly(left: 24.w, right: 24.w),
Container( Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h), margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h),
padding: EdgeInsets.only(top: 4.h, bottom: 4.h), padding: EdgeInsets.only(top: 4.h, bottom: 4.h),
@ -227,10 +220,7 @@ class _ProfileSettingsState extends State<ProfileSettings> {
], ],
), ),
), ),
"Help & Support" "Help & Support".needTranslation.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w),
.needTranslation
.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
.paddingOnly(left: 24.w, right: 24.w),
Container( Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h), margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h),
padding: EdgeInsets.only(top: 4.h, bottom: 4.h), padding: EdgeInsets.only(top: 4.h, bottom: 4.h),
@ -271,13 +261,12 @@ class _ProfileSettingsState extends State<ProfileSettings> {
children: [ children: [
Utils.buildSvgWithAssets(icon: icon, iconColor: AppColors.greyTextColor), Utils.buildSvgWithAssets(icon: icon, iconColor: AppColors.greyTextColor),
label.toText14(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, label.toText14(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded,
if (trailingLabel.isNotEmpty) if (trailingLabel.isNotEmpty) trailingLabel.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1),
trailingLabel.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1),
switchValue != null switchValue != null
? Switch( ? Switch(
value: switchValue, value: switchValue,
onChanged: (value) {}, onChanged: (value) {},
activeThumbColor: AppColors.successColor, activeColor: AppColors.successColor,
activeTrackColor: AppColors.successColor.withValues(alpha: .15), activeTrackColor: AppColors.successColor.withValues(alpha: .15),
) )
: Transform.scale( : Transform.scale(

@ -1,23 +1,31 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
class ToDoPage extends StatelessWidget { class ToDoPage extends StatefulWidget {
const ToDoPage({super.key}); const ToDoPage({super.key});
@override
State<ToDoPage> createState() => _ToDoPageState();
}
class _ToDoPageState extends State<ToDoPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return CollapsingListView(
backgroundColor: AppColors.bgScaffoldColor, title: "ToDo List".needTranslation,
appBar: AppBar( isLeading: false,
title: const Text('Appointments'), child: Column(
backgroundColor: AppColors.bgScaffoldColor, crossAxisAlignment: CrossAxisAlignment.start,
), children: [
body: const Center( SizedBox(height: 16.h),
child: Text( "Ancillary Orders".needTranslation.toText18(isBold: true),
'Appointments Page',
style: TextStyle(fontSize: 24), ],
), ).paddingSymmetrical(24.w, 0),
),
); );
} }
} }

@ -59,6 +59,7 @@ class CustomTabBarState extends State<CustomTabBar> {
if (widget.tabs.length > 3) { if (widget.tabs.length > 3) {
parentWidget = ListView.separated( parentWidget = ListView.separated(
shrinkWrap: true,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
@ -75,12 +76,12 @@ class CustomTabBarState extends State<CustomTabBar> {
} }
return Container( return Container(
height: 62.h,
padding: EdgeInsets.all(4.w), padding: EdgeInsets.all(4.w),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 12.r, borderRadius: 10.r,
), ),
height: 62.h,
child: Center(child: parentWidget)); child: Center(child: parentWidget));
} }
@ -92,7 +93,7 @@ class CustomTabBarState extends State<CustomTabBar> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: isSelected ? widget.activeBackgroundColor : widget.inActiveBackgroundColor, color: isSelected ? widget.activeBackgroundColor : widget.inActiveBackgroundColor,
borderRadius: 12.r, borderRadius: 10.r,
), ),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -113,7 +113,7 @@ class TextInputWidget extends StatelessWidget {
children: [ children: [
Container( Container(
padding: padding, padding: padding,
height: 58.h, height: 63.h,
alignment: Alignment.center, alignment: Alignment.center,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white, color: Colors.white,

Loading…
Cancel
Save