From 4aab52074da337d17c97638643c7b9db7fe2bbed Mon Sep 17 00:00:00 2001 From: meet2711 Date: Tue, 18 Jun 2024 19:21:53 +0530 Subject: [PATCH] bugs solved yield --- lib/core/routes/routes.dart | 4 +- .../presentation/pages/walletDetails.dart | 10 + lib/features/MainScreens/main_screen.dart | 2 +- lib/shared/components/text_widget.dart | 195 +++++++++++------- 4 files changed, 130 insertions(+), 81 deletions(-) diff --git a/lib/core/routes/routes.dart b/lib/core/routes/routes.dart index 35acb65..ddf77fb 100644 --- a/lib/core/routes/routes.dart +++ b/lib/core/routes/routes.dart @@ -10,7 +10,7 @@ import 'package:tanami_app/features/MainScreens/Portfolio/presentation/pages/por import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/deposit/depositScreen.dart'; import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/deposit/preview.dart'; import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/filter_screen.dart'; -import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart'; +import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/walletDetails.dart'; import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/withdrawal/confirmation.dart'; import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart'; import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart'; @@ -169,7 +169,7 @@ final goRouter = GoRouter( name: RouteName.walletDetails, path: "${RouteName.walletDetails}/:type", builder: (context, state) { - return WalletDetailsScreen( + return WalletDetails( type: state.pathParameters["type"]!, ); }), diff --git a/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart b/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart index a3722b6..e9d4132 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart @@ -275,6 +275,16 @@ class WalletDetails extends StatelessWidget { fontWeight: FontWeight.w900, ), ), + (type == "Yield") + ? Text( + "+ \$100.00", + style: GoogleFonts.dmSans( + color: const Color(0xFF363636), + fontSize: 12.sp, + fontWeight: FontWeight.w500, + ), + ) + : const SizedBox(), ], ), SizedBox( diff --git a/lib/features/MainScreens/main_screen.dart b/lib/features/MainScreens/main_screen.dart index 1dec790..b52d79f 100644 --- a/lib/features/MainScreens/main_screen.dart +++ b/lib/features/MainScreens/main_screen.dart @@ -4,7 +4,7 @@ import 'package:tanami_app/features/MainScreens/Academy/presentation/pages/acade import 'package:tanami_app/features/MainScreens/Invest/presentation/pages/invest_screen.dart'; import 'package:tanami_app/features/MainScreens/Portfolio/presentation/pages/portfolio_screen.dart'; import 'package:tanami_app/features/MainScreens/Settings/presentation/pages/settings_Screen.dart'; -import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/wallet_screen.dart'; +import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/walletScreen.dart'; import 'package:tanami_app/shared/components/common_bottom_navigation.dart'; import '../../shared/components/bloc/bottom_nav_bar/bottom_navigation_bloc.dart'; diff --git a/lib/shared/components/text_widget.dart b/lib/shared/components/text_widget.dart index 7e7fb45..2166f03 100644 --- a/lib/shared/components/text_widget.dart +++ b/lib/shared/components/text_widget.dart @@ -6,64 +6,85 @@ import 'package:tanami_app/core/styles/app_color.dart'; class TextWidget { //Text Size 11 Widget text11W400(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 11.sp, - fontWeight: FontWeight.w400, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 11.sp, + fontWeight: FontWeight.w400, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text11W500(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 11.sp, - fontWeight: FontWeight.w500, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 11.sp, + fontWeight: FontWeight.w500, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text11W700(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 11.sp, - fontWeight: FontWeight.w700, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 11.sp, + fontWeight: FontWeight.w700, + color: clr ?? AppColor.plainWhite, + ), + ); } //Text Size 12 Widget text12W400(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 12.sp, - fontWeight: FontWeight.w400, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 12.sp, + fontWeight: FontWeight.w400, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text12W500(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 12.sp, - fontWeight: FontWeight.w500, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 12.sp, + fontWeight: FontWeight.w500, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text12W700(String text, {Color? clr, TextDecoration? txtDec, Color? decClr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 12.sp, - decorationColor: decClr ?? AppColor.plainWhite, - decoration: txtDec ?? TextDecoration.none, - fontWeight: FontWeight.w700, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 12.sp, + decorationColor: decClr ?? AppColor.plainWhite, + decoration: txtDec ?? TextDecoration.none, + fontWeight: FontWeight.w700, + color: clr ?? AppColor.plainWhite, + ), + ); } //Text Size 13 Widget text13W500(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 13, - fontWeight: FontWeight.w500, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 13, + fontWeight: FontWeight.w500, + color: clr ?? AppColor.plainWhite, + ), + ); } //Text Size 14 @@ -75,15 +96,18 @@ class TextWidget { int? maxLine, TextOverflow? txtOverflow, }) { - return Text(text, - textAlign: txtAlign ?? TextAlign.center, - maxLines: maxLine ?? 20, - overflow: txtOverflow ?? TextOverflow.ellipsis, - style: GoogleFonts.dmSans( - fontSize: 14.sp, - fontWeight: FontWeight.w400, - decoration: textDecoration ?? TextDecoration.none, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + textAlign: txtAlign ?? TextAlign.center, + maxLines: maxLine ?? 20, + overflow: txtOverflow ?? TextOverflow.ellipsis, + style: GoogleFonts.dmSans( + fontSize: 14.sp, + fontWeight: FontWeight.w400, + decoration: textDecoration ?? TextDecoration.none, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text14W500( @@ -110,24 +134,30 @@ class TextWidget { TextDecoration? textDecoration, TextAlign? txtAlign, }) { - return Text(text, - textAlign: txtAlign ?? TextAlign.center, - style: GoogleFonts.dmSans( - fontSize: 14.sp, - fontWeight: FontWeight.w600, - decoration: textDecoration ?? TextDecoration.none, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + textAlign: txtAlign ?? TextAlign.center, + style: GoogleFonts.dmSans( + fontSize: 14.sp, + fontWeight: FontWeight.w600, + decoration: textDecoration ?? TextDecoration.none, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text14W700(String text, {Color? clr, TextDecoration? textDecoration, TextAlign? txtAlign}) { - return Text(text, - textAlign: txtAlign ?? TextAlign.center, - style: GoogleFonts.dmSans( - fontSize: 14.sp, - fontWeight: FontWeight.w700, - decoration: textDecoration ?? TextDecoration.none, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + textAlign: txtAlign ?? TextAlign.center, + style: GoogleFonts.dmSans( + fontSize: 14.sp, + fontWeight: FontWeight.w700, + decoration: textDecoration ?? TextDecoration.none, + color: clr ?? AppColor.plainWhite, + ), + ); } //Text Size 15 @@ -138,14 +168,17 @@ class TextWidget { TextDecoration? textDecoration, TextAlign? txtAlign, }) { - return Text(text, - textAlign: txtAlign ?? TextAlign.center, - style: GoogleFonts.dmSans( - decoration: textDecoration ?? TextDecoration.none, - decorationColor: clr ?? AppColor.plainWhite, - fontSize: 15.sp, - fontWeight: FontWeight.w400, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + textAlign: txtAlign ?? TextAlign.center, + style: GoogleFonts.dmSans( + decoration: textDecoration ?? TextDecoration.none, + decorationColor: clr ?? AppColor.plainWhite, + fontSize: 15.sp, + fontWeight: FontWeight.w400, + color: clr ?? AppColor.plainWhite, + ), + ); } Widget text15W500( @@ -266,11 +299,14 @@ class TextWidget { } Widget text22W900(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 22.sp, - fontWeight: FontWeight.w900, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 22.sp, + fontWeight: FontWeight.w900, + color: clr ?? AppColor.plainWhite, + ), + ); } //Text Size 20 @@ -286,11 +322,14 @@ class TextWidget { } Widget text20W900(String text, {Color? clr}) { - return Text(text, - style: GoogleFonts.dmSans( - fontSize: 20, - fontWeight: FontWeight.w900, - color: clr ?? AppColor.plainWhite)); + return Text( + text, + style: GoogleFonts.dmSans( + fontSize: 20, + fontWeight: FontWeight.w900, + color: clr ?? AppColor.plainWhite, + ), + ); } //Text Size 28