@@ -37,6 +37,7 @@ class RouteName {
|
||||
|
||||
//Wallet details
|
||||
static const String walletDetails = 'walletDetails';
|
||||
static const String filterScreen = 'filterScreen';
|
||||
static const String withdrawalScreen = 'withdrawalScreen';
|
||||
static const String withdrawalPreview = 'withdrawalPreview';
|
||||
static const String withdrawalConfirmation = 'withdrawalConfirmation';
|
||||
|
||||
@@ -9,6 +9,7 @@ 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/withdrawal/confirmation.dart';
|
||||
import 'package:tanami_app/features/MainScreens/Wallet/presentation/pages/withdrawal/preview.dart';
|
||||
@@ -172,6 +173,13 @@ final goRouter = GoRouter(
|
||||
type: state.pathParameters["type"]!,
|
||||
);
|
||||
}),
|
||||
GoRoute(
|
||||
name: RouteName.filterScreen,
|
||||
path: RouteName.filterScreen,
|
||||
builder: (context, state) {
|
||||
return const FilterScreen();
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: RouteName.withdrawalScreen,
|
||||
path: RouteName.withdrawalScreen,
|
||||
|
||||
@@ -131,7 +131,13 @@ class AppText {
|
||||
static const String walletTitle = "Wallet balance";
|
||||
static const String walletText = "Wallet";
|
||||
static const String day = "Today";
|
||||
static const String filterTitle = "Filters";
|
||||
static const String onHold = "On hold";
|
||||
static const String deposit = "Deposit";
|
||||
static const String withdrawal = "Withdrawal";
|
||||
static const String yield = "Yield";
|
||||
static const String refund = "REfund";
|
||||
static const String investment = "Investment";
|
||||
static const String walletDetailsTitle = "Details";
|
||||
static const String withdrawalScreenTitle = 'Enter bank details';
|
||||
static const String depositScreenTitle = 'Deposit notification';
|
||||
@@ -163,12 +169,20 @@ class AppText {
|
||||
static const String next = 'Next';
|
||||
static const String depositNoti = 'Create deposit notification';
|
||||
static const String submit = 'Submit request';
|
||||
static const String Submit = 'Submit';
|
||||
static const String submitDeposit = 'Submit deposit';
|
||||
static const String cont = 'Continue';
|
||||
static const String later = 'Later';
|
||||
static const String back = 'Back to change';
|
||||
static const String clear = 'Clear All';
|
||||
static const String bankTransfer = 'Bank Transfer';
|
||||
static const String amtTrans = 'Amount of transaction';
|
||||
static const String date1 = 'Newest first';
|
||||
static const String date2 = 'Oldest first';
|
||||
static const String all = 'All';
|
||||
static const String byDate = 'By date';
|
||||
static const String byAction = 'By type of action';
|
||||
static const String byStatus = 'By status';
|
||||
|
||||
//Settings
|
||||
static const String settingsText = "Settings";
|
||||
|
||||
@@ -398,7 +398,7 @@ class _DepositPreviewState extends State<DepositPreview> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Gap(10),
|
||||
const Gap(10),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
@@ -409,7 +409,7 @@ class _DepositPreviewState extends State<DepositPreview> {
|
||||
textDecoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
Gap(30),
|
||||
const Gap(30),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
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';
|
||||
import 'package:tanami_app/core/styles/app_color.dart';
|
||||
import 'package:tanami_app/core/styles/app_text.dart';
|
||||
import 'package:tanami_app/shared/components/text_widget.dart';
|
||||
|
||||
class FilterScreen extends StatefulWidget {
|
||||
const FilterScreen({super.key});
|
||||
|
||||
@override
|
||||
State<FilterScreen> createState() => _FilterScreenState();
|
||||
}
|
||||
|
||||
class _FilterScreenState extends State<FilterScreen> {
|
||||
List actions = [
|
||||
AppText.deposit,
|
||||
AppText.withdrawal,
|
||||
AppText.yield,
|
||||
AppText.refund,
|
||||
AppText.investment,
|
||||
];
|
||||
List selected = [
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
];
|
||||
int dateIndex = 0;
|
||||
int statusIndex = 0;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 0.0,
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
AppText.filterTitle,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF272727),
|
||||
fontSize: 20.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(18.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
AppText.byDate,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF8D8D8D),
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Radio<int>(
|
||||
activeColor: AppColor.radioActiveColor,
|
||||
value: 1,
|
||||
groupValue: dateIndex,
|
||||
onChanged: (int? value) {
|
||||
setState(() {
|
||||
dateIndex = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Gap(3),
|
||||
Text(
|
||||
AppText.date1,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF272727),
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Radio<int>(
|
||||
activeColor: AppColor.radioActiveColor,
|
||||
value: 2,
|
||||
groupValue: dateIndex,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
dateIndex = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Gap(3),
|
||||
Text(
|
||||
AppText.date2,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF272727),
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
Text(
|
||||
AppText.byAction,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF8D8D8D),
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
const Gap(15),
|
||||
Wrap(
|
||||
children: List.generate(
|
||||
actions.length,
|
||||
(int index) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 12.0, bottom: 12.0),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
for (var i = 0; i < selected.length; i++) {
|
||||
selected[i] = false;
|
||||
}
|
||||
selected[index] = true;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
height: 36.h,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8, horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: (selected[index] == true)
|
||||
? const Color(0xFFe6eff5)
|
||||
: Colors.white,
|
||||
borderRadius: BorderRadius.circular(16.r),
|
||||
border: Border.all(
|
||||
color: (selected[index] == true)
|
||||
? const Color(0xFFe6eff5)
|
||||
: Colors.grey),
|
||||
),
|
||||
child: Text(
|
||||
actions[index],
|
||||
style: GoogleFonts.dmSans(
|
||||
color: (selected[index] == true)
|
||||
? Color(0xFF0167B7)
|
||||
: const Color(0xFF272727),
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
Text(
|
||||
AppText.byStatus,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF8D8D8D),
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Radio<int>(
|
||||
activeColor: AppColor.radioActiveColor,
|
||||
value: 1,
|
||||
groupValue: statusIndex,
|
||||
onChanged: (int? value) {
|
||||
setState(() {
|
||||
statusIndex = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Gap(3),
|
||||
Text(
|
||||
AppText.all,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF272727),
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Radio<int>(
|
||||
activeColor: AppColor.radioActiveColor,
|
||||
value: 2,
|
||||
groupValue: statusIndex,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
statusIndex = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Gap(3),
|
||||
Text(
|
||||
AppText.onHold,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: const Color(0xFF272727),
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
dateIndex = 0;
|
||||
statusIndex = 0;
|
||||
for (var i = 0; i < selected.length; i++) {
|
||||
selected[i] = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
child: TextWidget().text14W700(
|
||||
AppText.clear,
|
||||
clr: const Color(0xFF363636),
|
||||
textDecoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
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.Submit,
|
||||
style: GoogleFonts.dmSans(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class WalletScreen extends StatefulWidget {
|
||||
class _WalletScreenState extends State<WalletScreen> {
|
||||
List data = [
|
||||
{
|
||||
'title': 'Deposit',
|
||||
'title': AppText.deposit,
|
||||
'subTitle': '',
|
||||
'dateTime': '10/04/2024 22:04',
|
||||
'value': '+ SAR 100,000',
|
||||
@@ -24,7 +24,7 @@ class _WalletScreenState extends State<WalletScreen> {
|
||||
'onHold': false,
|
||||
},
|
||||
{
|
||||
'title': 'Withdrawal',
|
||||
'title': AppText.withdrawal,
|
||||
'subTitle': '',
|
||||
'dateTime': '10/04/2024 22:04',
|
||||
'value': '- SAR 100,000',
|
||||
@@ -32,7 +32,7 @@ class _WalletScreenState extends State<WalletScreen> {
|
||||
'onHold': true,
|
||||
},
|
||||
{
|
||||
'title': 'Investment',
|
||||
'title': AppText.investment,
|
||||
'subTitle': 'Name of Investment',
|
||||
'dateTime': '10/04/2024 22:04',
|
||||
'value': '- SAR 100,000',
|
||||
@@ -40,7 +40,7 @@ class _WalletScreenState extends State<WalletScreen> {
|
||||
'onHold': false,
|
||||
},
|
||||
{
|
||||
'title': 'Yield',
|
||||
'title': AppText.yield,
|
||||
'subTitle': 'Name of Investment',
|
||||
'dateTime': '10/04/2024 22:04',
|
||||
'value': '+ SAR 100,000',
|
||||
@@ -48,7 +48,7 @@ class _WalletScreenState extends State<WalletScreen> {
|
||||
'onHold': false,
|
||||
},
|
||||
{
|
||||
'title': 'Refund',
|
||||
'title': AppText.refund,
|
||||
'subTitle': '',
|
||||
'dateTime': '10/04/2024 22:04',
|
||||
'value': '- SAR 100,000',
|
||||
@@ -240,16 +240,21 @@ class _WalletScreenState extends State<WalletScreen> {
|
||||
SizedBox(
|
||||
width: 5.w,
|
||||
),
|
||||
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,
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user