Merge pull request #49 from WDI-Ideas/meet

bugs solving
This commit is contained in:
meet2711
2024-06-14 17:54:45 +05:30
committed by GitHub
19 changed files with 764 additions and 616 deletions

View File

@@ -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';

View File

@@ -17,30 +17,32 @@ class InvestDetailsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.plainWhite,
bottomNavigationBar: Container(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 26),
width: 1.sw,
height: 105.h,
child: ButtonWidget().elevatedBtn(
text: AppText.investText,
clr: AppColor.primaryColor2,
function: () {
goRouter.pushNamed(RouteName.investPaymentScreen);
}),
backgroundColor: AppColor.plainWhite,
bottomNavigationBar: Container(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 26),
width: 1.sw,
height: 105.h,
child: ButtonWidget().elevatedBtn(
text: AppText.investText,
clr: AppColor.primaryColor2,
function: () {
goRouter.pushNamed(RouteName.investPaymentScreen);
},
),
appBar: const AppBarWidget(
height: 45,
titleTxt: "",
),
body: MultiBlocProvider(
providers: [
BlocProvider(
// Create an instance of the OnboardingBloc
create: (context) => CarouselBloc(),
),
],
child: const InvestDetailsLayout(),
));
),
appBar: const AppBarWidget(
height: 45,
titleTxt: "",
),
body: MultiBlocProvider(
providers: [
BlocProvider(
// Create an instance of the OnboardingBloc
create: (context) => CarouselBloc(),
),
],
child: const InvestDetailsLayout(),
),
);
}
}

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_bottom_section.dart';
import 'package:tanami_app/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_method_section.dart';
import 'package:tanami_app/features/MainScreens/Invest/presentation/widgets/payment/invest_pay_top_section.dart';
@@ -9,15 +10,13 @@ class InvestPaymentLayout extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(16.0),
child: ListView(
children: const [
InvestPayTopSection(),
InvestPayMethodSection(),
InvestPayBottomSection(),
],
),
backgroundColor: AppColor.plainWhite,
body: ListView(
children: const [
InvestPayTopSection(),
InvestPayMethodSection(),
InvestPayBottomSection(),
],
),
);
}

View File

@@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import '../../../../../../core/styles/app_color.dart';
import '../../../../../../core/styles/app_text.dart';
import '../../../../../../shared/components/appbar_widget.dart';
import 'invest_payment_layout.dart';
class InvestPaymentScreen extends StatelessWidget {
@@ -10,11 +11,21 @@ class InvestPaymentScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Scaffold(
return Scaffold(
backgroundColor: AppColor.plainWhite,
appBar: AppBarWidget(
height: 75,
titleTxt: AppText.investmentDetailsText,
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0.0,
centerTitle: true,
title: Text(
AppText.investmentDetailsText,
style: GoogleFonts.dmSans(
color: const Color(0xFF272727),
fontSize: 20.sp,
fontWeight: FontWeight.w700,
),
),
),
body: InvestPaymentLayout(),
);

View File

@@ -28,7 +28,7 @@ class InvestDetailDetailsSection extends StatelessWidget {
10.h,
),
TextWidget()
.text22W400("SAR 1,478,000", clr: AppColor.investTextColor),
.text22W900("SAR 1,478,000", clr: AppColor.investTextColor),
const Gap(8.0),
LinearProgressIndicator(
value: 0.6,

View File

@@ -85,7 +85,7 @@ class InvestDetailsSection extends StatelessWidget {
10.h,
),
TextWidget()
.text22W400("SAR 1,478,000", clr: AppColor.investTextColor),
.text22W900("SAR 1,478,000", clr: AppColor.investTextColor),
const Gap(8.0),
LinearProgressIndicator(
value: 0.6,

View File

@@ -58,7 +58,7 @@ class InvestCarouselView extends StatelessWidget {
}),
),
),
const Gap(12),
const Gap(6),
BlocBuilder<CarouselBloc, CarouselState>(
builder: (context, state) {
int currentIndex = 0;
@@ -72,7 +72,7 @@ class InvestCarouselView extends StatelessWidget {
onTap: () => _controller.animateToPage(entry.key),
child: Container(
width: 20.w,
height: 7.h,
height: 8.h,
margin: const EdgeInsets.symmetric(horizontal: 3.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),

View File

@@ -54,7 +54,7 @@ class InvestIncludedDocumentsSection extends StatelessWidget {
color: AppColor.documentCardBgColor,
borderRadius: BorderRadius.all(Radius.circular(10.0)),
),
padding: const EdgeInsets.all(20.0),
padding: const EdgeInsets.all(15.0),
child: Column(
children: [
Row(
@@ -71,7 +71,7 @@ class InvestIncludedDocumentsSection extends StatelessWidget {
],
),
Gap(
14.h,
26.h,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,

View File

@@ -16,7 +16,7 @@ class KeyInvestmentSection extends StatelessWidget {
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: AppColor.plainWhite,
color: AppColor.documentCardBgColor,
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
boxShadow: [
BoxShadow(

View File

@@ -18,204 +18,209 @@ class InvestPayMethodSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
final radioBloc = context.read<RadioBloc>();
return BlocBuilder<RadioBloc, RadioState>(
builder: (context, state) {
int selectedIndex = 0;
if (state is RadioSelectionChanged) {
selectedIndex = state.selectedIndex;
}
return Padding(
padding: const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 0.0),
child: BlocBuilder<RadioBloc, RadioState>(
builder: (context, state) {
int selectedIndex = 0;
if (state is RadioSelectionChanged) {
selectedIndex = state.selectedIndex;
}
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
TextWidget().text15W700(AppText.choosePaymentMethodText,
clr: AppColor.plainBlack),
const Gap(16),
InkWell(
onTap: () {
radioBloc.add(const RadioSelected(0));
},
child: Container(
clipBehavior: Clip.antiAlias,
// padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
side: const BorderSide(color: Color(0xFFD8D8D8)),
borderRadius: BorderRadius.circular(22),
),
shadows: const [
BoxShadow(
color: Color(0x14000000),
blurRadius: 8,
offset: Offset(-2, -2),
spreadRadius: 0.50,
),
BoxShadow(
color: Color(0x3391978E),
blurRadius: 8,
offset: Offset(2, 2),
spreadRadius: 1,
)
],
),
child: Column(
children: [
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: selectedIndex == 0
? const Color(0xFFE4F5E9)
: const Color(0xCCE2E2E2),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Radio<int>(
activeColor: AppColor.radioActiveColor,
value: 0,
groupValue: selectedIndex,
onChanged: (int? value) {
if (value != null) {
radioBloc.add(RadioSelected(value));
}
},
),
const Gap(5),
SvgPicture.asset(AppImages.walletIcon),
const Gap(5),
TextWidget().text14W700(AppText.walletText,
clr: AppColor.textLabelColor),
],
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget().text15W700(AppText.choosePaymentMethodText,
clr: AppColor.plainBlack),
const Gap(16),
InkWell(
onTap: () {
radioBloc.add(const RadioSelected(0));
},
child: Container(
clipBehavior: Clip.antiAlias,
// padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
side: const BorderSide(color: Color(0xFFD8D8D8)),
borderRadius: BorderRadius.circular(22),
),
shadows: const [
BoxShadow(
color: Color(0x14000000),
blurRadius: 8,
offset: Offset(-2, -2),
spreadRadius: 0.50,
),
BoxShadow(
color: Color(0x3391978E),
blurRadius: 8,
offset: Offset(2, 2),
spreadRadius: 1,
)
],
),
child: Column(
children: [
Container(
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(
width: 1, color: Colors.grey))),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: selectedIndex == 0
? const Color(0xFFE4F5E9)
: const Color(0xCCE2E2E2),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
Row(
children: [
Radio<int>(
activeColor: AppColor.radioActiveColor,
value: 0,
groupValue: selectedIndex,
onChanged: (int? value) {
if (value != null) {
radioBloc.add(RadioSelected(value));
}
},
),
const Gap(5),
SvgPicture.asset(AppImages.walletIcon),
const Gap(5),
TextWidget().text14W700(AppText.walletText,
clr: AppColor.textLabelColor),
],
),
Container(
decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(
width: 1, color: Colors.grey))),
child: Row(
children: [
TextSpan(
text: '${AppText.balanceText}: ',
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,
RichText(
text: TextSpan(
children: [
TextSpan(
text: '${AppText.balanceText}: ',
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,
)
],
),
),
const Icon(
Icons.arrow_forward,
color: Colors.grey,
size: 15,
)
],
),
),
],
),
),
Padding(
padding: const EdgeInsets.all(12),
child: TextWidget().text14W500(
"condimentum ac, vestibulum eu nisl.torquent per conubia nostra, per inceptos himenaeos.",
clr: AppColor.textLabelColor),
),
const Gap(12),
],
),
),
),
const Gap(12),
InkWell(
onTap: () {
radioBloc.add(const RadioSelected(1));
},
child: Container(
clipBehavior: Clip.antiAlias,
// padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
side: const BorderSide(color: Color(0xFFD8D8D8)),
borderRadius: BorderRadius.circular(22),
),
shadows: const [
BoxShadow(
color: Color(0x14000000),
blurRadius: 8,
offset: Offset(-2, -2),
spreadRadius: 0.2,
),
BoxShadow(
color: Color(0x3391978E),
blurRadius: 8,
offset: Offset(2, 2),
spreadRadius: 1,
)
],
),
child: Column(
children: [
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: selectedIndex == 1
? const Color(0xFFE4F5E9)
: const Color(0xCCE2E2E2),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Radio<int>(
activeColor: AppColor.radioActiveColor,
value: 1,
groupValue: selectedIndex,
onChanged: (int? value) {
if (value != null) {
radioBloc.add(RadioSelected(value));
}
},
),
const Gap(5),
SvgPicture.asset(AppImages.applePayIcon),
const Gap(5),
TextWidget().text14W700(AppText.applePayText,
clr: AppColor.textLabelColor),
],
Padding(
padding: const EdgeInsets.all(12),
child: TextWidget().text14W500(
"condimentum ac, vestibulum eu nisl.torquent per conubia nostra, per inceptos himenaeos.",
clr: AppColor.textLabelColor),
),
const Gap(12),
],
),
),
Padding(
padding: const EdgeInsets.all(12.0),
child: TextWidget().text14W500(
AppText.instantTransferFundsApplePayText,
clr: AppColor.textLabelColor),
),
const Gap(12),
InkWell(
onTap: () {
radioBloc.add(const RadioSelected(1));
},
child: Container(
clipBehavior: Clip.antiAlias,
// padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
side: const BorderSide(color: Color(0xFFD8D8D8)),
borderRadius: BorderRadius.circular(22),
),
shadows: const [
BoxShadow(
color: Color(0x14000000),
blurRadius: 8,
offset: Offset(-2, -2),
spreadRadius: 0.2,
),
BoxShadow(
color: Color(0x3391978E),
blurRadius: 8,
offset: Offset(2, 2),
spreadRadius: 1,
)
],
),
child: Column(
children: [
Container(
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: selectedIndex == 1
? const Color(0xFFE4F5E9)
: const Color(0xCCE2E2E2),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Radio<int>(
activeColor: AppColor.radioActiveColor,
value: 1,
groupValue: selectedIndex,
onChanged: (int? value) {
if (value != null) {
radioBloc.add(RadioSelected(value));
}
},
),
const Gap(5),
SvgPicture.asset(AppImages.applePayIcon),
const Gap(5),
TextWidget().text14W700(AppText.applePayText,
clr: AppColor.textLabelColor),
],
),
],
),
),
Padding(
padding: const EdgeInsets.all(12.0),
child: TextWidget().text14W500(
AppText.instantTransferFundsApplePayText,
clr: AppColor.textLabelColor),
),
const Gap(12),
],
),
),
const Gap(12),
],
),
),
),
const Gap(16),
]);
},
),
const Gap(16),
]);
},
),
);
}
}

View File

@@ -14,186 +14,190 @@ class InvestPayTopSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
TextEditingController amountController = TextEditingController();
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget().text15W700(AppText.enterInvestmentAmountText,
clr: AppColor.plainBlack),
const Gap(16.0),
Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: AppColor.plainWhite,
borderRadius: BorderRadius.circular(22.0),
boxShadow: const [
BoxShadow(
color: Color(0x14000000),
blurRadius: 8,
offset: Offset(-2, -2),
spreadRadius: 0.50,
),
BoxShadow(
color: Color(0x3391978E),
blurRadius: 8,
offset: Offset(2, 2),
spreadRadius: 4,
)
],
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(4),
child: Image.asset(
'assets/images/portfolio_screen/detailsbg.png',
width: 0.2.sw,
height: 0.2.sw,
fit: BoxFit.cover,
),
),
const Gap(16.0),
Expanded(
child: TextWidget().text17W700(
'Multi Family Residential',
clr: AppColor.plainBlack,
)),
],
),
),
Container(
decoration: const ShapeDecoration(
color: AppColor.portfolioCardBgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(22),
bottomRight: Radius.circular(22),
),
),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(12.0),
child: Stack(
alignment: Alignment.centerLeft,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextWidget().text15W700(
"SAR",
clr: AppColor.textLabelColor,
),
const Gap(12),
Expanded(
child: Column(
children: [
textFormField(
txtAlign: TextAlign.center,
readonly: false,
validator: (value) {
if (amountController.text.isEmpty) {
return AppText.pleaseEnterAmountText;
}
return null;
},
texttype: TextInputType.number,
textEditingController: amountController,
hintText: AppText.enterAmountText,
suffixIcon: const SizedBox(),
),
],
),
),
],
),
],
),
),
const Padding(
padding: EdgeInsets.all(12.0),
child: Column(
children: [
InvestmentDetailRow(
label: AppText.currentExchangeText,
value: 'SAR 1 = USD 0.267',
),
SizedBox(height: 8.0),
InvestmentDetailRow(
label: AppText.feeText,
value: '3%',
),
SizedBox(height: 8.0),
InvestmentDetailRow(
label: '${AppText.totalInvestmentAmountText}:',
value: 'SAR 1000',
),
],
),
)
],
),
)
],
),
),
const Gap(24),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
width: 24,
height: 24,
AppImages.orangenInfoIcon,
),
const Gap(8),
Column(
children: [
SizedBox(
width: 0.8.sw,
child: TextWidget().text12W500(
AppText.retailInvestirCanInvestMaxText,
clr: AppColor.infoTextColor,
),
),
SizedBox(
width: 0.8.sw,
child: TextWidget().text12W700(
AppText.upgradeYourInvestorStatusToIncreaseText,
clr: AppColor.infoTextColor,
txtDec: TextDecoration.underline,
decClr: AppColor.infoTextColor,
),
return Padding(
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget().text15W700(AppText.enterInvestmentAmountText,
clr: AppColor.plainBlack),
const Gap(16.0),
Container(
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: AppColor.plainWhite,
borderRadius: BorderRadius.circular(22.0),
boxShadow: const [
BoxShadow(
color: Color(0x14000000),
blurRadius: 8,
offset: Offset(-2, -2),
spreadRadius: 0.50,
),
BoxShadow(
color: Color(0x3391978E),
blurRadius: 8,
offset: Offset(2, 2),
spreadRadius: 4,
)
],
),
],
),
const Gap(15),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
width: 24,
height: 24,
AppImages.infoIcon,
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(4),
child: Image.asset(
'assets/images/portfolio_screen/detailsbg.png',
width: 0.2.sw,
height: 0.2.sw,
fit: BoxFit.cover,
),
),
const Gap(16.0),
Expanded(
child: TextWidget().text17W700(
'Multi Family Residential',
clr: AppColor.plainBlack,
)),
],
),
),
Container(
decoration: const ShapeDecoration(
color: AppColor.portfolioCardBgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(22),
bottomRight: Radius.circular(22),
),
),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(12.0),
child: Stack(
alignment: Alignment.centerLeft,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextWidget().text15W700(
"SAR",
clr: AppColor.textLabelColor,
),
const Gap(12),
Expanded(
child: Column(
children: [
textFormField(
txtAlign: TextAlign.center,
readonly: false,
validator: (value) {
if (amountController.text.isEmpty) {
return AppText
.pleaseEnterAmountText;
}
return null;
},
texttype: TextInputType.number,
textEditingController: amountController,
hintText: AppText.enterAmountText,
suffixIcon: const SizedBox(),
),
],
),
),
],
),
],
),
),
const Padding(
padding: EdgeInsets.all(12.0),
child: Column(
children: [
InvestmentDetailRow(
label: AppText.currentExchangeText,
value: 'SAR 1 = USD 0.267',
),
SizedBox(height: 8.0),
InvestmentDetailRow(
label: AppText.feeText,
value: '3%',
),
SizedBox(height: 8.0),
InvestmentDetailRow(
label: '${AppText.totalInvestmentAmountText}:',
value: 'SAR 1000',
),
],
),
)
],
),
)
],
),
const Gap(8),
SizedBox(
width: 0.8.sw,
child: TextWidget().text12W500(
AppText.upgradeYourInvestorStatusToIncreaseText,
clr: AppColor.languageTextColor,
),
const Gap(24),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
width: 24,
height: 24,
AppImages.orangenInfoIcon,
),
),
],
),
const Gap(24),
],
const Gap(8),
Column(
children: [
SizedBox(
width: 0.8.sw,
child: TextWidget().text12W500(
AppText.retailInvestirCanInvestMaxText,
clr: AppColor.infoTextColor,
),
),
SizedBox(
width: 0.8.sw,
child: TextWidget().text12W700(
AppText.upgradeYourInvestorStatusToIncreaseText,
clr: AppColor.infoTextColor,
txtDec: TextDecoration.underline,
decClr: AppColor.infoTextColor,
),
),
],
),
],
),
const Gap(15),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
width: 24,
height: 24,
AppImages.infoIcon,
),
const Gap(8),
SizedBox(
width: 0.8.sw,
child: TextWidget().text12W500(
AppText.upgradeYourInvestorStatusToIncreaseText,
clr: AppColor.languageTextColor,
),
),
],
),
const Gap(24),
],
),
);
}
}

View File

@@ -21,7 +21,7 @@ class InvestmentOverSubscribedDialog extends StatelessWidget {
children: [
IconButton(
icon: const Icon(
Icons.close,
Icons.close_sharp,
color: AppColor.hintTextColor,
),
onPressed: () {

View File

@@ -71,7 +71,7 @@ class IncludedDocumentsSection extends StatelessWidget {
],
),
Gap(
14.h,
12.h,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,

View File

@@ -31,11 +31,13 @@ class SettingsListItem extends StatelessWidget {
child: ListTile(
onTap: onTapFunc,
leading: SvgPicture.asset(icon),
title: Text(title,
style: GoogleFonts.dmSans(
fontSize: 14,
fontWeight: FontWeight.w600,
color: AppColor.textLabelColor)),
title: Text(
title,
style: GoogleFonts.dmSans(
fontSize: 14,
fontWeight: FontWeight.w600,
color: AppColor.textLabelColor),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [

View File

@@ -371,9 +371,9 @@ class _DepositPreviewState extends State<DepositPreview> {
children: [
GestureDetector(
onTap: () {
goRouter.pushNamed(RouteName.otpScreen, pathParameters: {
"fromScreen": 'withdrawal',
});
goRouter.pushNamed(
RouteName.mainScreen,
);
},
child: Container(
margin: const EdgeInsets.all(12.0),

View File

@@ -36,225 +36,343 @@ class WalletDetails extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
bottomNavigationBar: type == "confirm-investment"
? Container(
margin: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 15,
),
width: 1.sw,
height: 60.h,
child: ButtonWidget().elevatedBtn(
txtClr: AppColor.plainWhite,
function: () {
goRouter.pop();
goRouter.pop();
goRouter.pop();
goRouter.pop();
goRouter.pop();
},
text: AppText.closeText,
clr: AppColor.primaryColor2,
),
)
: const SizedBox(),
appBar: AppBar(
backgroundColor: Colors.white,
elevation: 0,
automaticallyImplyLeading: type == "confirm-investment" ? false : true,
actions: [
type == "confirm-investment"
? IconButton(
onPressed: () {
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();
},
icon: const Icon(
Icons.cancel_outlined,
color: Color(0xFF363636),
),
)
: const SizedBox()
],
scrolledUnderElevation: 0.0,
centerTitle: true,
title: Text(
type == "confirm-investment"
? AppText.investmentConfirmationText
: 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
text: AppText.closeText,
clr: AppColor.primaryColor2,
),
),
],
),
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,
),
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,
),
),
],
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
),
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,
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,
),
),
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,
Text(
AppText.investment,
style: GoogleFonts.dmSans(
color: const Color(0xFF191B1E),
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
),
),
SizedBox(
height: 16.h,
),
Text(
'+ SAR 100,000',
style: GoogleFonts.dmSans(
color: const Color(0xFF191B1E),
fontSize: 20.sp,
fontWeight: FontWeight.w900,
SizedBox(
height: 4.h,
),
),
(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(),
],
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) {
@@ -314,7 +432,6 @@ class WalletDetails extends StatelessWidget {
}
Widget _buildBody() {
// List<MapEntry<String, String>> entries;
if (type == 'Yield') {
return Container();
} else if (type == 'Refund') {

View File

@@ -193,7 +193,7 @@ class _WithdrawalConfirmationState extends State<WithdrawalConfirmation> {
],
),
SizedBox(
height: 35.h,
height: 30.h,
),
ListView.builder(
physics: const NeverScrollableScrollPhysics(),

View File

@@ -21,7 +21,7 @@ class AccountDeletionDialog extends StatelessWidget {
children: [
IconButton(
icon: const Icon(
Icons.close,
Icons.close_sharp,
color: AppColor.hintTextColor,
),
onPressed: () {

View File

@@ -240,6 +240,14 @@ class TextWidget {
color: clr ?? AppColor.plainWhite));
}
Widget text22W900(String text, {Color? clr}) {
return Text(text,
style: GoogleFonts.dmSans(
fontSize: 22,
fontWeight: FontWeight.w900,
color: clr ?? AppColor.plainWhite));
}
//Text Size 20
Widget text20W700(String text, {Color? clr}) {
return Text(text,