From 84ac88da10c5c447430bc1170401df553e68c278 Mon Sep 17 00:00:00 2001 From: jayesh Date: Wed, 12 Jun 2024 11:28:44 +0530 Subject: [PATCH] wallet details screen changes --- build - Shortcut.lnk | Bin 0 -> 864 bytes lib/core/routes/route_name.dart | 2 +- .../confirm_invest_bottom_section.dart | 7 +- .../presentation/pages/walletDetails.dart | 76 +++++++++++++++++- .../widgets/otp_fill_section.dart | 4 + 5 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 build - Shortcut.lnk diff --git a/build - Shortcut.lnk b/build - Shortcut.lnk new file mode 100644 index 0000000000000000000000000000000000000000..8d8aa1a59aa775bfebcd4e291f1b40f84de77562 GIT binary patch literal 864 zcmeZaU|?VrVFHp23fz*l1`!7NfCv5;6kb_n3M{(8!JutmFjta6-^D5ht_ZwU`hNRNWoD>EdxXG8iPe<@&flOxX0(l=21PGJkE;uqI zF_Z$$%wb3Y3X1@-4-m@$G05W}+8l^Mz#E9AftVSHi}$VC0}4F9)N+Ne{G8IbwdKs0uj=mwr!8BwAk9SkB_a7@prbh%7#8>f%{B}U2!3m@_m(q5r~C3B7lfA- zrzwHr0_0Byc_0RP09&vsFlaEiFjz5Yf)oNl4-kV4Gx(^w{k^-Cz|xOQ2|e>(uaO0c zbAc3q3}XXgxQRDAU_m{L2g-=m8@Yq^^)M$YYYecZ%SOS1d7W6G1z2KEP^}`gVlS;@d47o zzyQ(=GIXO@uFKlq0*~b$4th&$D|$d4%m69y0OHFgr7f$qSNOM|*!Stn>%Yw)aTovq Da(KZ` literal 0 HcmV?d00001 diff --git a/lib/core/routes/route_name.dart b/lib/core/routes/route_name.dart index c5f13d2..fb859d3 100644 --- a/lib/core/routes/route_name.dart +++ b/lib/core/routes/route_name.dart @@ -43,7 +43,7 @@ class RouteName { //Biometric static const String biometricScreen = 'biometricScreen'; - //Biometric + //Otp Screen static const String otpScreen = 'otpScreen'; //Pin Screen diff --git a/lib/features/MainScreens/Invest/presentation/widgets/payment/confirm_invest_bottom_section.dart b/lib/features/MainScreens/Invest/presentation/widgets/payment/confirm_invest_bottom_section.dart index 5bd95cc..56040ae 100644 --- a/lib/features/MainScreens/Invest/presentation/widgets/payment/confirm_invest_bottom_section.dart +++ b/lib/features/MainScreens/Invest/presentation/widgets/payment/confirm_invest_bottom_section.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import '../../../../../../core/routes/route_name.dart'; +import '../../../../../../core/routes/routes.dart'; import '../../../../../../core/styles/app_color.dart'; import '../../../../../../core/styles/app_text.dart'; import '../../../../../../shared/components/button_widget.dart'; @@ -21,7 +23,10 @@ class ConfirmInvestBottomSection extends StatelessWidget { height: 60.h, child: ButtonWidget().elevatedBtn( txtClr: AppColor.plainWhite, - function: () {}, + function: () { + goRouter.pushNamed(RouteName.otpScreen, + pathParameters: {"fromScreen": "confirm-investment"}); + }, text: AppText.investText, clr: AppColor.primaryColor2, ), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart b/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart index ec02a90..8d8edbd 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart @@ -1,8 +1,12 @@ 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/routes.dart'; import 'package:tanami_app/core/styles/app_text.dart'; +import '../../../../../core/styles/app_color.dart'; +import '../../../../../shared/components/button_widget.dart'; + class WalletDetails extends StatelessWidget { final String type; WalletDetails({super.key, required this.type}); @@ -57,13 +61,54 @@ class WalletDetails extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, + bottomNavigationBar: type == "confirm-investment" + ? Container( + margin: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 15, + ), + width: 1.sw, + height: 60.h, + child: ButtonWidget().elevatedBtn( + txtClr: AppColor.plainWhite, + function: () { + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + }, + text: AppText.closeText, + clr: AppColor.primaryColor2, + ), + ) + : const SizedBox(), appBar: AppBar( backgroundColor: Colors.white, elevation: 0, + automaticallyImplyLeading: type == "confirm-investment" ? false : true, + actions: [ + type == "confirm-investment" + ? IconButton( + onPressed: () { + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + }, + icon: const Icon( + Icons.cancel_outlined, + color: Color(0xFF363636), + )) + : const SizedBox() + ], scrolledUnderElevation: 0.0, centerTitle: true, title: Text( - AppText.walletDetailsTitle, + type == "confirm-investment" + ? AppText.investmentConfirmationText + : AppText.walletDetailsTitle, style: GoogleFonts.dmSans( color: const Color(0xFF272727), fontSize: 20.sp, @@ -102,7 +147,7 @@ class WalletDetails extends StatelessWidget { height: 16.h, ), Text( - type, + type == "confirm-investment" ? "Investment" : type, style: GoogleFonts.dmSans( color: const Color(0xFF191B1E), fontSize: 14.sp, @@ -112,6 +157,19 @@ class WalletDetails extends StatelessWidget { SizedBox( height: 4.h, ), + type == "confirm-investment" + ? Text( + "Name of investment", + style: GoogleFonts.dmSans( + color: const Color(0xFF191B1E), + fontSize: 17.sp, + fontWeight: FontWeight.w700, + ), + ) + : const SizedBox(), + SizedBox( + height: 4.h, + ), Text( '10/04/2024 22:04', style: GoogleFonts.dmSans( @@ -131,6 +189,16 @@ class WalletDetails extends StatelessWidget { fontWeight: FontWeight.w900, ), ), + type == "confirm-investment" + ? Text( + "+ \$100.00", + style: GoogleFonts.dmSans( + color: const Color(0xFF363636), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ) + : const SizedBox(), ], ), SizedBox( @@ -192,7 +260,7 @@ class WalletDetails extends StatelessWidget { height: 25.h), ), ); - } else if (title == 'Investment') { + } else if (title == 'Investment' || title == 'confirm-investment') { return Container( decoration: const BoxDecoration( shape: BoxShape.circle, color: Color(0xFF0172CB)), @@ -231,7 +299,7 @@ class WalletDetails extends StatelessWidget { return Container(); } else if (type == 'Refund') { return Container(); - } else if (type == 'Investment') { + } else if (type == 'Investment' || type == "confirm-investment") { return Container( width: double.infinity, decoration: const BoxDecoration( diff --git a/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart b/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart index 334dfd0..a3213df 100644 --- a/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart +++ b/lib/features/otpVerification/presentation/widgets/otp_fill_section.dart @@ -37,6 +37,10 @@ class OtpFillSection extends StatelessWidget { goRouter.pushNamed(RouteName.forgotPasswordScreen); } else if (fromScreen == "withdrawal") { goRouter.pushNamed(RouteName.withdrawalConfirmation); + } else if (fromScreen == "confirm-investment") { + goRouter.pushNamed(RouteName.walletDetails, pathParameters: { + "type": 'confirm-investment', + }); } else { goRouter.pushNamed(RouteName.registerUserDetailsScreen); }