Merge branch 'main' into splash
This commit is contained in:
@@ -30,7 +30,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
return Scaffold(
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: Colors.black,
|
||||
drawer: Container(width: 320.w, child: SideMenu()),
|
||||
drawer: Container(child: SideMenu()),
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
@@ -50,6 +50,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// title: text22W600('Short'),
|
||||
),
|
||||
|
||||
// CommonAppbar(
|
||||
@@ -136,7 +137,7 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
Widget ActiveCallsTab() {
|
||||
return Obx(() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (selectedIndex == 1) _unlockbottomsheet();
|
||||
if (selectedIndex == 1 || selectedIndex == 2) _unlockbottomsheet();
|
||||
});
|
||||
return selectedIndex == 0
|
||||
? Column(
|
||||
@@ -235,25 +236,35 @@ class _ShortTradeState extends State<ShortTrade> {
|
||||
|
||||
void _unlockbottomsheet() {
|
||||
Get.bottomSheet(
|
||||
SizedBox(
|
||||
height: 200,
|
||||
child: commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 200,
|
||||
borderradius: 2,
|
||||
customWidget: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Image.asset(
|
||||
// 'assets/images/png/Group 1000003722.png',
|
||||
// height: 100.h,
|
||||
// ),
|
||||
// sizedBoxHeight(25.h),
|
||||
text20W400('Please subscribed to unlock'),
|
||||
sizedBoxHeight(30.h),
|
||||
CommonBtn(text: 'Subscribe Now'),
|
||||
],
|
||||
|
||||
commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 439.h,
|
||||
borderradius: 4,
|
||||
customWidget: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 35.w),
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(50.h),
|
||||
// Image.asset(
|
||||
// 'assets/images/png/Group 1000003722.png',
|
||||
// height: 100.h,
|
||||
// ),
|
||||
// sizedBoxHeight(25.h),
|
||||
text20W400('Please subscribed to unlock'),
|
||||
sizedBoxHeight(30.h),
|
||||
CommonBtn(
|
||||
text: 'Subscribe Now',
|
||||
onTap: () {},
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 100,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
324
lib/view/Sidemenu/FaqScreen.dart
Normal file
324
lib/view/Sidemenu/FaqScreen.dart
Normal file
@@ -0,0 +1,324 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppBar.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CustomTextFormField.dart';
|
||||
import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart';
|
||||
import 'package:traderscircuit/Utils/Common/sized_box.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
class FaqScreen extends StatefulWidget {
|
||||
const FaqScreen({super.key});
|
||||
|
||||
@override
|
||||
State<FaqScreen> createState() => _FaqScreenState();
|
||||
}
|
||||
|
||||
class _FaqScreenState extends State<FaqScreen> {
|
||||
List<String> containerTexts = [
|
||||
"Subscriptions",
|
||||
"Investments",
|
||||
"App features"
|
||||
];
|
||||
|
||||
final selectedIndex = 0.obs;
|
||||
late RxList<bool> isExpandedList;
|
||||
@override
|
||||
void initState() {
|
||||
isExpandedList = RxList.generate(Faqcard.length, (index) => index == 0);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
List<Map<String, String>> Faqcard = [
|
||||
{
|
||||
'title': 'How to create new account?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
{
|
||||
'title': 'What is Traders Circuits ?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
{
|
||||
'title': 'What is Traders Circuits ?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
{
|
||||
'title': 'What is Traders Circuits ?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
{
|
||||
'title': 'What is Traders Circuits ?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
];
|
||||
|
||||
List<Map<String, String>> Faqcard2 = [
|
||||
{
|
||||
'title': 'How to create new account?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
{
|
||||
'title': 'What is Traders Circuits ?',
|
||||
'content':
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since. Lorem Ipsum has been the industry's standard dummy text ever since.",
|
||||
},
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
body: Stack(children: [
|
||||
CommonBlurLeft(),
|
||||
CommonBlurRight(),
|
||||
Stack(children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
child: ListView(physics: BouncingScrollPhysics(), children: [
|
||||
text25W600('FAQ'),
|
||||
sizedBoxHeight(20),
|
||||
CustomTextFormField1(
|
||||
hintText: 'Search Chats',
|
||||
leadingIcon: Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/search-svgrepo-com.svg',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
SizedBox(
|
||||
height: 60,
|
||||
width: double.infinity,
|
||||
// color: Colors.amber,
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: containerTexts.length,
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
selectedIndex.value = index;
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
topContainer(containerTexts[index], index),
|
||||
sizedBoxWidth(10.w)
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Obx(() {
|
||||
return selectedIndex == 0
|
||||
? Column(
|
||||
children: List.generate(Faqcard.length, (index) {
|
||||
return customExpandableItem(
|
||||
isExpanded: isExpandedList[index],
|
||||
title: Faqcard[index]['title']!,
|
||||
content: Faqcard[index]['content']!,
|
||||
toggleExpansion: () => toggleExpansion(index),
|
||||
);
|
||||
}))
|
||||
: Column(
|
||||
children: List.generate(Faqcard2.length, (index) {
|
||||
return customExpandableItem(
|
||||
isExpanded: isExpandedList[index],
|
||||
title: Faqcard2[index]['title']!,
|
||||
content: Faqcard2[index]['content']!,
|
||||
toggleExpansion: () => toggleExpansion(index),
|
||||
);
|
||||
}));
|
||||
}),
|
||||
|
||||
// ListView.builder(
|
||||
// shrinkWrap: true,
|
||||
// itemCount: Faqcard.length,
|
||||
// itemBuilder: (BuildContext context, int index) {
|
||||
// return Obx(
|
||||
// () {
|
||||
// return customExpandableItem(
|
||||
// isExpanded: isExpandedList[index],
|
||||
// title: Faqcard[index]['title']!,
|
||||
// content: Faqcard[index]['content']!,
|
||||
// toggleExpansion: () => toggleExpansion(index),
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
|
||||
sizedBoxHeight(30.h),
|
||||
]))
|
||||
])
|
||||
]));
|
||||
}
|
||||
|
||||
Widget topContainer(String text, int index) {
|
||||
return Obx(() {
|
||||
return selectedIndex.value == index
|
||||
? Container(
|
||||
height: 38.h,
|
||||
width: 136.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
color: Color(0XFF3F0502),
|
||||
border: Border.all(color: Color(0xFF9A0000), width: 1)),
|
||||
child: Center(child: text16W500(text)),
|
||||
)
|
||||
: commonGlassContainer(
|
||||
width: 136.w,
|
||||
height: 38.h,
|
||||
borderradius: 5,
|
||||
customWidget: Center(child: text16W400(text)),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
void toggleExpansion(int index) {
|
||||
// isExpandedList[index] = !isExpandedList[index];
|
||||
for (int i = 0; i < isExpandedList.length; i++) {
|
||||
if (i != index) {
|
||||
isExpandedList[i] = false;
|
||||
}
|
||||
}
|
||||
// Toggle the expansion state of the container being toggled
|
||||
isExpandedList[index] = !isExpandedList[index];
|
||||
}
|
||||
|
||||
Widget customExpandableItem({
|
||||
required bool isExpanded,
|
||||
required String title,
|
||||
required String content,
|
||||
required VoidCallback toggleExpansion,
|
||||
}) {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: toggleExpansion,
|
||||
child: commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: isExpanded ? 55.h : 65.h,
|
||||
borderradius: 8,
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.only(right: 13.w, left: 13.w),
|
||||
child: Center(
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontFamily: 'manrope',
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Icon(
|
||||
isExpanded
|
||||
? Icons.keyboard_arrow_up_outlined
|
||||
: Icons.keyboard_arrow_down_outlined,
|
||||
color: Colors.white,
|
||||
size: 25.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: isExpanded,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 198.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(8.r),
|
||||
bottomRight: Radius.circular(8.r),
|
||||
),
|
||||
color: Colors.black,
|
||||
border: Border.all(color: Color(0xFF3A3A3A), width: 0.5)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 11.h, left: 14.w, bottom: 25.h, right: 28.w),
|
||||
child: Text(
|
||||
content,
|
||||
style: TextStyle(
|
||||
color: Color(0xFFFFFFFF),
|
||||
fontFamily: 'manrope',
|
||||
fontSize: 14.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 65.h,
|
||||
borderradius: 8,
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.only(right: 8.w, left: 13.w),
|
||||
child: Center(
|
||||
child: Row(children: [
|
||||
Text(
|
||||
'Was this answer helpful?',
|
||||
style: TextStyle(
|
||||
fontFamily: 'manrope',
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
text16W500('Yes'),
|
||||
sizedBoxWidth(2.w),
|
||||
SvgPicture.asset(
|
||||
'assets/images/svg/thumbs-up.svg'),
|
||||
sizedBoxWidth(8.w),
|
||||
text16W500('No'),
|
||||
sizedBoxWidth(2.w),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
sizedBoxHeight(5.h),
|
||||
SvgPicture.asset(
|
||||
'assets/images/svg/thumbs-down.svg'),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
]),
|
||||
)))
|
||||
],
|
||||
),
|
||||
),
|
||||
isExpanded ? sizedBoxHeight(40.h) : sizedBoxHeight(18.h),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/Common/comonGlassmorphicContainer.dart';
|
||||
import 'package:traderscircuit/Utils/Common/sized_box.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
@@ -108,7 +110,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
decoration: ShapeDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 560.png"),
|
||||
"assets/images/png/Ellipse 560 (1).png"),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
shape: const OvalBorder(),
|
||||
@@ -141,11 +143,8 @@ class _SideMenuState extends State<SideMenu> {
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: SizedBox(
|
||||
width: 25.w,
|
||||
height: 25.h,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/sub.svg')),
|
||||
leading:
|
||||
SvgPicture.asset('assets/images/svg/sidemenu/sub.svg'),
|
||||
title: text18W400('My Subscription'),
|
||||
trailing: Container(
|
||||
height: 35.h,
|
||||
@@ -176,11 +175,8 @@ class _SideMenuState extends State<SideMenu> {
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: SizedBox(
|
||||
width: 25.w,
|
||||
height: 25.h,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/content.svg')),
|
||||
leading: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/content.svg'),
|
||||
title: text18W400('Content bytes'),
|
||||
selected: true,
|
||||
onTap: () {
|
||||
@@ -206,7 +202,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
width: 25.w,
|
||||
height: 25.h,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/sub.svg')),
|
||||
'assets/images/svg/sidemenu/Gray.svg')),
|
||||
title: text18W400('Update My KYC'),
|
||||
trailing: Container(
|
||||
height: 40.h,
|
||||
@@ -256,11 +252,8 @@ class _SideMenuState extends State<SideMenu> {
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: SizedBox(
|
||||
width: 25.w,
|
||||
height: 25.h,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/sub.svg')),
|
||||
leading: SvgPicture.asset(
|
||||
'assets/images/svg/sidemenu/Group 51347.svg'),
|
||||
title: text18W400('My Subscription'),
|
||||
trailing: Container(
|
||||
height: 35.h,
|
||||
@@ -402,7 +395,7 @@ void navigateTo(int index, BuildContext context) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
{
|
||||
// Get.toNamed(RouteName.FAQScreen);
|
||||
Get.toNamed(RouteName.faqscreen);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -420,124 +413,57 @@ void navigateTo(int index, BuildContext context) {
|
||||
|
||||
case 3:
|
||||
{
|
||||
// Get.toNamed(RouteName.contactUs);
|
||||
Get.toNamed(RouteName.termsandcondition);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
{
|
||||
Get.toNamed(RouteName.termsandcondition);
|
||||
Get.toNamed(RouteName.privacypolicy);
|
||||
}
|
||||
break;
|
||||
|
||||
case 5:
|
||||
{
|
||||
Get.toNamed(RouteName.privacypolicy);
|
||||
Get.toNamed(RouteName.aboutus);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
Get.toNamed(RouteName.aboutus);
|
||||
// Get.toNamed(RouteName.settings);
|
||||
}
|
||||
break;
|
||||
|
||||
case 7:
|
||||
{
|
||||
Get.bottomSheet(
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: SvgPicture.asset('assets/images/svg/logout.svg'),
|
||||
),
|
||||
Text(
|
||||
'Are You Sure You Want To Logout?',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 20.sp,
|
||||
commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 363.h,
|
||||
borderradius: 4,
|
||||
customWidget: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(60.h),
|
||||
// Image.asset(
|
||||
// 'assets/images/png/Group 1000003722.png',
|
||||
// height: 100.h,
|
||||
// ),
|
||||
// sizedBoxHeight(25.h),
|
||||
text22W600('Confirm Logout'),
|
||||
sizedBoxHeight(30.h),
|
||||
text20W400_center(
|
||||
'Are you sure you want to logout your account?'),
|
||||
sizedBoxHeight(50.h),
|
||||
CommonYesNoBtn(),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Container(
|
||||
width: 150.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
border: Border.all(
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(18.0),
|
||||
child: Text(
|
||||
'No',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
// onTap: () async {
|
||||
// FirebaseAuth auth = FirebaseAuth.instance;
|
||||
// final GoogleSignIn googleSignIn = GoogleSignIn();
|
||||
|
||||
// if (auth.currentUser != null &&
|
||||
// auth.currentUser?.providerData.any((userInfo) =>
|
||||
// userInfo.providerId == 'google.com') ==
|
||||
// true) {
|
||||
// await googleSignIn.signOut();
|
||||
// Navigator.of(context).pop();
|
||||
// Get.back();
|
||||
// Get.toNamed(RouteName.login);
|
||||
// } else {
|
||||
// SharedPreferences prefs =
|
||||
// await SharedPreferences.getInstance();
|
||||
// prefs.remove('token');
|
||||
// Navigator.of(context).pop();
|
||||
// Get.back();
|
||||
// Get.toNamed(RouteName.login);
|
||||
// }
|
||||
// },
|
||||
onTap: () {
|
||||
Get.back();
|
||||
// Get.toNamed(RouteName.login);
|
||||
},
|
||||
child: Container(
|
||||
width: 150.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF3192D8),
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(18.0),
|
||||
child: Text(
|
||||
'Yes',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
backgroundColor: Colors.black.withOpacity(0.3),
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
|
||||
@@ -12,6 +14,8 @@ import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
import '../../controller/kyc_controller.dart';
|
||||
|
||||
class Kyc extends StatefulWidget {
|
||||
const Kyc({super.key});
|
||||
|
||||
@@ -25,372 +29,554 @@ class _KycState extends State<Kyc> {
|
||||
Color primaryColor = Colors.transparent.withOpacity(0.2);
|
||||
Color secondaryColor = Colors.grey.shade800;
|
||||
|
||||
bool isSwitched = false;
|
||||
KYCController kycController = Get.put(KYCController());
|
||||
|
||||
void _toggleSwitch(bool value) {
|
||||
setState(() {
|
||||
isSwitched = value;
|
||||
});
|
||||
}
|
||||
// DateTime timebackPressed = DateTime.now();
|
||||
|
||||
DateTime timebackPressed = DateTime.now();
|
||||
// Future<void> _selectDate(BuildContext context) async {
|
||||
// final DateTime? picked = await showDatePicker(
|
||||
// context: context,
|
||||
// initialDate: DateTime.now(),
|
||||
// firstDate: DateTime(1900),
|
||||
// lastDate: DateTime.now(),
|
||||
// builder: (context, child) {
|
||||
// return Theme(
|
||||
// data: Theme.of(context).copyWith(
|
||||
// colorScheme: const ColorScheme.light(
|
||||
// surface: Colors.black,
|
||||
// onSurface: Colors.white,
|
||||
// primary: Color(0xff9A0000),
|
||||
// onPrimary: Colors.white,
|
||||
// ),
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: TextButton.styleFrom(
|
||||
// foregroundColor: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// child: child!);
|
||||
// });
|
||||
|
||||
Future<void> _selectDate(BuildContext context) async {
|
||||
final DateTime? picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(1900),
|
||||
lastDate: DateTime.now(),
|
||||
builder: (context, child) {
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
colorScheme: ColorScheme.light(
|
||||
surface: Colors.black,
|
||||
onSurface: Colors.white,
|
||||
primary: Color(0xff9A0000),
|
||||
onPrimary: Colors.white,
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: child!);
|
||||
});
|
||||
|
||||
if (picked != null && picked != DateTime.now()) {
|
||||
setState(() {
|
||||
dobcontroller.text = "${picked.toLocal()}".split(' ')[0];
|
||||
final birthDate = DateTime(
|
||||
picked.year,
|
||||
picked.month,
|
||||
picked.day,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
// if (picked != null && picked != DateTime.now()) {
|
||||
// setState(() {
|
||||
// dobcontroller.text = "${picked.toLocal()}".split(' ')[0];
|
||||
// final birthDate = DateTime(
|
||||
// picked.year,
|
||||
// picked.month,
|
||||
// picked.day,
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "KYC",
|
||||
customActionWidget: text16W400("skip"),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: [
|
||||
CommonBlurLeft(),
|
||||
CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: ListView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
return Obx(
|
||||
() => Scaffold(
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "KYC",
|
||||
customActionWidget: text16W400(""),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: [
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: ListView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
// CommonDropdownBtn(hint: "hint", items: ["hi", "hii"]),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Full Name"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Email Address"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Phone Number"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Date Of Birth"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(
|
||||
suffixIcon: Icon(
|
||||
Icons.calendar_month_outlined,
|
||||
color: Colors.white,
|
||||
children: [
|
||||
// CommonDropdownBtn(hint: "hint", items: ["hi", "hii"]),
|
||||
// Row(
|
||||
// children: [
|
||||
// text18W400("Full Name"),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.h,
|
||||
// ),
|
||||
// CustomTextFormField(),
|
||||
// SizedBox(
|
||||
// height: 30.h,
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// text18W400("Email Address"),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.h,
|
||||
// ),
|
||||
// CustomTextFormField(),
|
||||
// SizedBox(
|
||||
// height: 30.h,
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// text18W400("Phone Number"),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.h,
|
||||
// ),
|
||||
// CustomTextFormField(),
|
||||
// SizedBox(
|
||||
// height: 30.h,
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// text18W400("Date Of Birth"),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.h,
|
||||
// ),
|
||||
// CustomTextFormField(
|
||||
// suffixIcon: Icon(
|
||||
// Icons.calendar_month_outlined,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// readonly: true,
|
||||
// onTap: () {
|
||||
// _selectDate(context);
|
||||
// },
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 30.h,
|
||||
// ),
|
||||
// Row(
|
||||
// children: [
|
||||
// text18W400("City"),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 15.h,
|
||||
// ),
|
||||
// CustomTextFormField(),
|
||||
Row(
|
||||
children: [
|
||||
text18W500("Step 1 : Personal Information"),
|
||||
],
|
||||
),
|
||||
readonly: true,
|
||||
onTap: () {
|
||||
_selectDate(context);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("City"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Upload pan card image"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff9A0000).withOpacity(0.5),
|
||||
Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Front Side")
|
||||
],
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Upload pan card image"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (kycController.panFrontImage.isEmpty) {
|
||||
Get.toNamed(RouteName.kycImage, arguments: {
|
||||
"type": "pan front",
|
||||
});
|
||||
}
|
||||
},
|
||||
child: GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xff9A0000).withOpacity(0.5),
|
||||
const Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: (kycController.panFrontImage.isNotEmpty)
|
||||
? Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 20, horizontal: 40),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.panFrontImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 50.h,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 6,
|
||||
right: 10,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
kycController
|
||||
.panFrontImage.value = "";
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/svg/cancel.svg",
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Front Side")
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff9A0000).withOpacity(0.5),
|
||||
Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Back Side")
|
||||
],
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (kycController.panBackImage.isEmpty) {
|
||||
Get.toNamed(RouteName.kycImage, arguments: {
|
||||
"type": "pan back",
|
||||
});
|
||||
}
|
||||
},
|
||||
child: GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xff9A0000).withOpacity(0.5),
|
||||
const Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: (kycController.panBackImage.isNotEmpty)
|
||||
? Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 20, horizontal: 40),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.panBackImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 50.h,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 6,
|
||||
right: 10,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
kycController.panBackImage.value =
|
||||
"";
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/svg/cancel.svg",
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Back Side")
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Aadhar Number"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
const CustomTextFormField(),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Upload Aadhar card image"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (kycController.aadharFrontImage.isEmpty) {
|
||||
Get.toNamed(RouteName.kycImage, arguments: {
|
||||
"type": "aadhar front",
|
||||
});
|
||||
}
|
||||
},
|
||||
child: GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xff9A0000).withOpacity(0.5),
|
||||
const Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: (kycController.aadharFrontImage.isNotEmpty)
|
||||
? Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 20, horizontal: 40),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.aadharFrontImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 50.h,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 6,
|
||||
right: 10,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
kycController
|
||||
.aadharFrontImage.value = "";
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/svg/cancel.svg",
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Front Side")
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Aadhaar Number"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomTextFormField(),
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
text18W400("Upload Aadhaar card image"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff9A0000).withOpacity(0.5),
|
||||
Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Front Side")
|
||||
],
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (kycController.aadharBackImage.isEmpty) {
|
||||
Get.toNamed(RouteName.kycImage, arguments: {
|
||||
"type": "aadhar back",
|
||||
});
|
||||
}
|
||||
},
|
||||
child: GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xff9A0000).withOpacity(0.5),
|
||||
const Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: (kycController.aadharBackImage.isNotEmpty)
|
||||
? Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 20, horizontal: 40),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.aadharBackImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 50.h,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 6,
|
||||
right: 10,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
kycController
|
||||
.aadharBackImage.value = "";
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/svg/cancel.svg",
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Back Side")
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
GlassmorphicContainer(
|
||||
width: 170.w,
|
||||
height: 105.h,
|
||||
borderRadius: 8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
border: 0.8,
|
||||
blur: 10,
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff9A0000).withOpacity(0.5),
|
||||
Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.file_upload_outlined,
|
||||
size: 42,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
text14W400("Back Side")
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 70.h,
|
||||
),
|
||||
CommonBtn(
|
||||
text: "Next",
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.updateriskprofile);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 70.h,
|
||||
),
|
||||
CommonBtn(
|
||||
text: "Next",
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.updateriskprofile);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CustomTextFormField.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/main.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
@@ -35,14 +33,15 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: [
|
||||
CommonBlurLeft(),
|
||||
CommonBlurRight(),
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: ListView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -80,59 +79,61 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
GlassmorphicContainer(
|
||||
width: 60,
|
||||
height: 50,
|
||||
borderRadius: 8,
|
||||
blur: 10,
|
||||
alignment: Alignment.center,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
Expanded(
|
||||
child: GlassmorphicContainer(
|
||||
width: 60,
|
||||
height: 50,
|
||||
borderRadius: 8,
|
||||
blur: 10,
|
||||
alignment: Alignment.center,
|
||||
border: 0.8,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xff9A0000).withOpacity(0.5),
|
||||
const Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff9A0000).withOpacity(0.5),
|
||||
Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// SvgPicture.asset("assets/images/svg/india.svg"),
|
||||
Image.asset(
|
||||
"assets/images/png/india.png",
|
||||
height: 25.h,
|
||||
width: 25.h,
|
||||
),
|
||||
SizedBox(
|
||||
width: 2,
|
||||
),
|
||||
Text(
|
||||
"+91",
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// SvgPicture.asset("assets/images/svg/india.svg"),
|
||||
Image.asset(
|
||||
"assets/images/png/india.png",
|
||||
height: 25.h,
|
||||
width: 25.h,
|
||||
),
|
||||
)
|
||||
],
|
||||
const SizedBox(
|
||||
width: 2,
|
||||
),
|
||||
const Text(
|
||||
"+91",
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
width: 285.w,
|
||||
child: CustomTextFormField(
|
||||
texttype: TextInputType.phone,
|
||||
@@ -157,7 +158,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
text14W300(
|
||||
@@ -211,10 +212,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
@@ -224,11 +225,11 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFAF2E89).withOpacity(0.2),
|
||||
Color(0xFFA23E31).withOpacity(0.2),
|
||||
Color(0xFF0000).withOpacity(0.2),
|
||||
const Color(0xFFAF2E89).withOpacity(0.2),
|
||||
const Color(0xFFA23E31).withOpacity(0.2),
|
||||
const Color(0xFF0000).withOpacity(0.2),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.3,
|
||||
0.6,
|
||||
1,
|
||||
@@ -261,10 +262,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
@@ -274,11 +275,11 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFAF2E89).withOpacity(0.2),
|
||||
Color(0xFFA23E31).withOpacity(0.2),
|
||||
Color(0xFF0000).withOpacity(0.2),
|
||||
const Color(0xFFAF2E89).withOpacity(0.2),
|
||||
const Color(0xFFA23E31).withOpacity(0.2),
|
||||
const Color(0xFF0000).withOpacity(0.2),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.3,
|
||||
0.6,
|
||||
1,
|
||||
|
||||
@@ -3,15 +3,14 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CustomTextFormField.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
import '../../Utils/Common/custom_drop_down.dart';
|
||||
|
||||
class UpdateRiskProfile extends StatefulWidget {
|
||||
const UpdateRiskProfile({super.key});
|
||||
|
||||
@@ -25,27 +24,54 @@ class _UpdateRiskProfileState extends State<UpdateRiskProfile> {
|
||||
return Scaffold(
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Update Risk Profile",
|
||||
customActionWidget: text16W400("skip"),
|
||||
customActionWidget: text16W400(""),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: [
|
||||
CommonBlurLeft(),
|
||||
CommonBlurRight(),
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
child: ListView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
// CommonDropdownBtn(hint: "hint", items: ["hi", "hii"]),
|
||||
updateRiskProfileData(
|
||||
"What is your investment goal?",
|
||||
"Select your goal",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"Add Investment Experience field",
|
||||
"Select your Experience",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What types of stocks do you prefer?",
|
||||
"Select types of stock",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What is your Risk Perception?",
|
||||
"Select your Perception",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What is your favoured Market Condition?",
|
||||
"Select Condition",
|
||||
),
|
||||
updateRiskProfileData(
|
||||
"What is your Emotional Response to Market Volatility?",
|
||||
"Choose your query",
|
||||
),
|
||||
SizedBox(
|
||||
height: 70.h,
|
||||
),
|
||||
CommonBtn(
|
||||
text: "Next",
|
||||
text: "Submit",
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
},
|
||||
@@ -63,3 +89,64 @@ class _UpdateRiskProfileState extends State<UpdateRiskProfile> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget updateRiskProfileData(
|
||||
String tilte,
|
||||
String headerText,
|
||||
) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text18W400(tilte),
|
||||
SizedBox(
|
||||
height: 15.h,
|
||||
),
|
||||
CustomDropDownWidget(
|
||||
header: headerText,
|
||||
listData: dropHeader[headerText]!,
|
||||
),
|
||||
SizedBox(
|
||||
height: 35.h,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, List<String>> dropHeader = {
|
||||
"Select your goal": [
|
||||
"Wealth Preservation",
|
||||
"Capital Growth",
|
||||
"Income Generation",
|
||||
"Retirement Planning"
|
||||
],
|
||||
"Select your Experience": [
|
||||
"No Experience",
|
||||
"Beginner (0 - 3 months)",
|
||||
"Intermediate (3 - 12 months)",
|
||||
"Expert ( > 12 months)",
|
||||
"Professional ( 3 - 5 years )"
|
||||
],
|
||||
"Select types of stock": [
|
||||
"Swing Trade",
|
||||
"Options",
|
||||
"Multibagger",
|
||||
"Long term",
|
||||
],
|
||||
"Select your Perception": [
|
||||
"Very Conservative",
|
||||
"Conservative",
|
||||
"Moderate",
|
||||
"Aggressive",
|
||||
],
|
||||
"Select Condition": [
|
||||
"Bullish",
|
||||
"Neutral",
|
||||
"Bearish",
|
||||
],
|
||||
"Choose your query": [
|
||||
"Calm",
|
||||
"Neutral",
|
||||
"Anxious",
|
||||
"Stressed",
|
||||
],
|
||||
};
|
||||
|
||||
384
lib/view/login/uploadKycImage.dart
Normal file
384
lib/view/login/uploadKycImage.dart
Normal file
@@ -0,0 +1,384 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:traderscircuit/controller/kyc_controller.dart';
|
||||
|
||||
import '../../Utils/Common/ImagePicker.dart';
|
||||
import '../../Utils/Common/commonBotton.dart';
|
||||
import '../../Utils/text.dart';
|
||||
import '../onBoarding/splashScreen1.dart';
|
||||
|
||||
class UploadKYCImage extends StatefulWidget {
|
||||
const UploadKYCImage({super.key});
|
||||
|
||||
@override
|
||||
State<UploadKYCImage> createState() => _UploadKYCImageState();
|
||||
}
|
||||
|
||||
class _UploadKYCImageState extends State<UploadKYCImage> {
|
||||
KYCController kycController = Get.put(KYCController());
|
||||
String type = Get.arguments["type"];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(
|
||||
() => WillPopScope(
|
||||
onWillPop: () async {
|
||||
type == "pan front"
|
||||
? kycController.panFrontImage.value = ""
|
||||
: type == "pan back"
|
||||
? kycController.panBackImage.value = ""
|
||||
: type == "aadhar front"
|
||||
? kycController.aadharFrontImage.value = ""
|
||||
: kycController.aadharBackImage.value = "";
|
||||
await Future.delayed(const Duration(milliseconds: 210));
|
||||
|
||||
return true;
|
||||
},
|
||||
child: Scaffold(
|
||||
bottomNavigationBar: (type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty) ||
|
||||
(type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty) ||
|
||||
(type == "aadhar front" &&
|
||||
kycController.aadharFrontImage.isNotEmpty) ||
|
||||
(type == "aadhar back" &&
|
||||
kycController.aadharBackImage.isNotEmpty)
|
||||
? Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 17, vertical: 100),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
width: 191.w,
|
||||
child: kycBtn(
|
||||
text: "Retake",
|
||||
onTap: () {
|
||||
if (type == "pan front") {
|
||||
kycController.panFrontImage.value = "";
|
||||
} else if (type == "pan back") {
|
||||
kycController.panBackImage.value = "";
|
||||
} else if (type == "aadhar front") {
|
||||
kycController.aadharFrontImage.value = "";
|
||||
} else {
|
||||
kycController.aadharBackImage.value = "";
|
||||
}
|
||||
},
|
||||
bgClr: const Color(0xFF111313),
|
||||
borderClr: const Color(0xFF990000),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(16),
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
width: 191.w,
|
||||
child: kycBtn(
|
||||
text: "Submit",
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
bgClr: const Color(0xFF6C0000),
|
||||
borderClr: const Color(0xFF990000),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
toolbarHeight: 80,
|
||||
leadingWidth: 56.w,
|
||||
leading: Padding(
|
||||
padding: EdgeInsets.only(left: 16.w, top: 20.h),
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
type == "pan front"
|
||||
? kycController.panFrontImage.value = ""
|
||||
: type == "pan back"
|
||||
? kycController.panBackImage.value = ""
|
||||
: type == "aadhar front"
|
||||
? kycController.aadharFrontImage.value = ""
|
||||
: kycController.aadharBackImage.value = "";
|
||||
await Future.delayed(const Duration(milliseconds: 210));
|
||||
Get.back(result: false);
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(left: 8.w),
|
||||
child: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: Colors.white,
|
||||
size: 25.r,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
extendBody: true,
|
||||
body: Stack(
|
||||
children: [
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 0),
|
||||
child: ListView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
(type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty) ||
|
||||
(type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty) ||
|
||||
(type == "aadhar front" &&
|
||||
kycController
|
||||
.aadharFrontImage.isNotEmpty) ||
|
||||
(type == "aadhar back" &&
|
||||
kycController.aadharBackImage.isNotEmpty)
|
||||
? text24W500("Preview")
|
||||
: text24W500(type.contains("pan")
|
||||
? "Upload Image of pan card"
|
||||
: "Upload Image of Aadhar card"),
|
||||
(type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty) ||
|
||||
(type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty) ||
|
||||
(type == "aadhar front" &&
|
||||
kycController
|
||||
.aadharFrontImage.isNotEmpty) ||
|
||||
(type == "aadhar back" &&
|
||||
kycController.aadharBackImage.isNotEmpty)
|
||||
? const SizedBox()
|
||||
: const Gap(14),
|
||||
(type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty) ||
|
||||
(type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty) ||
|
||||
(type == "aadhar front" &&
|
||||
kycController
|
||||
.aadharFrontImage.isNotEmpty) ||
|
||||
(type == "aadhar back" &&
|
||||
kycController.aadharBackImage.isNotEmpty)
|
||||
? const SizedBox()
|
||||
: text18W400(
|
||||
type.contains("front") ? "Front" : " Back"),
|
||||
const Gap(40),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
if ((type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty) ||
|
||||
(type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty) ||
|
||||
(type == "aadhar front" &&
|
||||
kycController
|
||||
.aadharFrontImage.isNotEmpty) ||
|
||||
(type == "aadhar back" &&
|
||||
kycController.aadharBackImage.isNotEmpty)) {
|
||||
} else {
|
||||
var result = await ImagePickerMethod()
|
||||
.getImage(ImageSource.gallery);
|
||||
if (type == "pan front") {
|
||||
kycController.panFrontImage.value = result;
|
||||
} else if (type == "pan back") {
|
||||
kycController.panBackImage.value = result;
|
||||
} else if (type == "aadhar front") {
|
||||
kycController.aadharFrontImage.value = result;
|
||||
} else {
|
||||
kycController.aadharBackImage.value = result;
|
||||
}
|
||||
}
|
||||
},
|
||||
child: DottedBorder(
|
||||
radius: const Radius.circular(10),
|
||||
borderType: BorderType.RRect,
|
||||
color: const Color(0xFF393939),
|
||||
strokeWidth: 1,
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 170,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.03999999910593033),
|
||||
Colors.white
|
||||
.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
child: (type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty)
|
||||
? Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 17, horizontal: 30),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController.panFrontImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 150.h,
|
||||
),
|
||||
)
|
||||
: (type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty)
|
||||
? Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 17, horizontal: 30),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.panBackImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 150.h,
|
||||
),
|
||||
)
|
||||
: (type == "aadhar front" &&
|
||||
kycController
|
||||
.aadharFrontImage.isNotEmpty)
|
||||
? Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
vertical: 17,
|
||||
horizontal: 30),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.aadharFrontImage.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 150.h,
|
||||
),
|
||||
)
|
||||
: (type == "aadhar back" &&
|
||||
kycController.aadharBackImage
|
||||
.isNotEmpty)
|
||||
? Padding(
|
||||
padding: const EdgeInsets
|
||||
.symmetric(
|
||||
vertical: 17,
|
||||
horizontal: 30),
|
||||
child: Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
kycController
|
||||
.aadharBackImage
|
||||
.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: 150.h,
|
||||
),
|
||||
)
|
||||
: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/images/svg/upload-cloud.svg"),
|
||||
text16W400(
|
||||
"Upload from gallery")
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(20),
|
||||
(type == "pan front" &&
|
||||
kycController.panFrontImage.isNotEmpty) ||
|
||||
(type == "pan back" &&
|
||||
kycController.panBackImage.isNotEmpty) ||
|
||||
(type == "aadhar front" &&
|
||||
kycController
|
||||
.aadharFrontImage.isNotEmpty) ||
|
||||
(type == "aadhar back" &&
|
||||
kycController.aadharBackImage.isNotEmpty)
|
||||
? const SizedBox()
|
||||
: InkWell(
|
||||
onTap: () async {
|
||||
var result = await ImagePickerMethod()
|
||||
.getImage(ImageSource.camera);
|
||||
if (type == "pan front") {
|
||||
kycController.panFrontImage.value = result;
|
||||
} else if (type == "pan back") {
|
||||
kycController.panBackImage.value = result;
|
||||
} else if (type == "aadhar front") {
|
||||
kycController.aadharFrontImage.value =
|
||||
result;
|
||||
} else {
|
||||
kycController.aadharBackImage.value =
|
||||
result;
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 47,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.03999999910593033),
|
||||
Colors.white
|
||||
.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/images/svg/camera.svg"),
|
||||
const Gap(10),
|
||||
text16W400('Click an image')
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user