diff --git a/assets/images/png/Apple_Pay.png b/assets/images/png/Apple_Pay.png new file mode 100644 index 0000000..1dc7504 Binary files /dev/null and b/assets/images/png/Apple_Pay.png differ diff --git a/assets/images/png/Mada.png b/assets/images/png/Mada.png new file mode 100644 index 0000000..905a5ba Binary files /dev/null and b/assets/images/png/Mada.png differ diff --git a/assets/images/png/Mastercard.png b/assets/images/png/Mastercard.png new file mode 100644 index 0000000..5d8b1fa Binary files /dev/null and b/assets/images/png/Mastercard.png differ diff --git a/assets/images/png/male_img.png b/assets/images/png/male_img.png new file mode 100644 index 0000000..21932cd Binary files /dev/null and b/assets/images/png/male_img.png differ diff --git a/assets/images/png/tamara_en.png b/assets/images/png/tamara_en.png new file mode 100644 index 0000000..84d85b2 Binary files /dev/null and b/assets/images/png/tamara_en.png differ diff --git a/assets/images/png/visa.png b/assets/images/png/visa.png new file mode 100644 index 0000000..3a6d90d Binary files /dev/null and b/assets/images/png/visa.png differ diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart index bfc1229..0e7d944 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -2,8 +2,6 @@ class AppAssets { static const String svgBasePath = 'assets/images/svg'; static const String pngBasePath = 'assets/images/png'; - - static const String hmg = '$svgBasePath/hmg.svg'; static const String arrow_back = '$svgBasePath/arrow-back.svg'; static const String calendar = '$svgBasePath/calendar.svg'; @@ -53,11 +51,25 @@ class AppAssets { static const String home_calendar_icon = '$svgBasePath/home_calendar_icon.svg'; static const String add_icon = '$svgBasePath/add_icon.svg'; static const String livecare_icon = '$svgBasePath/livecare_icon.svg'; + static const String file_icon = '$svgBasePath/file_icon.svg'; + static const String checkmark_icon = '$svgBasePath/checkmark_icon.svg'; + static const String blood_icon = '$svgBasePath/blood_icon.svg'; + static const String insurance_active_icon = '$svgBasePath/insurance_active_icon.svg'; + static const String saudi_riyal_icon = '$svgBasePath/Saudi_Riyal_Symbol.svg'; + 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'; // PNGS // static const String hmg_logo = '$pngBasePath/hmg_logo.png'; static const String livecare_service = '$pngBasePath/livecare_service.png'; + static const String male_img = '$pngBasePath/male_img.png'; + static const String apple_pay = '$pngBasePath/Apple_Pay.png'; + static const String mada = '$pngBasePath/Mada.png'; + static const String Mastercard = '$pngBasePath/Mastercard.png'; + static const String tamara_en = '$pngBasePath/tamara_en.png'; + static const String visa = '$pngBasePath/visa.png'; } class AppAnimations { @@ -65,5 +77,4 @@ class AppAnimations { static const String login = '$lottieBasePath/login.json'; static const String register = '$lottieBasePath/register.json'; static const String checkmark = '$lottieBasePath/checkmark.json'; - -} \ No newline at end of file +} diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index 14e91f8..bdca5ff 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:google_api_availability/google_api_availability.dart'; +import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; @@ -473,6 +474,19 @@ class Utils { ); } + static Widget getPaymentMethods() { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.asset(AppAssets.mada, width: 25, height: 25), + Image.asset(AppAssets.tamara_en, width: 25, height: 25), + Image.asset(AppAssets.visa, width: 25, height: 25), + Image.asset(AppAssets.Mastercard, width: 25, height: 25), + Image.asset(AppAssets.apple_pay, width: 25, height: 25), + ], + ); + } static Future isGoogleServicesAvailable() async { GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability(); String status = availability.toString().split('.').last; diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index 22355cc..27e95de 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -11,14 +11,23 @@ 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/features/authentication/authentication_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; +import 'package:hmg_patient_app_new/presentation/authantication/login.dart'; import 'package:hmg_patient_app_new/presentation/home/data/landing_page_data.dart'; +import 'package:hmg_patient_app_new/presentation/home/widgets/habib_wallet_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart'; +import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; +import 'package:hmg_patient_app_new/providers/authentication_view_model.dart'; import 'package:hmg_patient_app_new/providers/bottom_navigation_provider.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:provider/provider.dart'; +import '../../core/app_assets.dart'; +import '../../core/utils/utils.dart'; +import '../../widgets/buttons/custom_button.dart'; +import '../../widgets/transitions/fade_page.dart'; + class LandingPage extends StatefulWidget { const LandingPage({super.key}); @@ -62,7 +71,14 @@ class _LandingPageState extends State { icon: AppAssets.contact_icon, width: 24, height: 24, - ), + ).onPress(() { + Navigator.of(context).push( + FadePage( + page: MedicalFilePage(), + // page: LoginScreen(), + ), + ); + }), ], ), ), @@ -110,7 +126,7 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - "Quick Links".toText14(isBold: true), + "Quick Links".toText16(isBold: true), Row( children: [ "View medical file".toText12(color: AppColors.primaryRedColor), @@ -213,7 +229,7 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - "Services".toText14(isBold: true), + "Services".toText16(isBold: true), Row( children: [ "View all services".toText12(color: AppColors.primaryRedColor), @@ -258,25 +274,7 @@ class _LandingPageState extends State { ), ), SizedBox(height: 16.h), - appState.isAuthenticated - ? Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - "My Balance".toText14(isBold: true), - Row( - children: [ - "View all services".toText12(color: AppColors.primaryRedColor), - SizedBox(width: 2.h), - Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), - ], - ), - ], - ), - ], - ) - : SizedBox(), + appState.isAuthenticated ? HabibWalletCard() : SizedBox(), ], ), ), diff --git a/lib/presentation/home/widgets/habib_wallet_card.dart b/lib/presentation/home/widgets/habib_wallet_card.dart new file mode 100644 index 0000000..9b513db --- /dev/null +++ b/lib/presentation/home/widgets/habib_wallet_card.dart @@ -0,0 +1,127 @@ +import 'package:flutter/material.dart'; +import 'package:hmg_patient_app_new/core/app_assets.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'; +import 'package:hmg_patient_app_new/theme/colors.dart'; +import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; + +class HabibWalletCard extends StatelessWidget { + const HabibWalletCard({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + "My Balance".toText16(isBold: true), + Row( + children: [ + "View all services".toText12(color: AppColors.primaryRedColor), + SizedBox(width: 2.h), + Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), + ], + ), + ], + ), + SizedBox(height: 16.h), + Container( + // height: 150.h, + width: double.infinity, + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, + borderRadius: 24, + ), + child: Stack(children: [ + Positioned( + right: 0, + child: ClipRRect(borderRadius: BorderRadius.circular(24.0), child: Utils.buildSvgWithAssets(icon: AppAssets.habib_background_icon, width: 150.h, height: 150.h)), + ), + Padding( + padding: EdgeInsets.all(14.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + "Habib Wallet".toText15(isBold: true), + Container( + height: 40.h, + width: 40.h, + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.textColor, + borderRadius: 8.h, + ), + child: Padding( + padding: EdgeInsets.all(8.h), + child: Utils.buildSvgWithAssets( + icon: AppAssets.show_icon, + width: 12.h, + height: 12.h, + fit: BoxFit.contain, + ), + ), + ), + ], + ), + SizedBox(height: 4.h), + Row( + children: [ + Utils.buildSvgWithAssets( + icon: AppAssets.saudi_riyal_icon, + iconColor: AppColors.dividerColor, + width: 24.h, + height: 24.h, + fit: BoxFit.contain, + ), + SizedBox(width: 8.h), + "200.18".toText32(isBold: true), + ], + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 50.h), + child: Row( + children: [ + "View details".toText12(color: AppColors.primaryRedColor), + SizedBox(width: 2.h), + Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), + ], + ), + ), + SizedBox(height: 16.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: 150.h, + child: Utils.getPaymentMethods(), + ), + CustomButton( + icon: AppAssets.recharge_icon, + iconSize: 18.h, + text: "Recharge", + onPressed: () {}, + backgroundColor: AppColors.infoColor, + borderColor: AppColors.infoColor, + textColor: AppColors.whiteColor, + fontSize: 12, + fontWeight: FontWeight.bold, + borderRadius: 12, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 35.h, + ), + ], + ), + ], + ), + ), + ]), + ) + ], + ); + } +} diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index dff7f75..55ca84b 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -1,5 +1,13 @@ +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:hmg_patient_app_new/core/app_assets.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/generated/locale_keys.g.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'; class MedicalFilePage extends StatelessWidget { const MedicalFilePage({super.key}); @@ -12,12 +20,152 @@ class MedicalFilePage extends StatelessWidget { title: const Text('Appointments'), backgroundColor: AppColors.bgScaffoldColor, ), - body: const Center( - child: Text( - 'Appointments Page', - style: TextStyle(fontSize: 24), + body: Padding( + padding: EdgeInsets.all(24.h), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LocaleKeys.medicalFile.tr(context: context).toText22(isBold: true), + SizedBox(height: 16.h), + TextInputWidget( + labelText: LocaleKeys.search.tr(context: context), + hintText: "Type any record", + controller: TextEditingController(), + keyboardType: TextInputType.number, + isEnable: true, + prefix: null, + autoFocus: false, + isBorderAllowed: false, + isAllowLeadingIcon: true, + padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h), + leadingIcon: AppAssets.student_card, + hasError: true, + ), + SizedBox(height: 16.h), + Container( + width: double.infinity, + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, + borderRadius: 24, + ), + child: Padding( + padding: EdgeInsets.all(16.h), + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + AppAssets.male_img, + width: 56.h, + height: 56.h, + ), + SizedBox(width: 8.h), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + "Haroon Amjad".toText18(isBold: true), + SizedBox(height: 4.h), + Row( + children: [ + CustomButton( + icon: AppAssets.file_icon, + iconColor: AppColors.blackColor, + iconSize: 12.h, + text: "File no: 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(width: 4.h), + CustomButton( + icon: AppAssets.checkmark_icon, + iconColor: AppColors.successColor, + iconSize: 13.h, + text: LocaleKeys.verified.tr(context: context), + 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: 16.h), + Divider(color: AppColors.dividerColor, height: 1.h), + SizedBox(height: 16.h), + Row( + children: [ + CustomButton( + text: "30 Years Old", + 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(width: 4.h), + CustomButton( + icon: AppAssets.blood_icon, + iconColor: AppColors.primaryRedColor, + iconSize: 13.h, + text: "Blood: A+", + 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(width: 4.h), + CustomButton( + icon: AppAssets.insurance_active_icon, + iconColor: AppColors.successColor, + iconSize: 13.h, + text: "Insurance Active", + onPressed: () {}, + backgroundColor: AppColors.bgGreenColor.withOpacity(0.20), + borderColor: AppColors.bgGreenColor.withOpacity(0.0), + textColor: AppColors.blackColor, + fontSize: 10, + fontWeight: FontWeight.normal, + borderRadius: 12, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + height: 30.h, + ), + ], + ), + SizedBox(height: 8.h), + ], + ), + ), + ) + ], + ), ), ), ); } -} \ No newline at end of file +} diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart index 09e2a38..a6b3362 100644 --- a/lib/theme/colors.dart +++ b/lib/theme/colors.dart @@ -30,6 +30,7 @@ class AppColors { static const Color bgGreenColor = Color(0xFF18C273); static const Color textColor = Color(0xFF2E3039); static const Color borderOnlyColor = Color(0xFF2E3039); + static const Color dividerColor = Color(0xFFD2D2D2); //Chips static const Color successColor = Color(0xff18C273); diff --git a/lib/widgets/buttons/custom_button.dart b/lib/widgets/buttons/custom_button.dart index e08189a..5413cea 100644 --- a/lib/widgets/buttons/custom_button.dart +++ b/lib/widgets/buttons/custom_button.dart @@ -20,6 +20,7 @@ class CustomButton extends StatelessWidget { final bool isDisabled; final Color iconColor; final double height; + final double iconSize; CustomButton({ Key? key, @@ -38,6 +39,7 @@ class CustomButton extends StatelessWidget { this.icon, this.iconColor = Colors.white, this.height = 56, + this.iconSize = 24, }) : super(key: key); @override @@ -62,7 +64,7 @@ class CustomButton extends StatelessWidget { if (icon != null) Padding( padding: const EdgeInsets.only(right: 8.0), - child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isDisabled), + child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isDisabled, width: iconSize, height: iconSize), ), Text( text,