From f09ef2b05eaa1f1bf2a77d4852c36594b68dc172 Mon Sep 17 00:00:00 2001 From: meet2711 Date: Mon, 10 Jun 2024 19:47:29 +0530 Subject: [PATCH] withdraw done --- assets/images/wallet_screen/done.png | Bin 0 -> 1966 bytes assets/images/wallet_screen/info.png | Bin 0 -> 1634 bytes lib/core/routes/route_name.dart | 3 + lib/core/routes/routes.dart | 24 + .../presentation/pages/walletDetails.dart | 146 +++--- .../presentation/pages/walletScreen.dart | 50 +- .../pages/withdrawal/confirmation.dart | 267 +++++++++++ .../pages/withdrawal/preview.dart | 343 ++++++++++++++ .../pages/withdrawal/withdrawalScreen.dart | 435 ++++++++++++++++++ .../pages/change_password_layout.dart | 17 +- .../presentation/pages/otp_layout.dart | 19 +- .../widgets/otp_fill_section.dart | 10 +- 12 files changed, 1211 insertions(+), 103 deletions(-) create mode 100644 assets/images/wallet_screen/done.png create mode 100644 assets/images/wallet_screen/info.png create mode 100644 lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart create mode 100644 lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart create mode 100644 lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart diff --git a/assets/images/wallet_screen/done.png b/assets/images/wallet_screen/done.png new file mode 100644 index 0000000000000000000000000000000000000000..ab8da3a56d48d62436c827d130f18697033c01be GIT binary patch literal 1966 zcmV;f2T}NmP)@~0drDELIAGL9O(c600d`2O+f$vv5yP-IL74!7n1bIrH=Cl#O2=D^uRRl!JRFIHBxI&FoRHzYB1H|6py>(r+QRAIi&#rgv`ALo=Ym~^}xAW%Bo81|} zVzF2(7K_DVv5Xo5ai+ML0or+_++&W!xRfFbK`#%P-P5`Wi3Yz5Asa4411{Eq^cJcU zO~jOV8SqeW$B}0wMBynS2ShgLi>|q@a}7wX#mSI(7%*SY3yBN#Tb^DSgp7b(_ROeG z)-YfOX8>L8j%XF7@PrRt^rs^mQaEL_ch^yUyMX}^y#cWhelHZFT(RO-b7e$Kv<8%J z%m_FO=3={P9`=Y!lPidbXbdQBW<{#CL|IB6$)G0P)?5@}$wA0CrFu~~t<409&lH4{ z-o*UIG(sl49^l3Lc3BE}0SSf#s=AB0IfO(w25`s`t*i9c$1w~@Y)RQV7e+`jZvcz$ zv{&Oh&<2GDXt#aVvKW0Tg=ZX91QDg6doW>qdbL=#-Q#k0Yd84w4mV z8{o{<%cGTYsv@#LOS|x>Hwcg1gi9M5kkiL?7X9^lfU}#o;`bz@+Y7V|u(97C;h?C~ zUfqECje@=UmB^r2&#N|8Ho%dXf<+1H1akD=kz zkwd6X9rfNb&!w>b%ioy!vVq%w{tH87AX;bW{hD7xr4Tes;fFAt04XHU0*8)9d7CKP>*z zhuNNO^3)T|A+jo^34a4pt;8?3TzKadU-6mdP8&w)i~~LKH$cMokHndU_s39~QVT7$ zTZR)o$3Jo?i~%Bxgu>!4yf>!QcI(aqlxn}hDAIqa*4F?bk{SPX#eetnpV0ira0uc@ zs(et%f)cmtr6WFvolwMw+QsWX5tGOwLFkCTT)&6&GyxkVDl=i@Js@*1O_|Bdm^zuk zUzB-l-Pu9)ySshQM3+9wVtVqhQrl?67g@g+YNZH+WM6z1-_lGp`@%DiKI56_)EgO` zrBD#m1Re3qUvJ~nZ?+K!LVrMGFB~2o7rzUC#wCJdWRMQro4%TTEs^3gksH8aXFs|o zsMcgyeC|z!lWI{iZsId4^MD2-MAd|@_~T;-p~8T~_bo?9-UGI_ANaQ6!dNd8cpUkD z{zTlx$HT1?dg5<@kPR5*{FPtPP#9?0giR9piRTu-D z+Xw+&6ZT7A_tM;HVdBycF%TadKGyu2_#4nptsx}Xgf|y|R2rC7VDWh}cXN9Ou|OWU z>DR>H0B>bKyi}AILAWRMYXbMAc!^K(U*WC@#Wi6W>b^Q%6Kc1D?V}Vs@xhg7tf{n9 zn+FK7j*wv!K3Mu0D|Nlt-4*{fg|k>8h0;ZME1U^HA@a%Oz6JmYkGm7Dd(Rx5bldIod`tTnQ4Oe7!649 zHR0++L%JCGP(%Z7v7eo@`dgH*=BlHd6?xyi(%&}6{ofVgrZ4ioniw_sI~&;0wSNP= ztSEhMq*7BZH}FQT1~9vArD(4rq0bX2SK7gd>u;!y;vOvW&{< zP*(yYJHiA`i+e*Nc3PB@*1u(IHi{!mqCLcidxLNmVmm-I2DRoIXNyQk0=d2i1mKFZeR&9c3x_n$~> zW%mwlekz66X9Z0JUHU9$f?F&Wi^XEGSS%LH|HA$+i}0h&ga7~l07*qoM6N<$f*?|* A^Z)<= literal 0 HcmV?d00001 diff --git a/assets/images/wallet_screen/info.png b/assets/images/wallet_screen/info.png new file mode 100644 index 0000000000000000000000000000000000000000..e7fabcd1301282d8b6c6bd23a37469403f5e2fe0 GIT binary patch literal 1634 zcmV-o2A%ndP)@~0drDELIAGL9O(c600d`2O+f$vv5yPtn&%#UgL-a zQ8-nq0}@BDghU0|-N%~=sh}j;nf0!B*M2|AZB?%l?fdV0^XAR$8$eMMMNt$*QIti4 zP-VIYEgYgbRe7~8*zc$|R7NbnSB9-_ZIK}D&S0M_7*Xi1EH zi$SYr7&#+6mKz-=iP;4j!zu|<4FNVr9b(*-e|6;3LctJtCrRiL`YS_}OnCyx({3p0 zGC9K+ZuGO^F_YOu+}JJ4D`qc1B@F*M5~9Q-lK#pjX3T5_=!U82=%7Z%w}_`U53sTS1q!A(4{)(Q z-elsts4-%oe)3?Yhk__Z02^{BdMrPE3G)EskU6?tL`ceC0Bd{`KdJ6On-v+LllW%d zBIGN;+#3Is{6)x5fVnsRDfx)&6WzmIFdp5X{sQk0P;NP&UpB0`M1LW7Ju!azkcX=vrI(;VppSa$|p;5HIi!Lw*9- z!56#+#g~rnVC*MABkn*6!4Ae=1xhag>|RYMVHiJ~c?rO%)s~VU6L*UBlU+U=U~z!hsPK|Z7A8`^rhNV0f;pIXU4u#m4Z(e zq^n*T@p*WC#(*}I!cY$=6l$kkQTY1-%Ei=9fXT}k^F-|gIQ-?0bH5urtL*#O=i)OD z7^6ab`OS+ny!V)RL6l}SmM9OMqSS}VIDvUf(b*P>-^>cgk30MFnK++>GJ?f z+&qMdtUHxn8BMmXU--S**heMc=2M@`{5(KnnM^8%P`r?kz2p0$hJPu7@HG@a7(2d~ z`U|k-8r;>d+&F7&_Ot!5SNO3672_lfWqu!aQDB(Okn6*$p-Iz*A@zduuunfXf-=T1 z0Zs;E^@4Md!sSlkZ%H~Y&>}$gP*9G7p#bAs^52?h(^GEToU4J^HSf;f_?BW1a9AI0%P$CO z-%>SPs%bO5g3g#J{sfKg-WnOIV~0h_?s!ucR|;JToY@g3vZ!ypp%$GMnPvT(qdT)W z!eqvW_=q=IgBBx|WnwWUXVy=ZTeikQ;Ek zTCzu!X82R8ag^a#dp8i9HJVLVu9H1Z%>9tv3q?`A!#r(=5u#PHi#<7c2D{D0JP@M~ z+>T{E%+nJq$fe_Jh^gax7TKe06Wc7?y)yNmw3bhIaJyHk { color: Colors.black, width: 20.0, ), - Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.black, - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - 'assets/images/wallet_screen/withdraw.png', - height: 20.h, + GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.withdrawalScreen); + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.black, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/wallet_screen/withdraw.png', + height: 20.h, + ), ), ), - ), - Text( - 'Withdraw', - style: GoogleFonts.dmSans( - color: const Color(0xFF363636), - fontSize: 12.sp, - fontWeight: FontWeight.w700, + Text( + 'Withdraw', + style: GoogleFonts.dmSans( + color: const Color(0xFF363636), + fontSize: 12.sp, + fontWeight: FontWeight.w700, + ), ), - ), - ], + ], + ), ), ], ), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart new file mode 100644 index 0000000..d7738b7 --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart @@ -0,0 +1,267 @@ +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'; + +class WithdrawalConfirmation extends StatefulWidget { + const WithdrawalConfirmation({super.key}); + + @override + State createState() => _WithdrawalConfirmationState(); +} + +class _WithdrawalConfirmationState extends State { + final Map data = { + 'Payment method': 'Google/Apple Pay', + 'Account Name': 'Name Surname', + 'IBAN': 'DE 1234 5678 9012 3456', + 'Beneficiary Address': 'Hohenzollernring 58, 95444', + 'Bank Name': 'Bank Name', + 'Branch Address': 'Hohenzollernring 58, 95444', + 'SWIFT/BIC code': 'BC12345', + 'Reference ID': 'FRYU FHDU 1234', + }; + + @override + Widget build(BuildContext context) { + final List> entries = data.entries.toList(); + + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + automaticallyImplyLeading: false, + backgroundColor: Colors.white, + elevation: 0, + scrolledUnderElevation: 0.0, + centerTitle: true, + title: Text( + 'Withdrawal confirmation', + style: GoogleFonts.dmSans( + color: const Color(0xFF272727), + fontSize: 20.sp, + fontWeight: FontWeight.w700, + ), + ), + actions: [ + IconButton( + onPressed: () { + goRouter.goNamed(RouteName.mainScreen); + }, + icon: const Icon( + Icons.close_sharp, + ), + ), + ], + ), + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(18.0, 10, 18.0, 0), + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/wallet_screen/done.png', + height: 25.h, + ), + SizedBox( + width: 10.w, + ), + SizedBox( + width: 320.w, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Please confirm the withdrawal amount and verify the accuracy of your bank details.', + style: GoogleFonts.dmSans( + color: const Color(0xFF015698), + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + SizedBox( + height: 4.h, + ), + Text( + 'Processing times vary from 3-7 working days', + style: GoogleFonts.dmSans( + color: const Color(0xFF015698), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 20.h, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 18.0), + child: Container( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: const Offset(0, 8), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFE6681F), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/wallet_screen/withdraw_list.png', + height: 25.h, + ), + ), + ), + SizedBox( + height: 16.h, + ), + Text( + 'Withdrawal', + style: GoogleFonts.dmSans( + color: const Color(0xFF191B1E), + fontSize: 14.sp, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 4.h, + ), + Text( + '10/04/2024 22:04', + style: GoogleFonts.dmSans( + color: const Color(0xFF8D8D8D), + fontSize: 11.sp, + fontWeight: FontWeight.w500, + ), + ), + SizedBox( + height: 16.h, + ), + Text( + '- SAR 1000', + style: GoogleFonts.dmSans( + color: const Color(0xFF191B1E), + fontSize: 20.sp, + fontWeight: FontWeight.w900, + ), + ), + ], + ), + SizedBox( + height: 35.h, + ), + ListView.builder( + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: entries.length, + itemBuilder: (context, index) { + return Column( + children: [ + Padding( + padding: + const EdgeInsets.symmetric(vertical: 12.0), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text( + entries[index].key, + style: GoogleFonts.dmSans( + color: const Color(0xFF535353), + fontSize: 14.sp, + fontWeight: FontWeight.w500, + ), + ), + SizedBox( + width: 175.w, + child: Text( + entries[index].value, + textAlign: TextAlign.end, + style: GoogleFonts.dmSans( + color: const Color(0xFF191B1E), + fontSize: 14.sp, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + (index != entries.length - 1) + ? Divider() + : Container() + ], + ); + }, + ), + ], + ), + ), + ), + ), + SizedBox( + height: 10.h, + ), + ], + ), + ), + bottomNavigationBar: GestureDetector( + onTap: () { + goRouter.goNamed(RouteName.mainScreen); + }, + child: Container( + margin: const EdgeInsets.all(12.0), + height: 56.h, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: const Color(0xFF004717), + ), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 20.0), + child: Center( + child: Text( + 'Close', + style: GoogleFonts.dmSans( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart new file mode 100644 index 0000000..a2bdc66 --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart @@ -0,0 +1,343 @@ +import 'package:flutter/material.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'; + +class WithdrawalPreview extends StatefulWidget { + const WithdrawalPreview({super.key}); + + @override + State createState() => _WithdrawalPreviewState(); +} + +class _WithdrawalPreviewState extends State { + @override + Widget build(BuildContext context) { + List titles = [ + 'Account Holder Name/Beneficiary Name', + 'IBAN', + 'Beneficiary Address', + 'Bank Name', + 'Branch Address', + 'SWIFT/BIC Code', + ]; + List values = [ + 'Name Surname', + 'DE 1234 5678 9012 3456', + 'Hohenzollernring 58, 95444', + 'Name Bank', + 'Hohenzollernring 58, 95444', + 'BC12345', + ]; + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + backgroundColor: Colors.white, + elevation: 0, + scrolledUnderElevation: 0.0, + centerTitle: true, + title: Text( + 'Withdrawal confirmation', + style: GoogleFonts.dmSans( + color: const Color(0xFF272727), + fontSize: 20.sp, + fontWeight: FontWeight.w700, + ), + ), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/wallet_screen/info.png', + height: 25.h, + ), + SizedBox( + width: 10.w, + ), + SizedBox( + width: 320.w, + child: Text( + 'Please confirm the withdrawal amount and verify the accuracy of your bank details.', + style: GoogleFonts.dmSans( + color: const Color(0xFF015698), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ), + ), + ], + ), + SizedBox( + height: 20.h, + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Wallet 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, + ), + ), + ], + ), + ), + SizedBox( + height: 20.h, + ), + Container( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: const Offset(0, 5), + ), + ], + ), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFE6681F)), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Image.asset( + 'assets/images/wallet_screen/withdraw_list.png', + height: 36.h, + ), + ), + ), + SizedBox( + width: 12.w, + ), + Text( + 'Withdrawal', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 17.sp, + fontWeight: FontWeight.w700, + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(22.r), + bottomRight: Radius.circular(22.r), + ), + color: const Color(0xFFD8D8D8).withOpacity(0.4), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 16.0, horizontal: 12.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'Total Withdrawal amount:', + style: GoogleFonts.dmSans( + color: const Color(0xFF535353), + fontSize: 14.sp, + fontWeight: FontWeight.w500, + ), + ), + Text( + 'SAR 1000', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 20.h, + ), + Container( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: const Color(0xFFEEF6FB), + border: Border.all(color: const Color(0xFF90D4FF)), + boxShadow: const [ + BoxShadow( + color: Color(0xFFB0D3EF), + spreadRadius: 1, + blurRadius: 10, + offset: Offset(0, 3), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 12.0, horizontal: 16.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/wallet_screen/info.png', + height: 25.h, + ), + SizedBox( + width: 10.w, + ), + Text( + 'Payment can include transfer fee from your bank', + style: GoogleFonts.dmSans( + color: const Color(0xFF015698), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ), + SizedBox( + height: 20.h, + ), + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Withdrawal details', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 15.sp, + fontWeight: FontWeight.w700, + ), + ), + SizedBox( + height: 10.h, + ), + const Divider( + color: Color(0xFFE3E3E3), + ), + SizedBox( + height: 10.h, + ), + ListView.builder( + physics: const NeverScrollableScrollPhysics(), + itemCount: titles.length, + shrinkWrap: true, + itemBuilder: (context, index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + titles[index], + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + SizedBox( + height: 8.h, + ), + Text( + values[index], + style: GoogleFonts.dmSans( + color: const Color(0xFF191B1E), + fontSize: 14.sp, + fontWeight: FontWeight.w400, + ), + ), + (index != titles.length - 1) + ? Column( + children: [ + SizedBox( + height: 10.h, + ), + const Divider( + color: Color(0xFFE3E3E3), + ), + SizedBox( + height: 10.h, + ), + ], + ) + : SizedBox( + height: 10.h, + ), + ], + ); + }, + ) + ], + ), + ], + ), + ), + ), + bottomNavigationBar: GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.otpScreen, pathParameters: { + "fromScreen": 'withdrawal', + }); + }, + child: Container( + margin: const EdgeInsets.all(12.0), + height: 56.h, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: const Color(0xFF004717), + ), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 20.0), + child: Center( + child: Text( + 'Submit request', + style: GoogleFonts.dmSans( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart new file mode 100644 index 0000000..aafc040 --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart @@ -0,0 +1,435 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.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'; + +class WithdrawalScreen extends StatefulWidget { + const WithdrawalScreen({super.key}); + + @override + State createState() => _WithdrawalScreenState(); +} + +class _WithdrawalScreenState extends State { + @override + Widget build(BuildContext context) { + List titles = [ + 'Account Holder Name/Beneficiary Name *', + 'IBAN *', + 'Beneficiary Address', + 'Bank Name', + 'Branch Address', + 'SWIFT/BIC Code', + ]; + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + backgroundColor: Colors.white, + elevation: 0, + scrolledUnderElevation: 0.0, + centerTitle: true, + title: Text( + 'Enter bank details', + style: GoogleFonts.dmSans( + color: const Color(0xFF272727), + fontSize: 20.sp, + fontWeight: FontWeight.w700, + ), + ), + ), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Wallet 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, + ), + ), + ], + ), + ), + SizedBox( + height: 20.h, + ), + Container( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: const Offset(0, 5), + ), + ], + ), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFE6681F)), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Image.asset( + 'assets/images/wallet_screen/withdraw_list.png', + height: 36.h, + ), + ), + ), + SizedBox( + width: 12.w, + ), + Text( + 'Withdrawal', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 17.sp, + fontWeight: FontWeight.w700, + ), + ), + ], + ), + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(22.r), + bottomRight: Radius.circular(22.r), + ), + color: Color(0xFFD8D8D8).withOpacity(0.4), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 16.0, horizontal: 12.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'SAR', + style: GoogleFonts.dmSans( + color: const Color(0xFF363636), + fontSize: 15.sp, + fontWeight: FontWeight.w700, + ), + ), + SizedBox( + width: 12.w, + ), + SizedBox( + width: 280.w, + child: TextFormField( + cursorColor: Colors.black, + keyboardType: TextInputType.number, + textAlign: TextAlign.center, + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 16.sp, + fontWeight: FontWeight.w400, + ), + decoration: InputDecoration( + hintText: '1000', + hintStyle: GoogleFonts.dmSans( + color: const Color(0xFFC6C6C6), + fontSize: 16.sp, + fontWeight: FontWeight.w400, + ), + labelStyle: + const TextStyle(color: Colors.black), + contentPadding: const EdgeInsets.symmetric( + vertical: 15, horizontal: 10), + filled: true, + fillColor: Colors.white, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + disabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.red, width: 1), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.red, width: 1), + ), + ), + inputFormatters: [ + FilteringTextInputFormatter.deny( + RegExp(r'\s')), + LengthLimitingTextInputFormatter(20), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 20.h, + ), + Container( + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: const Color(0xFFEEF6FB), + border: Border.all(color: const Color(0xFF90D4FF)), + boxShadow: const [ + BoxShadow( + color: Color(0xFFB0D3EF), + spreadRadius: 1, + blurRadius: 10, + offset: Offset(0, 3), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 12.0, horizontal: 16.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/wallet_screen/info.png', + height: 25.h, + ), + SizedBox( + width: 10.w, + ), + Text( + 'Payment can include transfer fee from your bank', + style: GoogleFonts.dmSans( + color: const Color(0xFF015698), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ), + SizedBox( + height: 20.h, + ), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: const Color(0xFFF4F4F4), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: const Offset(0, 5), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 22, 20, 0), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Withdrawal details', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 15.sp, + fontWeight: FontWeight.w700, + ), + ), + SizedBox( + height: 3.h, + ), + Text( + 'Fields with * are required', + style: GoogleFonts.dmSans( + color: const Color(0xFF8D8D8D), + fontSize: 14.sp, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + SizedBox( + height: 10.h, + ), + const Divider( + color: Colors.grey, + ), + SizedBox( + height: 10.h, + ), + ListView.builder( + physics: const NeverScrollableScrollPhysics(), + itemCount: titles.length, + shrinkWrap: true, + itemBuilder: (context, index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + titles[index], + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + SizedBox( + height: 8.h, + ), + SizedBox( + width: double.infinity, + child: TextFormField( + cursorColor: Colors.black, + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 16.sp, + fontWeight: FontWeight.w400, + ), + decoration: InputDecoration( + hintText: 'Value', + hintStyle: GoogleFonts.dmSans( + color: const Color(0xFFC6C6C6), + fontSize: 16.sp, + fontWeight: FontWeight.w400, + ), + labelStyle: + const TextStyle(color: Colors.black), + contentPadding: const EdgeInsets.symmetric( + vertical: 15, horizontal: 10), + filled: true, + fillColor: Colors.white, + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + disabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.white, width: 1), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.red, width: 1), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: const BorderSide( + color: Colors.red, width: 1), + ), + ), + inputFormatters: [ + FilteringTextInputFormatter.deny( + RegExp(r'\s')), + LengthLimitingTextInputFormatter(20), + ], + ), + ), + SizedBox( + height: 22.h, + ), + ], + ); + }, + ) + ], + ), + ), + ), + ], + ), + ), + ), + bottomNavigationBar: GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.withdrawalPreview); + }, + child: Container( + margin: const EdgeInsets.all(12.0), + height: 56.h, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: const Color(0xFF004717), + ), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 20.0), + child: Center( + child: Text( + 'Next', + style: GoogleFonts.dmSans( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w700, + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/changePassword/presentation/pages/change_password_layout.dart b/lib/features/changePassword/presentation/pages/change_password_layout.dart index 0445e8d..3f4345d 100644 --- a/lib/features/changePassword/presentation/pages/change_password_layout.dart +++ b/lib/features/changePassword/presentation/pages/change_password_layout.dart @@ -11,13 +11,14 @@ class ChangePasswordLayout extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ListView( - children: const [ - RestorePasswordTopSection(), - RestorePasswordForm(), - Gap(150), - RestorePasswordBottomSection(), - ], - )); + body: ListView( + children: const [ + RestorePasswordTopSection(), + RestorePasswordForm(), + Gap(150), + RestorePasswordBottomSection(), + ], + ), + ); } } diff --git a/lib/features/otpVerification/presentation/pages/otp_layout.dart b/lib/features/otpVerification/presentation/pages/otp_layout.dart index 7bd3166..b51cc16 100644 --- a/lib/features/otpVerification/presentation/pages/otp_layout.dart +++ b/lib/features/otpVerification/presentation/pages/otp_layout.dart @@ -14,14 +14,15 @@ class OtpLayout extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ListView( - children: [ - const OtpTopSection(), - OtpFillSection( - fromScreen: fromScreen, - ), - const ResendOtpSection(), - ], - )); + body: ListView( + children: [ + const OtpTopSection(), + OtpFillSection( + fromScreen: fromScreen, + ), + const ResendOtpSection(), + ], + ), + ); } } diff --git a/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart b/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart index 07cdf96..334dfd0 100644 --- a/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart +++ b/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart @@ -33,9 +33,13 @@ class OtpFillSection extends StatelessWidget { AppText.otpVerifiedSucessfully, ); - fromScreen == "forgot-password" - ? goRouter.pushNamed(RouteName.forgotPasswordScreen) - : goRouter.pushNamed(RouteName.registerUserDetailsScreen); + if (fromScreen == "forgot-password") { + goRouter.pushNamed(RouteName.forgotPasswordScreen); + } else if (fromScreen == "withdrawal") { + goRouter.pushNamed(RouteName.withdrawalConfirmation); + } else { + goRouter.pushNamed(RouteName.registerUserDetailsScreen); + } } else if (state is OtpSubmissionFailure) { goRouter.pop(); errorToastMessage(