Hotfix app update sent to stores, VersionID 21.1, Lakum points implementation contd.

pull/311/head
haroon amjad 17 hours ago
parent 67bcd34344
commit b6c9fb96d4

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

@ -417,6 +417,7 @@ class AppAssets {
static const String comprehensiveCheckupAr = '$pngBasePath/cc_ar.png'; static const String comprehensiveCheckupAr = '$pngBasePath/cc_ar.png';
static const String maleIcon = '$pngBasePath/male_icon.png'; static const String maleIcon = '$pngBasePath/male_icon.png';
static const String femaleIcon = '$pngBasePath/female_icon.png'; static const String femaleIcon = '$pngBasePath/female_icon.png';
static const String lakumLogo = '$pngBasePath/lakum_logo.png';
static const String fullBodyFrontMale = '$pngBasePath/full_body_front_male.png'; static const String fullBodyFrontMale = '$pngBasePath/full_body_front_male.png';
static const String fullBodyBackMale = '$pngBasePath/full_body_back_male.png'; static const String fullBodyBackMale = '$pngBasePath/full_body_back_male.png';

@ -42,6 +42,8 @@ class HabibWalletViewModel extends ChangeNotifier {
String? get amountError => _amountError; String? get amountError => _amountError;
String? get hospitalError => _hospitalError; String? get hospitalError => _hospitalError;
String yahalaAccountNumber = '';
// Clear amount error // Clear amount error
void clearAmountError() { void clearAmountError() {
_amountError = null; _amountError = null;

@ -150,7 +150,7 @@ class _SavedLogin extends State<SavedLogin> {
fontSize: 12.f, fontSize: 12.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderRadius: 12.r, borderRadius: 12.r,
height: 40.h, height: 44.h,
padding: EdgeInsets.symmetric(vertical: 10.h), padding: EdgeInsets.symmetric(vertical: 10.h),
icon: (isOther == true && loginType == LoginTypeEnum.sms) ? AppAssets.whatsapp : getTypeIcons(loginType.toInt), icon: (isOther == true && loginType == LoginTypeEnum.sms) ? AppAssets.whatsapp : getTypeIcons(loginType.toInt),
iconColor: iconColor:

@ -41,6 +41,7 @@ import 'package:hmg_patient_app_new/presentation/contact_us/contact_us.dart';
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/data/landing_page_data.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/habib_wallet_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/lakum_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/large_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dart';
@ -456,7 +457,7 @@ class _LandingPageState extends State<LandingPage> {
padding: EdgeInsets.only(left: 16.h, right: 16.h), padding: EdgeInsets.only(left: 16.h, right: 16.h),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return SizedBox( return SizedBox(
height: isTablet ? 290.h : 255.h, height: isTablet ? 290.h : 255.h,
width: 250.w, width: 250.w,
child: getIndexSwiperCard(index), child: getIndexSwiperCard(index),
); );
@ -833,7 +834,26 @@ class _LandingPageState extends State<LandingPage> {
separatorBuilder: (BuildContext cxt, int index) => SizedBox(width: 16.w), separatorBuilder: (BuildContext cxt, int index) => SizedBox(width: 16.w),
), ),
), ),
appState.isAuthenticated ? HabibWalletCard() : SizedBox(), appState.isAuthenticated
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(
height: 170.h,
child: ListView.separated(
scrollDirection: Axis.horizontal,
itemCount: 2,
padding: EdgeInsetsDirectional.only(start: 24.h, end: 24.h),
itemBuilder: (BuildContext context, int index) {
return index == 0 ? HabibWalletCard() : LakumWalletCard();
},
separatorBuilder: (BuildContext context, int index) => SizedBox(width: 12.h),
),
),
],
)
: SizedBox(),
], ],
), ),
), ),

@ -23,23 +23,23 @@ class HabibWalletCard extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
children: [ children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true), // LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true),
// Row( // // Row(
// children: [ // // children: [
// LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true), // // LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
// SizedBox(width: 2.h), // // SizedBox(width: 2.h),
// Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h), // // Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
// ], // // ],
// ), // // ),
], // ],
).paddingSymmetrical(24.h, 0.h), // ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Container( Container(
// height: 150.h, // height: 150.h,
width: double.infinity, width: 355.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24, borderRadius: 24,
@ -104,7 +104,7 @@ class HabibWalletCard extends StatelessWidget {
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h), .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
], ],
), ),
Spacer(), // Spacer(),
Utils.getPaymentMethods(), Utils.getPaymentMethods(),
], ],
); );
@ -171,7 +171,7 @@ class HabibWalletCard extends StatelessWidget {
), ),
), ),
]), ]),
).paddingSymmetrical(24.h, 0.h).onPress(() { ).paddingSymmetrical(0.h, 0.h).onPress(() {
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: HabibWalletPage(), page: HabibWalletPage(),

@ -0,0 +1,189 @@
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/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.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/features/habib_wallet/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.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/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
class LakumWalletCard extends StatelessWidget {
const LakumWalletCard({super.key});
@override
Widget build(BuildContext context) {
return Column(
children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// LocaleKeys.myBalanceSubtitle.tr(context: context).toText16(isBold: true),
// // Row(
// // children: [
// // LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, isBold: true),
// // SizedBox(width: 2.h),
// // Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
// // ],
// // ),
// ],
// ).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h),
Container(
// height: 150.h,
width: 355.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24,
),
child: Stack(children: [
Positioned(
right: 0,
child: ClipRRect(
borderRadius: BorderRadius.circular(24.0),
child: Utils.buildImgWithAssets(
icon: AppAssets.lakumLogo,
width: 150.h,
height: 150.h,
)),
),
Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// LocaleKeys.habibWallet.tr(context: context).toText16(isBold: true, letterSpacing: -0.2),
"Lakum Wallet".toText16(isBold: true, letterSpacing: -0.2),
// 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),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
return Row(
mainAxisSize: MainAxisSize.max,
children: [
Row(
children: [
Utils.buildSvgWithAssets(
icon: AppAssets.saudi_riyal_icon,
iconColor: AppColors.inputLabelTextColor,
width: 24.h,
height: 24.h,
fit: BoxFit.contain,
),
SizedBox(width: 8.h),
NumberFormat.decimalPattern()
.format(habibWalletVM.habibWalletAmount)
.toString()
.toText32(isBold: true, isEnglishOnly: true)
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.h, width: 80.h, height: 40.h),
],
),
// Spacer(),
Utils.getPaymentMethods(),
],
);
}),
],
),
SizedBox(height: 16.h),
Row(
children: [
Expanded(
flex: 6,
child: CustomButton(
height: 40.h,
icon: AppAssets.recharge_icon,
iconColor: AppColors.infoColor,
iconSize: 24.h,
backgroundColor: AppColors.infoColor.withAlpha(15),
textColor: AppColors.infoColor,
text: LocaleKeys.recharge.tr(context: context),
borderWidth: 0.w,
fontWeight: FontWeight.w600,
borderColor: AppColors.infoColor.withAlpha(15),
padding: EdgeInsets.fromLTRB(4, 0, 12, 0),
fontSize: 14.f,
onPressed: () {
Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage()));
},
),
),
SizedBox(width: 8.h),
Expanded(
flex: 1,
child: Container(
height: (isFoldable || isTablet) ? 50.h : 40.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.textColor,
borderRadius: 10.h,
side: BorderSide(
color: AppColors.textColor,
width: 1.2,
),
),
child: Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.whiteColor,
width: 24.w,
height: 24.h,
fit: BoxFit.contain,
),
),
).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: HabibWalletPage(),
),
);
}),
),
],
),
],
),
),
]),
).paddingSymmetrical(0.h, 0.h).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: HabibWalletPage(),
),
);
}),
],
);
}
}

@ -48,7 +48,7 @@ class AttachmentOptions extends StatelessWidget {
).onPress(() async { ).onPress(() async {
await onGalleryTap(); await onGalleryTap();
}), }),
if (showFilesOption) SizedBox(height: 16.h), if (!showFilesOption) SizedBox(height: 16.h),
if (showFilesOption) if (showFilesOption)
checkInOptionCard( checkInOptionCard(
appState, appState,

@ -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.25+24 #version: 0.0.30+29
#version: 0.0.1+23 version: 0.0.4+1
environment: environment:
sdk: ">=3.6.0 <4.0.0" sdk: ">=3.6.0 <4.0.0"

Loading…
Cancel
Save