conflict solved
This commit is contained in:
@@ -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"]!,
|
||||
);
|
||||
}),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -21,6 +21,7 @@ class InvestLayout extends StatelessWidget {
|
||||
return DefaultTabController(
|
||||
length: 2,
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColor.plainWhite,
|
||||
body: Column(
|
||||
children: [
|
||||
TabBar(
|
||||
|
||||
@@ -21,7 +21,7 @@ class _InvestScreenState extends State<InvestScreen> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.plainWhite,
|
||||
appBar: AppBar(
|
||||
// backgroundColor: Colors.white,
|
||||
backgroundColor: AppColor.plainWhite,
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
|
||||
@@ -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';
|
||||
@@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<WithdrawalScreen> {
|
||||
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,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
];
|
||||
@@ -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),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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(),
|
||||
|
||||
@@ -285,6 +285,14 @@ class TextWidget {
|
||||
);
|
||||
}
|
||||
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user