diff --git a/build - Shortcut.lnk b/build - Shortcut.lnk new file mode 100644 index 0000000..8d8aa1a Binary files /dev/null and b/build - Shortcut.lnk differ 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); }