From ca6ea98839869082384e43d65839ac6cac74fc74 Mon Sep 17 00:00:00 2001 From: jayesh Date: Mon, 17 Jun 2024 13:25:36 +0530 Subject: [PATCH] ui fix --- lib/core/routes/routes.dart | 6 +- lib/core/styles/app_color.dart | 9 + lib/core/styles/app_images.dart | 21 +- lib/core/styles/app_text.dart | 5 +- .../pages/invest_details_layout.dart | 75 +-- .../presentation/pages/invest_layout.dart | 3 +- .../presentation/pages/invest_screen.dart | 2 +- .../{filterScreen.dart => filter_screen.dart} | 9 +- .../presentation/pages/walletDetails.dart | 540 ------------------ .../presentation/pages/walletScreen.dart | 447 --------------- .../pages/wallet_details_screen.dart | 326 +++++++++++ .../presentation/pages/wallet_screen.dart | 187 ++++++ .../pages/withdrawal/withdrawalScreen.dart | 87 +-- .../widgets/wallet_list_section.dart | 196 +++++++ .../widgets/yield_detail_section.dart | 41 ++ lib/features/MainScreens/main_screen.dart | 4 +- lib/shared/components/text_widget.dart | 10 +- pubspec.lock | 128 +++-- pubspec.yaml | 5 + 19 files changed, 960 insertions(+), 1141 deletions(-) rename lib/features/MainScreens/Wallet/presentation/pages/{filterScreen.dart => filter_screen.dart} (98%) delete mode 100644 lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart delete mode 100644 lib/features/MainScreens/Wallet/presentation/pages/walletScreen.dart create mode 100644 lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart create mode 100644 lib/features/MainScreens/Wallet/presentation/pages/wallet_screen.dart create mode 100644 lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart create mode 100644 lib/features/MainScreens/Wallet/presentation/widgets/yield_detail_section.dart diff --git a/lib/core/routes/routes.dart b/lib/core/routes/routes.dart index 9494d55..35acb65 100644 --- a/lib/core/routes/routes.dart +++ b/lib/core/routes/routes.dart @@ -9,8 +9,8 @@ import 'package:tanami_app/features/MainScreens/Invest/presentation/pages/paymen import 'package:tanami_app/features/MainScreens/Portfolio/presentation/pages/portfolio_details_screen.dart'; 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/filterScreen.dart'; -import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/walletDetails.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/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 WalletDetails( + return WalletDetailsScreen( type: state.pathParameters["type"]!, ); }), diff --git a/lib/core/styles/app_color.dart b/lib/core/styles/app_color.dart index 6e0cf78..0392b4c 100644 --- a/lib/core/styles/app_color.dart +++ b/lib/core/styles/app_color.dart @@ -92,4 +92,13 @@ class AppColor { static const Color investKycBoxShadow2Color = Color(0xA0DAF0FF); static const Color investTextColor = Color(0xFF066123); static const Color investPaymentTextColor = Color(0xFF535353); + + //Wallet Color + static const Color onHoldTextColor = Color(0xFF0172CB); + + static const Color depositListIconColor = Color(0xFF0FA4A4); + static const Color withdrawalListIconColor = Color(0xFFE6681F); + static const Color investmentListIconColor = Color(0xFF0172CB); + static const Color yieldListIconColor = Color(0xFF4C4AEF); + static const Color refundListIconColor = Color(0xFF0E9445); } diff --git a/lib/core/styles/app_images.dart b/lib/core/styles/app_images.dart index 94652c1..a885969 100644 --- a/lib/core/styles/app_images.dart +++ b/lib/core/styles/app_images.dart @@ -118,7 +118,26 @@ class AppImages { 'assets/images/invest_screen/svg/apple_pay.svg'; //No Internet - static const String noInternetImage = 'assets/images/no_internet/png/no_internet.png'; + + //Wallet + static const String walletBg = 'assets/images/wallet_screen/bg.png'; + static const String depositIcon = 'assets/images/wallet_screen/deposit.png'; + static const String withdrawIcon = 'assets/images/wallet_screen/withdraw.png'; + static const String walletSearchIcon = + 'assets/images/wallet_screen/search.png'; + static const String walletFilterIcon = + 'assets/images/wallet_screen/filter.png'; + + static const String depositListIcon = + 'assets/images/wallet_screen/deposit_list.png'; + static const String withdrawalListIcon = + 'assets/images/wallet_screen/withdraw_list.png'; + static const String investmentListIcon = + 'assets/images/wallet_screen/invest_list.png'; + static const String yieldListIcon = + 'assets/images/wallet_screen/yield_list.png'; + static const String refundListIcon = + 'assets/images/wallet_screen/refund_list.png'; } diff --git a/lib/core/styles/app_text.dart b/lib/core/styles/app_text.dart index 0d9f543..28dfc73 100644 --- a/lib/core/styles/app_text.dart +++ b/lib/core/styles/app_text.dart @@ -158,7 +158,7 @@ class AppText { 'Please confirm the withdrawal amount and verify the accuracy of your bank details.'; static const String workingDays = 'Processing times vary from 3-7 working days'; - static const String balance = 'Wallet Balance: '; + static const String balance = 'Wallet Balance'; static const String withdrawTitle = 'Withdrawal'; static const String depositTitle = 'Deposit'; static const String withdrawDetails = 'Withdrawal details'; @@ -294,4 +294,7 @@ class AppText { static const String investmentConfirmationText = "Investment confirmation"; static const String enterAmountText = "Enter Amount"; static const String pleaseEnterAmountText = "Please Enter Amount"; + + //Wallet + static const String withdrawText = 'Withdraw'; } diff --git a/lib/features/MainScreens/Invest/presentation/pages/invest_details_layout.dart b/lib/features/MainScreens/Invest/presentation/pages/invest_details_layout.dart index e8b5af0..9b8d98a 100644 --- a/lib/features/MainScreens/Invest/presentation/pages/invest_details_layout.dart +++ b/lib/features/MainScreens/Invest/presentation/pages/invest_details_layout.dart @@ -14,44 +14,47 @@ class InvestDetailsLayout extends StatelessWidget { @override Widget build(BuildContext context) { - return SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 20.0), - child: Column( - children: [ - Container( - decoration: BoxDecoration( - color: AppColor.plainWhite, - borderRadius: const BorderRadius.all(Radius.circular(20.0)), - boxShadow: [ - BoxShadow( - color: AppColor.plainBlack.withOpacity(0.15), - spreadRadius: 2, - blurRadius: 10, - offset: const Offset(0, 3), - ), - ], + return Scaffold( + backgroundColor: AppColor.plainWhite, + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 20.0), + child: Column( + children: [ + Container( + decoration: BoxDecoration( + color: AppColor.plainWhite, + borderRadius: const BorderRadius.all(Radius.circular(20.0)), + boxShadow: [ + BoxShadow( + color: AppColor.plainBlack.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: const Offset(0, 3), + ), + ], + ), + child: Column( + children: [ + InvestDetailCarouselView(), + const InvestDetailDetailsSection(), + ], + ), ), - child: Column( - children: [ - InvestDetailCarouselView(), - const InvestDetailDetailsSection(), - ], + Gap( + 20.h, ), - ), - Gap( - 20.h, - ), - const KeyInvestmentSection(), - Gap( - 20.h, - ), - const InvestIncludedDocumentsSection(), - Gap( - 20.h, - ), - const InvestVideoSection(), - ], + const KeyInvestmentSection(), + Gap( + 20.h, + ), + const InvestIncludedDocumentsSection(), + Gap( + 20.h, + ), + const InvestVideoSection(), + ], + ), ), ), ); diff --git a/lib/features/MainScreens/Invest/presentation/pages/invest_layout.dart b/lib/features/MainScreens/Invest/presentation/pages/invest_layout.dart index d6e00cf..39ef508 100644 --- a/lib/features/MainScreens/Invest/presentation/pages/invest_layout.dart +++ b/lib/features/MainScreens/Invest/presentation/pages/invest_layout.dart @@ -21,6 +21,7 @@ class InvestLayout extends StatelessWidget { return DefaultTabController( length: 2, child: Scaffold( + backgroundColor: AppColor.plainWhite, body: Column( children: [ TabBar( @@ -36,7 +37,7 @@ class InvestLayout extends StatelessWidget { fontWeight: FontWeight.normal, fontSize: 14.0, ), - overlayColor: MaterialStateProperty.all(Colors.transparent), + overlayColor: WidgetStateProperty.all(Colors.transparent), labelColor: AppColor.plainBlack, unselectedLabelColor: AppColor.charcoalColor, indicatorColor: AppColor.plainBlack, diff --git a/lib/features/MainScreens/Invest/presentation/pages/invest_screen.dart b/lib/features/MainScreens/Invest/presentation/pages/invest_screen.dart index 076515d..3724908 100644 --- a/lib/features/MainScreens/Invest/presentation/pages/invest_screen.dart +++ b/lib/features/MainScreens/Invest/presentation/pages/invest_screen.dart @@ -21,7 +21,7 @@ class _InvestScreenState extends State { return Scaffold( backgroundColor: AppColor.plainWhite, appBar: AppBar( - // backgroundColor: Colors.white, + backgroundColor: AppColor.plainWhite, elevation: 0, scrolledUnderElevation: 0, automaticallyImplyLeading: false, diff --git a/lib/features/MainScreens/Wallet/presentation/pages/filterScreen.dart b/lib/features/MainScreens/Wallet/presentation/pages/filter_screen.dart similarity index 98% rename from lib/features/MainScreens/Wallet/presentation/pages/filterScreen.dart rename to lib/features/MainScreens/Wallet/presentation/pages/filter_screen.dart index 90a750d..f78634c 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/filterScreen.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/filter_screen.dart @@ -1,7 +1,4 @@ -import 'dart:ui'; - import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:gap/gap.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -103,7 +100,7 @@ class _FilterScreenState extends State { ), const Gap(3), Text( - AppText.date2, + AppText.date2, style: GoogleFonts.dmSans( color: const Color(0xFF272727), fontSize: 14.sp, @@ -155,7 +152,7 @@ class _FilterScreenState extends State { actions[index], style: GoogleFonts.dmSans( color: (selected[index] == true) - ? Color(0xFF0167B7) + ? const Color(0xFF0167B7) : const Color(0xFF272727), fontSize: 14.sp, fontWeight: FontWeight.w700, @@ -191,7 +188,7 @@ class _FilterScreenState extends State { ), const Gap(3), Text( - AppText.all, + AppText.all, style: GoogleFonts.dmSans( color: const Color(0xFF272727), fontSize: 14.sp, diff --git a/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart b/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart deleted file mode 100644 index 15ebb2b..0000000 --- a/lib/features/MainScreens/Wallet/presentation/pages/walletDetails.dart +++ /dev/null @@ -1,540 +0,0 @@ -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 'package:ticket_widget/ticket_widget.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}); - final List titles = [ - AppText.status, - AppText.paymentMethod, - AppText.accountName, - AppText.iban, - AppText.beneficiaryAddress, - AppText.bankName, - AppText.branchAddress, - AppText.SWIFTcode, - AppText.refid, - ]; - final List values = [ - 'On hold', - 'Google/Apple Pay', - 'Name Surname', - 'DE 1234 5678 9012 3456', - 'Hohenzollernring 58, 95444', - 'Name Bank', - 'Hohenzollernring 58, 95444', - 'BC12345', - 'FRYU FHDU 1234', - ]; - - @override - Widget build(BuildContext context) { - return (type == 'confirm-investment') - ? WillPopScope( - onWillPop: () async => false, - child: Scaffold( - backgroundColor: Colors.white, - bottomNavigationBar: 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, - ), - ), - appBar: AppBar( - backgroundColor: Colors.white, - elevation: 0, - automaticallyImplyLeading: false, - actions: [ - IconButton( - onPressed: () { - goRouter.pop(); - goRouter.pop(); - goRouter.pop(); - goRouter.pop(); - goRouter.pop(); - }, - icon: const Icon( - Icons.close_sharp, - color: Color(0xFF363636), - ), - ), - ], - scrolledUnderElevation: 0.0, - centerTitle: true, - title: Text( - AppText.investmentConfirmationText, - style: GoogleFonts.dmSans( - color: const Color(0xFF272727), - fontSize: 20.sp, - fontWeight: FontWeight.w700, - ), - ), - ), - body: Padding( - padding: const EdgeInsets.all(18.0), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(22.r), - color: Colors.transparent, - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.15), - spreadRadius: 2, - blurRadius: 10, - offset: - const Offset(0, 8), // changes position of shadow - ), - ], - ), - child: TicketWidget( - height: 320.h, - isCornerRounded: true, - width: double.infinity, - color: Colors.white, - child: Padding( - padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - getIcon(type), - SizedBox( - height: 16.h, - ), - Text( - AppText.investment, - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w600, - ), - ), - SizedBox( - height: 4.h, - ), - Text( - "Name of investment", - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 17.sp, - fontWeight: FontWeight.w700, - ), - ), - 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 100,000', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 20.sp, - fontWeight: FontWeight.w900, - ), - ), - Text( - "+ \$100.00", - style: GoogleFonts.dmSans( - color: const Color(0xFF363636), - fontSize: 12.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - SizedBox( - height: 35.h, - ), - _buildBody(), - ], - ), - ), - ), - ), - ), - ), - ) - : Scaffold( - backgroundColor: Colors.white, - appBar: AppBar( - backgroundColor: Colors.white, - elevation: 0, - scrolledUnderElevation: 0.0, - centerTitle: true, - title: Text( - AppText.walletDetailsTitle, - style: GoogleFonts.dmSans( - color: const Color(0xFF272727), - fontSize: 20.sp, - fontWeight: FontWeight.w700, - ), - ), - ), - body: Padding( - padding: const EdgeInsets.all(18.0), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(22.r), - color: (type == 'Yield' || type == 'Refund') - ? Colors.white - : Colors.transparent, - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.15), - spreadRadius: 2, - blurRadius: 10, - offset: const Offset(0, 8), // changes position of shadow - ), - ], - ), - child: (type == 'Yield' || type == 'Refund') - ? Padding( - padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - getIcon(type), - SizedBox( - height: 16.h, - ), - Text( - type, - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w600, - ), - ), - SizedBox( - height: 4.h, - ), - Text( - "Name of investment", - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 17.sp, - fontWeight: FontWeight.w700, - ), - ), - 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 100,000', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 20.sp, - fontWeight: FontWeight.w900, - ), - ), - ], - ), - SizedBox( - height: 35.h, - ), - _buildBody(), - ], - ), - ) - : TicketWidget( - height: (type == 'Investment' || - type == "confirm-investment") - ? 320.h - : double.infinity, - isCornerRounded: true, - width: double.infinity, - color: Colors.white, - child: Padding( - padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - getIcon(type), - SizedBox( - height: 16.h, - ), - Text( - type == "confirm-investment" - ? "Investment" - : type, - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w600, - ), - ), - SizedBox( - height: 4.h, - ), - (type == "confirm-investment" || - type == '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( - color: const Color(0xFF8D8D8D), - fontSize: 11.sp, - fontWeight: FontWeight.w500, - ), - ), - SizedBox( - height: 16.h, - ), - Text( - '+ SAR 100,000', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 20.sp, - fontWeight: FontWeight.w900, - ), - ), - (type == "confirm-investment" || - type == 'Investment') - ? Text( - "+ \$100.00", - style: GoogleFonts.dmSans( - color: const Color(0xFF363636), - fontSize: 12.sp, - fontWeight: FontWeight.w500, - ), - ) - : const SizedBox(), - ], - ), - SizedBox( - height: 35.h, - ), - _buildBody(), - ], - ), - ), - ), - ), - ), - ); - } - - Widget getIcon(String title) { - if (title == 'Deposit') { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF0FA4A4)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - 'assets/images/wallet_screen/deposit_list.png', - height: 25.h, - ), - ), - ); - } else if (title == 'Withdrawal') { - return 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), - ), - ); - } else if (title == 'Investment' || title == 'confirm-investment') { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF0172CB)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset('assets/images/wallet_screen/invest_list.png', - height: 25.h), - ), - ); - } else if (title == 'Yield') { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF4C4AEF)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset('assets/images/wallet_screen/yield_list.png', - height: 25.h), - ), - ); - } else { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF0E9445)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset('assets/images/wallet_screen/refund_list.png', - height: 25.h), - ), - ); - } - } - - Widget _buildBody() { - if (type == 'Yield') { - return Container(); - } else if (type == 'Refund') { - return Container(); - } else if (type == 'Investment' || type == "confirm-investment") { - return Container( - width: double.infinity, - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.white, - width: 1.0, - ), - ), - ), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 15.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - AppText.paymentMethod, - style: GoogleFonts.dmSans( - color: const Color(0xFF535353), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - SizedBox( - width: 180.w, - child: Text( - 'Google/Apple Pay', - textAlign: TextAlign.end, - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w600, - ), - ), - ), - ], - ), - ), - ); - } else { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: ListView.builder( - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - itemCount: titles.length, - itemBuilder: (context, index) { - if (type == 'Deposit' && titles[index] == 'Status') { - return Container(); - } else { - return Container( - width: double.infinity, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: (index != titles.length - 1) - ? Colors.black - : Colors.white, - width: 1.0, - ), - ), - ), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 15.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - titles[index], - style: GoogleFonts.dmSans( - color: const Color(0xFF535353), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - Expanded( - child: Text( - values[index], - textAlign: TextAlign.end, - style: GoogleFonts.dmSans( - color: (titles[index] == 'Status') - ? const Color(0xFF0172CB) - : const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: (titles[index] == 'Status') - ? FontWeight.w700 - : FontWeight.w600, - ), - ), - ), - ], - ), - ), - ); - } - }, - ), - ); - } - } -} diff --git a/lib/features/MainScreens/Wallet/presentation/pages/walletScreen.dart b/lib/features/MainScreens/Wallet/presentation/pages/walletScreen.dart deleted file mode 100644 index 755c462..0000000 --- a/lib/features/MainScreens/Wallet/presentation/pages/walletScreen.dart +++ /dev/null @@ -1,447 +0,0 @@ -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'; -import 'package:tanami_app/core/styles/app_text.dart'; - -class WalletScreen extends StatefulWidget { - const WalletScreen({super.key}); - - @override - State createState() => _WalletScreenState(); -} - -class _WalletScreenState extends State { - List data = [ - { - 'title': AppText.deposit, - 'subTitle': '', - 'dateTime': '10/04/2024 22:04', - 'value': '+ SAR 100,000', - 'subValue': '', - 'onHold': false, - }, - { - 'title': AppText.withdrawal, - 'subTitle': '', - 'dateTime': '10/04/2024 22:04', - 'value': '- SAR 100,000', - 'subValue': '', - 'onHold': true, - }, - { - 'title': AppText.investment, - 'subTitle': 'Name of Investment', - 'dateTime': '10/04/2024 22:04', - 'value': '- SAR 100,000', - 'subValue': '', - 'onHold': false, - }, - { - 'title': AppText.yield, - 'subTitle': 'Name of Investment', - 'dateTime': '10/04/2024 22:04', - 'value': '+ SAR 100,000', - 'subValue': '+ \$100,00', - 'onHold': false, - }, - { - 'title': AppText.refund, - 'subTitle': '', - 'dateTime': '10/04/2024 22:04', - 'value': '- SAR 100,000', - 'subValue': '', - 'onHold': true, - }, - ]; - - @override - void initState() { - // TODO: implement initState - // _savebottomsheet(); - super.initState(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Colors.white, - appBar: AppBar( - elevation: 0, - scrolledUnderElevation: 0.0, - automaticallyImplyLeading: false, - toolbarHeight: 260.h, - titleSpacing: 22.w, - title: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - AppText.walletTitle, - style: GoogleFonts.dmSans( - color: const Color(0xFF343434), - fontSize: 14.sp, - fontWeight: FontWeight.w700, - ), - ), - SizedBox( - height: 4.h, - ), - Text( - 'SAR 178,000', - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 28.sp, - fontWeight: FontWeight.w700, - ), - ), - SizedBox( - height: 80.h, - ) - ], - ), - flexibleSpace: FlexibleSpaceBar( - background: Stack( - children: [ - Image.asset( - 'assets/images/wallet_screen/bg.png', // Replace with your image asset - fit: BoxFit.fitWidth, - alignment: Alignment.topCenter, - ), - Align( - alignment: Alignment.bottomCenter, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 20.0), - child: Container( - decoration: BoxDecoration( - color: Colors.white.withOpacity(0.8), - borderRadius: - const BorderRadius.all(Radius.circular(20.0)), - ), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 20.0, vertical: 20.0), - child: IntrinsicHeight( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - GestureDetector( - onTap: () { - goRouter.pushNamed(RouteName.depositScreen); - }, - 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/deposit.png', - height: 20.h, - ), - ), - ), - Text( - 'Deposit', - style: GoogleFonts.dmSans( - color: const Color(0xFF363636), - fontSize: 12.sp, - fontWeight: FontWeight.w700, - ), - ), - ], - ), - ), - const VerticalDivider( - color: Colors.black, - width: 20.0, - ), - 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, - ), - ), - ], - ), - ), - ], - ), - ), - ), - ), - ), - ) - ], - ), - ), - backgroundColor: Colors - .transparent, // Make the AppBar transparent to show the background image - ), - body: Padding( - padding: const EdgeInsets.fromLTRB(18.0, 10.0, 18.0, 0.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - AppText.day, - style: GoogleFonts.dmSans( - color: const Color(0xFF8D8D8D), - fontSize: 11.sp, - fontWeight: FontWeight.w500, - ), - ), - Row( - children: [ - Container( - decoration: const BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.all(Radius.circular(12.0)), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - 'assets/images/wallet_screen/search.png', - height: 20.h, - ), - ), - ), - SizedBox( - width: 5.w, - ), - GestureDetector( - onTap: () { - goRouter.pushNamed(RouteName.filterScreen); - }, - child: Container( - decoration: const BoxDecoration( - color: Color(0xFFF6F6F6), - borderRadius: BorderRadius.all(Radius.circular(12.0)), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - 'assets/images/wallet_screen/filter.png', - height: 20.h, - ), - ), - ), - ), - ], - ), - ], - ), - SizedBox( - height: 10.h, - ), - Expanded( - child: ListView.builder( - shrinkWrap: true, - itemCount: data.length, - itemBuilder: (context, index) { - return Padding( - padding: const EdgeInsets.only(bottom: 10.0), - child: GestureDetector( - onTap: () { - goRouter.pushNamed(RouteName.walletDetails, - pathParameters: { - "type": data[index]['title'], - }); - }, - child: Container( - height: 90.h, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(22.r), - color: const Color(0xFFF6F6F6), - ), - child: Padding( - padding: const EdgeInsets.all(12.0), - child: Row( - children: [ - getIcon(data[index]['title']), - SizedBox(width: 12.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - data[index]['title'], - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w700, - ), - ), - SizedBox(height: 4.h), - (data[index]['subTitle'] != '') - ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - data[index]['subTitle'], - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w400, - ), - ), - SizedBox(height: 4.h), - ], - ) - : Container(), - Text( - data[index]['dateTime'], - style: GoogleFonts.dmSans( - color: const Color(0xFF8D8D8D), - fontSize: 11.sp, - fontWeight: FontWeight.w500, - ), - ), - ], - ), - Spacer(), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - (data[index]['onHold']) - ? Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Text( - AppText.onHold, - style: GoogleFonts.dmSans( - color: const Color(0xFF0172CB), - fontSize: 14.sp, - fontWeight: FontWeight.w700, - ), - ), - SizedBox(height: 4.h), - ], - ) - : Container(), - Text( - data[index]['value'], - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 14.sp, - fontWeight: FontWeight.w700, - ), - ), - SizedBox(height: 4.h), - (data[index]['subValue'] != '') - ? Text( - data[index]['subValue'], - style: GoogleFonts.dmSans( - color: const Color(0xFF191B1E), - fontSize: 12.sp, - fontWeight: FontWeight.w500, - ), - ) - : Container(), - ], - ), - ], - ), - ), - ), - ), - ); - }, - ), - ) - ], - ), - ), - ); - } - - Widget getIcon(String title) { - if (title == 'Deposit') { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF0FA4A4)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - 'assets/images/wallet_screen/deposit_list.png', - height: 25.h, - ), - ), - ); - } else if (title == 'Withdrawal') { - return 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), - ), - ); - } else if (title == 'Investment') { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF0172CB)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset('assets/images/wallet_screen/invest_list.png', - height: 25.h), - ), - ); - } else if (title == 'Yield') { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF4C4AEF)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset('assets/images/wallet_screen/yield_list.png', - height: 25.h), - ), - ); - } else { - return Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, color: Color(0xFF0E9445)), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset('assets/images/wallet_screen/refund_list.png', - height: 25.h), - ), - ); - } - } -} diff --git a/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart b/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart new file mode 100644 index 0000000..cdef83c --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/pages/wallet_details_screen.dart @@ -0,0 +1,326 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:gap/gap.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/shared/components/text_widget.dart'; +import 'package:ticket_widget/ticket_widget.dart'; + +import '../../../../../core/styles/app_color.dart'; +import '../../../../../shared/components/button_widget.dart'; +import '../widgets/wallet_list_section.dart'; +import '../widgets/yield_detail_section.dart'; + +class WalletDetailsScreen extends StatelessWidget { + final String type; + WalletDetailsScreen({super.key, required this.type}); + final List titles = [ + AppText.status, + AppText.paymentMethod, + AppText.accountName, + AppText.iban, + AppText.beneficiaryAddress, + AppText.bankName, + AppText.branchAddress, + AppText.SWIFTcode, + AppText.refid, + ]; + final List values = [ + 'On hold', + 'Google/Apple Pay', + 'Name Surname', + 'DE 1234 5678 9012 3456', + 'Hohenzollernring 58, 95444', + 'Name Bank', + 'Hohenzollernring 58, 95444', + 'BC12345', + 'FRYU FHDU 1234', + ]; + + @override + Widget build(BuildContext context) { + return (type == 'confirm-investment') + ? WillPopScope( + onWillPop: () async => false, + child: Scaffold( + backgroundColor: Colors.white, + bottomNavigationBar: 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, + ), + ), + appBar: AppBar( + backgroundColor: Colors.white, + elevation: 0, + automaticallyImplyLeading: false, + actions: [ + IconButton( + onPressed: () { + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + goRouter.pop(); + }, + icon: const Icon( + Icons.close_sharp, + color: Color(0xFF363636), + ), + ), + ], + scrolledUnderElevation: 0.0, + centerTitle: true, + title: Text( + AppText.investmentConfirmationText, + style: GoogleFonts.dmSans( + color: const Color(0xFF272727), + fontSize: 20.sp, + fontWeight: FontWeight.w700, + ), + ), + ), + body: Padding( + padding: const EdgeInsets.all(18.0), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: Colors.transparent, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: + const Offset(0, 8), // changes position of shadow + ), + ], + ), + child: TicketWidget( + height: 1.sh, + isCornerRounded: true, + width: double.infinity, + color: AppColor.plainWhite, + child: Padding( + padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + getIcon(type), + Gap(16.h), + TextWidget().text14W600(AppText.investment, + clr: AppColor.otpTextColor), + Gap(4.h), + TextWidget().text17W700("Name of investment", + clr: AppColor.otpTextColor), + Gap( + 4.h, + ), + TextWidget().text11W500('10/04/2024 22:04', + clr: AppColor.hintTextColor), + Gap( + 16.h, + ), + TextWidget().text20W900('+ SAR 100,000', + clr: AppColor.otpTextColor), + TextWidget().text13W500("+ \$100.00", + clr: AppColor.textLabelColor), + ], + ), + Gap( + 35.h, + ), + _buildBody(), + ], + ), + ), + ), + ), + ), + ), + ) + : Scaffold( + backgroundColor: AppColor.plainWhite, + appBar: AppBar( + backgroundColor: AppColor.plainWhite, + elevation: 0, + scrolledUnderElevation: 0.0, + centerTitle: true, + title: TextWidget().text20W700(AppText.walletDetailsTitle, + clr: AppColor.charcoalColor)), + body: Padding( + padding: const EdgeInsets.all(18.0), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: (type == 'Yield' || type == 'Refund') + ? AppColor.plainWhite + : Colors.transparent, + boxShadow: [ + BoxShadow( + color: AppColor.plainBlack.withOpacity(0.15), + spreadRadius: 2, + blurRadius: 10, + offset: const Offset(0, 8), // changes position of shadow + ), + ], + ), + child: (type == 'Yield' || type == 'Refund') + ? YieldDetailSection( + type: type, + ) + : TicketWidget( + height: (type == 'Investment' || + type == "confirm-investment") + ? 320.h + : double.infinity, + isCornerRounded: true, + width: double.infinity, + color: Colors.white, + child: Padding( + padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + getIcon(type), + Gap(16.h), + TextWidget().text14W600( + type == "confirm-investment" + ? "Investment" + : type, + clr: AppColor.otpTextColor), + Gap(4.h), + (type == "confirm-investment" || + type == 'Investment') + ? TextWidget().text17W700( + "Name of investment", + clr: AppColor.otpTextColor) + : const SizedBox(), + Gap(4.h), + TextWidget().text11W500('10/04/2024 22:04', + clr: AppColor.hintTextColor), + Gap(16.h), + TextWidget().text20W900('+ SAR 100,000', + clr: AppColor.otpTextColor), + (type == "confirm-investment" || + type == 'Investment') + ? TextWidget().text12W500("+ \$100.00", + clr: AppColor.textLabelColor) + : const SizedBox(), + ], + ), + Gap(35.h), + _buildBody(), + ], + ), + ), + ), + ), + ), + ); + } + + Widget _buildBody() { + if (type == 'Yield') { + return const SizedBox(); + } else if (type == 'Refund') { + return const SizedBox(); + } else if (type == 'Investment' || type == "confirm-investment") { + return Container( + width: double.infinity, + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + color: AppColor.plainWhite, + width: 1.0, + ), + ), + ), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextWidget().text14W500( + AppText.paymentMethod, + clr: AppColor.portoflioCardTextColor, + ), + SizedBox( + width: 180.w, + child: TextWidget().text14W600( + 'Google/Apple Pay', + clr: AppColor.otpTextColor, + ), + ), + ], + ), + ), + ); + } else { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: ListView.builder( + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: titles.length, + itemBuilder: (context, index) { + if (type == 'Deposit' && titles[index] == 'Status') { + return Container(); + } else { + return Container( + width: double.infinity, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: (index != titles.length - 1) + ? AppColor.plainBlack + : AppColor.plainWhite, + width: 1.0, + ), + ), + ), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 15.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextWidget().text14W500(titles[index], + clr: AppColor.portoflioCardTextColor), + Expanded( + child: (titles[index] == 'Status') + ? TextWidget().text14W700(values[index], + clr: AppColor.onHoldTextColor) + : TextWidget().text14W600(values[index], + clr: AppColor.otpTextColor)), + ], + ), + ), + ); + } + }, + ), + ); + } + } +} diff --git a/lib/features/MainScreens/Wallet/presentation/pages/wallet_screen.dart b/lib/features/MainScreens/Wallet/presentation/pages/wallet_screen.dart new file mode 100644 index 0000000..b049d82 --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/pages/wallet_screen.dart @@ -0,0 +1,187 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:gap/gap.dart'; +import 'package:tanami_app/core/routes/route_name.dart'; +import 'package:tanami_app/core/routes/routes.dart'; +import 'package:tanami_app/core/styles/app_color.dart'; +import 'package:tanami_app/core/styles/app_images.dart'; +import 'package:tanami_app/core/styles/app_text.dart'; +import 'package:tanami_app/shared/components/text_widget.dart'; + +import '../widgets/wallet_list_section.dart'; + +class WalletScreen extends StatelessWidget { + const WalletScreen({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + appBar: AppBar( + elevation: 0, + scrolledUnderElevation: 0.0, + automaticallyImplyLeading: false, + toolbarHeight: 260.h, + titleSpacing: 22.w, + title: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextWidget().text14W700( + AppText.walletTitle, + clr: AppColor.darkGreyColor, + ), + Gap(4.h), + TextWidget().text28W700('SAR 178,000', clr: AppColor.otpTextColor), + Gap(80.h) + ], + ), + flexibleSpace: FlexibleSpaceBar( + background: Stack( + children: [ + Image.asset( + AppImages.walletBg, + fit: BoxFit.fitWidth, + alignment: Alignment.topCenter, + ), + Align( + alignment: Alignment.bottomCenter, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20.0), + child: Container( + decoration: BoxDecoration( + color: AppColor.plainWhite.withOpacity(0.8), + borderRadius: + const BorderRadius.all(Radius.circular(20.0)), + ), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 20.0, vertical: 20.0), + child: IntrinsicHeight( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.depositScreen); + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: AppColor.plainBlack, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + AppImages.depositIcon, + height: 20.h, + ), + ), + ), + TextWidget().text12W700(AppText.depositTitle, + clr: AppColor.textLabelColor), + ], + ), + ), + const VerticalDivider( + color: AppColor.plainBlack, + width: 20.0, + ), + GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.withdrawalScreen); + }, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: AppColor.plainBlack, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + AppImages.withdrawIcon, + height: 20.h, + ), + ), + ), + TextWidget().text12W700(AppText.withdrawText, + clr: AppColor.textLabelColor) + ], + ), + ), + ], + ), + ), + ), + ), + ), + ) + ], + ), + ), + backgroundColor: Colors.transparent, + ), + body: Padding( + padding: const EdgeInsets.fromLTRB(18.0, 10.0, 18.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + TextWidget() + .text11W500(AppText.day, clr: AppColor.hintTextColor), + Row( + children: [ + Container( + decoration: const BoxDecoration( + color: AppColor.fillColor, + borderRadius: BorderRadius.all(Radius.circular(12.0)), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + AppImages.walletSearchIcon, + height: 20.h, + ), + ), + ), + SizedBox( + width: 5.w, + ), + GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.filterScreen); + }, + child: Container( + decoration: const BoxDecoration( + color: AppColor.fillColor, + borderRadius: BorderRadius.all(Radius.circular(12.0)), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + AppImages.walletFilterIcon, + height: 20.h, + ), + ), + ), + ), + ], + ), + ], + ), + Gap(10.h), + const WalletListSection(), + ], + ), + ), + ); + } +} diff --git a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart index f315ce9..e6280a9 100644 --- a/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart +++ b/lib/features/MainScreens/Wallet/presentation/pages/withdrawal/withdrawalScreen.dart @@ -5,8 +5,11 @@ import 'package:gap/gap.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'; +import 'package:tanami_app/core/styles/app_color.dart'; import 'package:tanami_app/core/styles/app_text.dart'; +import '../../../../../../shared/components/button_widget.dart'; + class WithdrawalScreen extends StatefulWidget { const WithdrawalScreen({super.key}); @@ -47,25 +50,40 @@ class _WithdrawalScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - RichText( - text: TextSpan( + Container( + width: 0.5.sw, + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide(width: 1, color: Colors.grey))), + child: Row( children: [ - TextSpan( - text: AppText.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, + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${AppText.balance}: ', + style: GoogleFonts.dmSans( + color: Colors.grey, + fontSize: 12.0, + fontWeight: FontWeight.bold, + ), + ), + TextSpan( + text: 'SAR 178,000', + style: GoogleFonts.dmSans( + color: Colors.black, + fontSize: 14.0, + fontWeight: FontWeight.bold, + ), + ), + ], ), ), + const Icon( + Icons.arrow_forward, + color: Colors.grey, + size: 15, + ) ], ), ), @@ -407,32 +425,17 @@ class _WithdrawalScreenState extends State { ), ), ), - 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( - AppText.next, - style: GoogleFonts.dmSans( - color: Colors.white, - fontSize: 14.sp, - fontWeight: FontWeight.w700, - ), - ), - ), - ), - ), + bottomNavigationBar: Container( + margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + width: 1.sw, + height: 56.h, + child: ButtonWidget().elevatedBtn( + function: () { + goRouter.pushNamed(RouteName.withdrawalPreview); + }, + text: AppText.next, + txtClr: AppColor.plainWhite, + clr: AppColor.primaryColor2), ), ); } diff --git a/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart b/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart new file mode 100644 index 0000000..2fc1aeb --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/widgets/wallet_list_section.dart @@ -0,0 +1,196 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:gap/gap.dart'; + +import '../../../../../core/routes/route_name.dart'; +import '../../../../../core/routes/routes.dart'; +import '../../../../../core/styles/app_color.dart'; +import '../../../../../core/styles/app_images.dart'; +import '../../../../../core/styles/app_text.dart'; +import '../../../../../shared/components/text_widget.dart'; + +class WalletListSection extends StatelessWidget { + const WalletListSection({super.key}); + + @override + Widget build(BuildContext context) { + return Expanded( + child: ListView.builder( + shrinkWrap: true, + itemCount: data.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.only(bottom: 10.0), + child: GestureDetector( + onTap: () { + goRouter.pushNamed(RouteName.walletDetails, pathParameters: { + "type": data[index]['title'], + }); + }, + child: Container( + height: 90.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(22.r), + color: AppColor.fillColor, + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + getIcon(data[index]['title']), + SizedBox(width: 12.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextWidget().text14W700( + data[index]['title'], + clr: AppColor.otpTextColor, + ), + Gap(4.h), + (data[index]['subTitle'] != '') + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextWidget().text12W400( + data[index]['subTitle'], + clr: AppColor.otpTextColor, + ), + Gap(4.h), + ], + ) + : const SizedBox(), + TextWidget().text11W500(data[index]['dateTime'], + clr: AppColor.hintTextColor) + ], + ), + const Spacer(), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + (data[index]['onHold']) + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextWidget().text14W700(AppText.onHold, + clr: AppColor.onHoldTextColor), + Gap(4.h), + ], + ) + : const SizedBox(), + TextWidget().text14W700(data[index]['value'], + clr: AppColor.otpTextColor), + Gap(4.h), + (data[index]['subValue'] != '') + ? TextWidget().text12W500(data[index]['subValue'], + clr: AppColor.otpTextColor) + : const SizedBox(), + ], + ), + ], + ), + ), + ), + ), + ); + }, + ), + ); + } +} + +Widget getIcon(String title) { + if (title == 'Deposit') { + return Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.depositListIconColor), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + AppImages.depositListIcon, + height: 25.h, + ), + ), + ); + } else if (title == 'Withdrawal') { + return Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.withdrawalListIconColor), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset(AppImages.withdrawalListIcon, height: 25.h), + ), + ); + } else if (title == 'Investment') { + return Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.investmentListIconColor), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset(AppImages.investmentListIcon, height: 25.h), + ), + ); + } else if (title == 'Yield') { + return Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.yieldListIconColor), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset(AppImages.yieldListIcon, height: 25.h), + ), + ); + } else { + return Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.refundListIconColor), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset(AppImages.refundListIcon, height: 25.h), + ), + ); + } +} + +List data = [ + { + 'title': AppText.deposit, + 'subTitle': '', + 'dateTime': '10/04/2024 22:04', + 'value': '+ SAR 100,000', + 'subValue': '', + 'onHold': false, + }, + { + 'title': AppText.withdrawal, + 'subTitle': '', + 'dateTime': '10/04/2024 22:04', + 'value': '- SAR 100,000', + 'subValue': '', + 'onHold': true, + }, + { + 'title': AppText.investment, + 'subTitle': 'Name of Investment', + 'dateTime': '10/04/2024 22:04', + 'value': '- SAR 100,000', + 'subValue': '', + 'onHold': false, + }, + { + 'title': AppText.yield, + 'subTitle': 'Name of Investment', + 'dateTime': '10/04/2024 22:04', + 'value': '+ SAR 100,000', + 'subValue': '+ \$100,00', + 'onHold': false, + }, + { + 'title': AppText.refund, + 'subTitle': '', + 'dateTime': '10/04/2024 22:04', + 'value': '- SAR 100,000', + 'subValue': '', + 'onHold': true, + }, +]; diff --git a/lib/features/MainScreens/Wallet/presentation/widgets/yield_detail_section.dart b/lib/features/MainScreens/Wallet/presentation/widgets/yield_detail_section.dart new file mode 100644 index 0000000..eca92db --- /dev/null +++ b/lib/features/MainScreens/Wallet/presentation/widgets/yield_detail_section.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:gap/gap.dart'; + +import '../../../../../core/styles/app_color.dart'; +import '../../../../../shared/components/text_widget.dart'; +import 'wallet_list_section.dart'; + +class YieldDetailSection extends StatelessWidget { + final String type; + const YieldDetailSection({super.key, required this.type}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + getIcon(type), + Gap(16.h), + TextWidget().text14W600(type, clr: AppColor.otpTextColor), + Gap(4.h), + TextWidget() + .text17W700("Name of investment", clr: AppColor.otpTextColor), + Gap(4.h), + TextWidget() + .text11W500('10/04/2024 22:04', clr: AppColor.hintTextColor), + Gap(16.h), + TextWidget() + .text20W900('+ SAR 100,000', clr: AppColor.otpTextColor), + ], + ), + ], + ), + ); + } +} diff --git a/lib/features/MainScreens/main_screen.dart b/lib/features/MainScreens/main_screen.dart index 5b14c55..1dec790 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/walletScreen.dart'; +import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/wallet_screen.dart'; import 'package:tanami_app/shared/components/common_bottom_navigation.dart'; import '../../shared/components/bloc/bottom_nav_bar/bottom_navigation_bloc.dart'; @@ -39,7 +39,7 @@ class MainScreen extends StatelessWidget { return false; }, child: Scaffold( - backgroundColor: Colors.white, + backgroundColor: const Color.fromARGB(255, 121, 104, 104), body: PageView( controller: pageController, physics: const NeverScrollableScrollPhysics(), diff --git a/lib/shared/components/text_widget.dart b/lib/shared/components/text_widget.dart index 67e47ca..fa1ff7f 100644 --- a/lib/shared/components/text_widget.dart +++ b/lib/shared/components/text_widget.dart @@ -240,7 +240,7 @@ class TextWidget { color: clr ?? AppColor.plainWhite)); } - Widget text22W900(String text, {Color? clr}) { + Widget text22W900(String text, {Color? clr}) { return Text(text, style: GoogleFonts.dmSans( fontSize: 22, @@ -257,6 +257,14 @@ class TextWidget { color: clr ?? AppColor.plainWhite)); } + Widget text20W900(String text, {Color? clr}) { + return Text(text, + style: GoogleFonts.dmSans( + fontSize: 20, + fontWeight: FontWeight.w900, + color: clr ?? AppColor.plainWhite)); + } + //Text Size 28 Widget text28W700(String text, {Color? clr}) { return Text(text, diff --git a/pubspec.lock b/pubspec.lock index 0d1282c..8160dc0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: archive - sha256: "6bd38d335f0954f5fad9c79e614604fbf03a0e5b975923dd001b6ea965ef5b4b" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.6.0" + version: "3.6.1" args: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -101,18 +101,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -341,26 +341,26 @@ packages: dependency: "direct main" description: name: firebase_core - sha256: "4b5100e2dbc3fe72c2d4241a046d3f01457fe11293283a324f5c52575e3406f8" + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" url: "https://pub.dev" source: hosted - version: "2.31.1" + version: "2.32.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 + sha256: "1003a5a03a61fc9a22ef49f37cbcb9e46c86313a7b2e7029b9390cf8c6fc32cb" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9" + sha256: "6643fe3dbd021e6ccfb751f7882b39df355708afbdeb4130fc50f9305a9d1a3d" url: "https://pub.dev" source: hosted - version: "2.17.0" + version: "2.17.2" fixnum: dependency: transitive description: @@ -378,10 +378,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.5" + version: "8.1.6" flutter_cache_manager: dependency: transitive description: @@ -410,18 +410,18 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.20" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - sha256: b372c35a772a1dc84142a3b9c5ee89a390834bd258e5e6a450d9b975b985d1c9 + sha256: "8239210dd68bee6b0577aa4a090890342d04a136ce1c81f98ee513fc0ce891de" url: "https://pub.dev" source: hosted - version: "5.9.1" + version: "5.9.3" flutter_secure_storage: dependency: "direct main" description: @@ -516,10 +516,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "6ad5662b014c06c20fa46ab78715c96b2222a7fe4f87bf77e0289592c2539e86" + sha256: cdae1b9c8bd7efadcef6112e81c903662ef2ce105cbd220a04bbb7c3425b5554 url: "https://pub.dev" source: hosted - version: "14.1.3" + version: "14.2.0" google_fonts: dependency: "direct main" description: @@ -620,26 +620,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -660,10 +660,10 @@ packages: dependency: transitive description: name: local_auth_android - sha256: e0e5b1ea247c5a0951c13a7ee13dc1beae69750e6a2e1910d1ed6a3cd4d56943 + sha256: "48dfb2d954da8ef6a77adfc93a29998f7729e9308eaa817e91dea4500317b2c8" url: "https://pub.dev" source: hosted - version: "1.0.38" + version: "1.0.39" local_auth_darwin: dependency: transitive description: @@ -724,10 +724,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" mime: dependency: transitive description: @@ -820,10 +820,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.5" path_provider_foundation: dependency: transitive description: @@ -876,18 +876,18 @@ packages: dependency: transitive description: name: permission_handler_android - sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5" + sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54 url: "https://pub.dev" source: hosted - version: "12.0.6" + version: "12.0.7" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 + sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0 url: "https://pub.dev" source: hosted - version: "9.4.4" + version: "9.4.5" permission_handler_html: dependency: transitive description: @@ -932,10 +932,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -972,10 +972,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" rxdart: dependency: transitive description: @@ -1004,10 +1004,10 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" + sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" shared_preferences_foundation: dependency: transitive description: @@ -1060,10 +1060,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" shimmer: dependency: "direct main" description: @@ -1089,10 +1089,10 @@ packages: dependency: "direct main" description: name: sms_autofill - sha256: "43139a175fb3c57ff103ac4b82f2aa70b6c45cf93539d7974c2556810f355363" + sha256: a851630775fa11ca985d85d8c4e51573c26d9647ab35de151748eb733d4893e8 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" source_gen: dependency: transitive description: @@ -1193,10 +1193,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" ticket_widget: dependency: "direct main" description: @@ -1249,10 +1249,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.3" url_launcher_ios: dependency: transitive description: @@ -1353,10 +1353,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1373,22 +1373,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "3.0.0" win32: dependency: transitive description: name: win32 - sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "5.5.0" + version: "5.5.1" win32_registry: dependency: transitive description: @@ -1422,5 +1430,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.4 <4.0.0" - flutter: ">=3.19.2" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 63e69a6..2f98d63 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -83,8 +83,13 @@ dependencies: #Expansion Tile expansion_tile_group: ^1.2.4 + + #Ticket ticket_widget: ^1.0.2 + # #Device Preview + # device_preview: + dev_dependencies: flutter_test: sdk: flutter