diff --git a/lib/core/styles/app_text.dart b/lib/core/styles/app_text.dart index 28dfc73..1e74f03 100644 --- a/lib/core/styles/app_text.dart +++ b/lib/core/styles/app_text.dart @@ -133,7 +133,7 @@ class AppText { static const String walletText = "Wallet"; static const String day = "Today"; static const String filterTitle = "Filters"; - static const String onHold = "On hold"; + static const String onHold = "On Hold"; static const String deposit = "Deposit"; static const String withdrawal = "Withdrawal"; static const String yield = "Yield"; diff --git a/lib/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_top_section.dart b/lib/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_top_section.dart index ed41a4f..027d0e9 100644 --- a/lib/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_top_section.dart +++ b/lib/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_top_section.dart @@ -189,7 +189,7 @@ class InvestPayTopSection extends StatelessWidget { SizedBox( width: 0.8.sw, child: TextWidget().text12W500( - AppText.upgradeYourInvestorStatusToIncreaseText, + AppText.thisIsUsdInvestmentOpportunityText, clr: AppColor.languageTextColor, ), ), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/deposit/depositScreen.dart b/lib/features/MainScreens/Wallet/presentation/pages/deposit/depositScreen.dart index b92af1e..a7d0c5e 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/deposit/depositScreen.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/deposit/depositScreen.dart @@ -48,25 +48,40 @@ class _DepositScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - RichText( - text: TextSpan( + Container( + width: 0.55.sw, + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide(width: 1, color: Colors.grey))), + child: Row( children: [ - TextSpan( - text: AppText.balance, - style: GoogleFonts.dmSans( - color: const Color(0xFF888888), - fontSize: 12.sp, - fontWeight: FontWeight.w700, - ), - ), - TextSpan( - text: 'SAR 178,000 ', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w700, + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${AppText.balance}: ', + style: GoogleFonts.dmSans( + color: Colors.grey, + fontSize: 12.0, + fontWeight: FontWeight.bold, + ), + ), + TextSpan( + text: 'SAR 178,000', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), + const Icon( + Icons.arrow_forward, + color: Colors.grey, + size: 15, + ) ], ), ), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/deposit/preview.dart b/lib/features/MainScreens/Wallet/presentation/pages/deposit/preview.dart index d35d9f9..06f0fcd 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/deposit/preview.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/deposit/preview.dart @@ -1,9 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:gap/gap.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:tanami_app/core/routes/route_name.dart'; import 'package:tanami_app/core/routes/routes.dart'; import 'package:tanami_app/core/styles/app_text.dart'; import 'package:tanami_app/shared/components/text_widget.dart'; @@ -71,25 +69,40 @@ class _DepositPreviewState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - RichText( - text: TextSpan( + Container( + width: 0.55.sw, + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide(width: 1, color: Colors.grey))), + child: Row( children: [ - TextSpan( - text: AppText.balance, - style: GoogleFonts.dmSans( - color: const Color(0xFF888888), - fontSize: 12.sp, - fontWeight: FontWeight.w700, - ), - ), - TextSpan( - text: 'SAR 178,000 ', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w700, + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${AppText.balance}: ', + style: GoogleFonts.dmSans( + color: Colors.grey, + fontSize: 12.0, + fontWeight: FontWeight.bold, + ), + ), + TextSpan( + text: 'SAR 178,000 ', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), + const Icon( + Icons.arrow_forward, + color: Colors.grey, + size: 15, + ) ], ), ), @@ -219,7 +232,6 @@ class _DepositPreviewState extends State { height: 20.h, ), Container( - width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(22.r), color: const Color(0xFFEEF6FB), @@ -246,30 +258,32 @@ class _DepositPreviewState extends State { SizedBox( width: 10.w, ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - AppText.depositScreenTitle, - style: GoogleFonts.dmSans( - color: const Color(0xFF015698), - fontSize: 14.sp, - fontWeight: FontWeight.w700, - ), - ), - const Gap(4), - SizedBox( - width: 280.w, - child: Text( - AppText.info3, + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + AppText.depositScreenTitle, style: GoogleFonts.dmSans( color: const Color(0xFF015698), - fontSize: 12.sp, - fontWeight: FontWeight.w500, + fontSize: 14.sp, + fontWeight: FontWeight.w700, ), ), - ), - ], + const Gap(4), + SizedBox( + width: 280.w, + child: Text( + AppText.info3, + style: GoogleFonts.dmSans( + color: const Color(0xFF015698), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), ), ], ), @@ -347,7 +361,8 @@ class _DepositPreviewState extends State { height: 12.h, ), Divider( - color: Color(0xFFE3E3E3), height: 2.h), + color: const Color(0xFFE3E3E3), + height: 2.h), SizedBox( height: 12.h, ), @@ -371,13 +386,12 @@ class _DepositPreviewState extends State { children: [ GestureDetector( onTap: () { - goRouter.pushNamed( - RouteName.mainScreen, - ); + goRouter.pop(); + goRouter.pop(); }, child: Container( margin: const EdgeInsets.all(10.0), - height: 65.h, + height: 65.h, width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(22.r), @@ -401,7 +415,7 @@ class _DepositPreviewState extends State { const Gap(10), GestureDetector( onTap: () { - Navigator.pop(context); + goRouter.pop(); }, child: TextWidget().text14W700( AppText.back, diff --git a/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart b/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart index cdef83c..830c673 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart @@ -112,7 +112,7 @@ class WalletDetailsScreen extends StatelessWidget { ], ), child: TicketWidget( - height: 1.sh, + height: 360.sh, isCornerRounded: true, width: double.infinity, color: AppColor.plainWhite, @@ -169,6 +169,7 @@ class WalletDetailsScreen extends StatelessWidget { body: Padding( padding: const EdgeInsets.all(18.0), child: Container( + width: 1.sw, decoration: BoxDecoration( borderRadius: BorderRadius.circular(22.r), color: (type == 'Yield' || type == 'Refund') diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart index f520e0f..e882945 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart @@ -1,8 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:tanami_app/core/routes/route_name.dart'; import 'package:tanami_app/core/routes/routes.dart'; import 'package:tanami_app/core/styles/app_text.dart'; import 'package:ticket_widget/ticket_widget.dart'; @@ -59,7 +57,10 @@ class _WithdrawalConfirmationState extends State { actions: [ IconButton( onPressed: () { - goRouter.goNamed(RouteName.mainScreen); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); }, icon: const Icon( Icons.close_sharp, @@ -255,7 +256,10 @@ class _WithdrawalConfirmationState extends State { ), bottomNavigationBar: GestureDetector( onTap: () { - goRouter.goNamed(RouteName.mainScreen); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); }, child: Container( margin: const EdgeInsets.all(10.0), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart index 1c9955a..7f12ee2 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart @@ -80,25 +80,40 @@ class _WithdrawalPreviewState extends State { SizedBox( height: 20.h, ), - RichText( - text: TextSpan( + Container( + width: 0.55.sw, + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide(width: 1, color: Colors.grey))), + child: Row( children: [ - TextSpan( - text: AppText.balance, - style: GoogleFonts.dmSans( - color: const Color(0xFF888888), - fontSize: 12.sp, - fontWeight: FontWeight.w700, - ), - ), - TextSpan( - text: 'SAR 178,000 ', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w700, + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${AppText.balance}: ', + style: GoogleFonts.dmSans( + color: Colors.grey, + fontSize: 12.0, + fontWeight: FontWeight.bold, + ), + ), + TextSpan( + text: 'SAR 178,000', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), + const Icon( + Icons.arrow_forward, + color: Colors.grey, + size: 15, + ) ], ), ), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart index fbdd381..7ea00c1 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart @@ -5,11 +5,8 @@ import 'package:gap/gap.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:tanami_app/core/routes/route_name.dart'; import 'package:tanami_app/core/routes/routes.dart'; -import 'package:tanami_app/core/styles/app_color.dart'; import 'package:tanami_app/core/styles/app_text.dart'; -import '../../../../../../shared/components/button_widget.dart'; - class WithdrawalScreen extends StatefulWidget { const WithdrawalScreen({super.key}); @@ -51,7 +48,7 @@ class _WithdrawalScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - width: 0.5.sw, + width: 0.55.sw, decoration: const BoxDecoration( border: Border( bottom: BorderSide(width: 1, color: Colors.grey))), diff --git a/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart b/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart index 2fc1aeb..44125e3 100644 --- a/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart +++ b/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart @@ -1,3 +1,5 @@ +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:gap/gap.dart'; @@ -101,6 +103,7 @@ class WalletListSection extends StatelessWidget { } Widget getIcon(String title) { + log(title); if (title == 'Deposit') { return Container( decoration: const BoxDecoration( @@ -122,7 +125,7 @@ Widget getIcon(String title) { child: Image.asset(AppImages.withdrawalListIcon, height: 25.h), ), ); - } else if (title == 'Investment') { + } else if (title == 'Investment' || title == 'confirm-investment') { return Container( decoration: const BoxDecoration( shape: BoxShape.circle, color: AppColor.investmentListIconColor), diff --git a/lib/shared/components/form_label_textfield.dart b/lib/shared/components/form_label_textfield.dart index 64c42b2..c7a8f84 100644 --- a/lib/shared/components/form_label_textfield.dart +++ b/lib/shared/components/form_label_textfield.dart @@ -41,6 +41,7 @@ class FormLabelTextField extends StatelessWidget { type == "password" ? PasswordField( controller: textEditingController, + hintText: hintText, ) : textFormField( onInput: onChangeFun, diff --git a/lib/shared/components/password_text_form_field.dart b/lib/shared/components/password_text_form_field.dart index 6e09187..d25a951 100644 --- a/lib/shared/components/password_text_form_field.dart +++ b/lib/shared/components/password_text_form_field.dart @@ -13,8 +13,9 @@ import 'bloc/password_field/password_visibility_state.dart'; class PasswordField extends StatelessWidget { final TextEditingController controller; - - const PasswordField({super.key, required this.controller}); + final String hintText; + const PasswordField( + {super.key, required this.controller, required this.hintText}); @override Widget build(BuildContext context) { @@ -121,7 +122,7 @@ class PasswordField extends StatelessWidget { ) ], ), - hintText: 'Password', + hintText: hintText, suffixIcon: IconButton( icon: SvgPicture.asset( state.isPasswordVisible