From 89456bc2aa76beaf080f906801d25ca49509bf67 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 2 Sep 2025 17:24:12 +0300 Subject: [PATCH] Medical File Insurance tab content done --- assets/images/svg/eye_results_icon.svg | 4 ++ lib/core/app_assets.dart | 1 + .../medical_file/medical_file_page.dart | 69 ++++++++++++++++++- .../widgets/medical_file_card.dart | 44 ++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 assets/images/svg/eye_results_icon.svg create mode 100644 lib/presentation/medical_file/widgets/medical_file_card.dart diff --git a/assets/images/svg/eye_results_icon.svg b/assets/images/svg/eye_results_icon.svg new file mode 100644 index 0000000..fd9c754 --- /dev/null +++ b/assets/images/svg/eye_results_icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart index 0e7d944..cba90a1 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -59,6 +59,7 @@ class AppAssets { static const String habib_background_icon = '$svgBasePath/habib_logo_background.svg'; static const String show_icon = '$svgBasePath/show_icon.svg'; static const String recharge_icon = '$svgBasePath/recharge_icon.svg'; + static const String eye_result_icon = '$svgBasePath/eye_results_icon.svg'; // PNGS // static const String hmg_logo = '$pngBasePath/hmg_logo.png'; diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index f4ba507..6635ef5 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -5,6 +5,7 @@ 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/generated/locale_keys.g.dart'; +import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/input_widget.dart'; @@ -165,7 +166,7 @@ class MedicalFilePage extends StatelessWidget { SizedBox(height: 16.h), //Insurance Tab Data Container( - height: 150.h, + // height: 150.h, width: double.infinity, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( color: AppColors.whiteColor, @@ -174,6 +175,7 @@ class MedicalFilePage extends StatelessWidget { child: Padding( padding: EdgeInsets.all(16.h), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -202,10 +204,75 @@ class MedicalFilePage extends StatelessWidget { ), ], ), + SizedBox(height: 12.h), + "NCCI".toText12(isBold: true), + "NC_Dr Sulaiman Al Habib Medical Group".toText12(isBold: true), + SizedBox(height: 8.h), + Row( + children: [ + CustomButton( + icon: AppAssets.cross_circle, + iconColor: AppColors.primaryRedColor, + iconSize: 13.h, + text: "Expiry: 18 Mar, 2025", + onPressed: () {}, + backgroundColor: AppColors.primaryRedColor.withOpacity(0.1), + borderColor: AppColors.primaryRedColor.withOpacity(0.0), + textColor: AppColors.primaryRedColor, + fontSize: 10, + fontWeight: FontWeight.w500, + borderRadius: 12, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + SizedBox(width: 5.h), + CustomButton( + text: "Patient Card ID: 3628599", + onPressed: () {}, + backgroundColor: AppColors.greyColor, + borderColor: AppColors.greyColor, + textColor: AppColors.blackColor, + fontSize: 10, + fontWeight: FontWeight.normal, + borderRadius: 12, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + ], + ), + SizedBox(height: 10.h), + CustomButton( + icon: AppAssets.cross_circle, + iconColor: AppColors.primaryRedColor, + iconSize: 13.h, + text: "${LocaleKeys.updateInsurance.tr(context: context)} ${LocaleKeys.updateInsuranceSubtitle.tr(context: context)}", + onPressed: () {}, + backgroundColor: AppColors.bgGreenColor.withOpacity(0.20), + borderColor: AppColors.bgGreenColor.withOpacity(0.0), + textColor: AppColors.bgGreenColor, + fontSize: 14, + fontWeight: FontWeight.w500, + borderRadius: 12, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 40.h, + ), ], ), ), ), + SizedBox(height: 10.h), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 13), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 12), + shrinkWrap: true, + children: [ + MedicalFileCard(label: "Update Insurance", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon), + MedicalFileCard(label: "Insurance Approvals", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon), + MedicalFileCard(label: "My Invoices List", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon), + MedicalFileCard(label: "Ancillary Orders List", textColor: AppColors.blackColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon), + ], + ), ], ), ), diff --git a/lib/presentation/medical_file/widgets/medical_file_card.dart b/lib/presentation/medical_file/widgets/medical_file_card.dart new file mode 100644 index 0000000..92bb4ee --- /dev/null +++ b/lib/presentation/medical_file/widgets/medical_file_card.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; +import 'package:hmg_patient_app_new/core/utils/utils.dart'; +import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; +import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; + +class MedicalFileCard extends StatelessWidget { + final String label; + + // final Color svgColor; + final Color textColor; + final Color backgroundColor; + final String svgIcon; + + MedicalFileCard({ + required this.label, + // required this.svgColor, + required this.textColor, + required this.backgroundColor, + this.svgIcon = "", + }); + + @override + Widget build(BuildContext context) { + return Container( + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: backgroundColor, + borderRadius: 20, + ), + child: Padding( + padding: EdgeInsets.all(8.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Utils.buildSvgWithAssets(icon: svgIcon, width: 30.h, height: 30.h, fit: BoxFit.contain), + SizedBox(height: 12.h), + label.toText11(color: textColor, isBold: true), + ], + ), + ), + ); + } +}