wallet details screen changes

This commit is contained in:
jayesh
2024-06-12 11:28:44 +05:30
parent 0d2d6b7f8d
commit 84ac88da10
5 changed files with 83 additions and 6 deletions

BIN
build - Shortcut.lnk Normal file

Binary file not shown.

View File

@@ -43,7 +43,7 @@ class RouteName {
//Biometric //Biometric
static const String biometricScreen = 'biometricScreen'; static const String biometricScreen = 'biometricScreen';
//Biometric //Otp Screen
static const String otpScreen = 'otpScreen'; static const String otpScreen = 'otpScreen';
//Pin Screen //Pin Screen

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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_color.dart';
import '../../../../../../core/styles/app_text.dart'; import '../../../../../../core/styles/app_text.dart';
import '../../../../../../shared/components/button_widget.dart'; import '../../../../../../shared/components/button_widget.dart';
@@ -21,7 +23,10 @@ class ConfirmInvestBottomSection extends StatelessWidget {
height: 60.h, height: 60.h,
child: ButtonWidget().elevatedBtn( child: ButtonWidget().elevatedBtn(
txtClr: AppColor.plainWhite, txtClr: AppColor.plainWhite,
function: () {}, function: () {
goRouter.pushNamed(RouteName.otpScreen,
pathParameters: {"fromScreen": "confirm-investment"});
},
text: AppText.investText, text: AppText.investText,
clr: AppColor.primaryColor2, clr: AppColor.primaryColor2,
), ),

View File

@@ -1,8 +1,12 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.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 'package:tanami_app/core/styles/app_text.dart';
import '../../../../../core/styles/app_color.dart';
import '../../../../../shared/components/button_widget.dart';
class WalletDetails extends StatelessWidget { class WalletDetails extends StatelessWidget {
final String type; final String type;
WalletDetails({super.key, required this.type}); WalletDetails({super.key, required this.type});
@@ -57,13 +61,54 @@ class WalletDetails extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, 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( appBar: AppBar(
backgroundColor: Colors.white, backgroundColor: Colors.white,
elevation: 0, 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, scrolledUnderElevation: 0.0,
centerTitle: true, centerTitle: true,
title: Text( title: Text(
AppText.walletDetailsTitle, type == "confirm-investment"
? AppText.investmentConfirmationText
: AppText.walletDetailsTitle,
style: GoogleFonts.dmSans( style: GoogleFonts.dmSans(
color: const Color(0xFF272727), color: const Color(0xFF272727),
fontSize: 20.sp, fontSize: 20.sp,
@@ -102,7 +147,7 @@ class WalletDetails extends StatelessWidget {
height: 16.h, height: 16.h,
), ),
Text( Text(
type, type == "confirm-investment" ? "Investment" : type,
style: GoogleFonts.dmSans( style: GoogleFonts.dmSans(
color: const Color(0xFF191B1E), color: const Color(0xFF191B1E),
fontSize: 14.sp, fontSize: 14.sp,
@@ -112,6 +157,19 @@ class WalletDetails extends StatelessWidget {
SizedBox( SizedBox(
height: 4.h, 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( Text(
'10/04/2024 22:04', '10/04/2024 22:04',
style: GoogleFonts.dmSans( style: GoogleFonts.dmSans(
@@ -131,6 +189,16 @@ class WalletDetails extends StatelessWidget {
fontWeight: FontWeight.w900, 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( SizedBox(
@@ -192,7 +260,7 @@ class WalletDetails extends StatelessWidget {
height: 25.h), height: 25.h),
), ),
); );
} else if (title == 'Investment') { } else if (title == 'Investment' || title == 'confirm-investment') {
return Container( return Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
shape: BoxShape.circle, color: Color(0xFF0172CB)), shape: BoxShape.circle, color: Color(0xFF0172CB)),
@@ -231,7 +299,7 @@ class WalletDetails extends StatelessWidget {
return Container(); return Container();
} else if (type == 'Refund') { } else if (type == 'Refund') {
return Container(); return Container();
} else if (type == 'Investment') { } else if (type == 'Investment' || type == "confirm-investment") {
return Container( return Container(
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration( decoration: const BoxDecoration(

View File

@@ -37,6 +37,10 @@ class OtpFillSection extends StatelessWidget {
goRouter.pushNamed(RouteName.forgotPasswordScreen); goRouter.pushNamed(RouteName.forgotPasswordScreen);
} else if (fromScreen == "withdrawal") { } else if (fromScreen == "withdrawal") {
goRouter.pushNamed(RouteName.withdrawalConfirmation); goRouter.pushNamed(RouteName.withdrawalConfirmation);
} else if (fromScreen == "confirm-investment") {
goRouter.pushNamed(RouteName.walletDetails, pathParameters: {
"type": 'confirm-investment',
});
} else { } else {
goRouter.pushNamed(RouteName.registerUserDetailsScreen); goRouter.pushNamed(RouteName.registerUserDetailsScreen);
} }