Merge pull request #10 from WDI-Ideas/jayeshjain25

update risk profile screen, kyc screen and image picker package added
This commit is contained in:
Jayesh jain
2024-03-21 17:59:27 +05:30
committed by GitHub
19 changed files with 1610 additions and 531 deletions

View File

@@ -4,6 +4,10 @@
android:label="Trader's Circuit"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<activity
android:name=".MainActivity"
android:exported="true"

View File

@@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23 19C23 19.5304 22.7893 20.0391 22.4142 20.4142C22.0391 20.7893 21.5304 21 21 21H3C2.46957 21 1.96086 20.7893 1.58579 20.4142C1.21071 20.0391 1 19.5304 1 19V8C1 7.46957 1.21071 6.96086 1.58579 6.58579C1.96086 6.21071 2.46957 6 3 6H7L9 3H15L17 6H21C21.5304 6 22.0391 6.21071 22.4142 6.58579C22.7893 6.96086 23 7.46957 23 8V19Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 17C14.2091 17 16 15.2091 16 13C16 10.7909 14.2091 9 12 9C9.79086 9 8 10.7909 8 13C8 15.2091 9.79086 17 12 17Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 727 B

View File

@@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.4 13.308L9 9.708L12.6 13.308L13.308 12.6L9.708 9L13.308 5.4L12.6 4.692L9 8.292L5.4 4.692L4.692 5.4L8.292 9L4.692 12.6L5.4 13.308ZM9.003 18C7.759 18 6.589 17.764 5.493 17.292C4.39767 16.8193 3.44467 16.178 2.634 15.368C1.82333 14.5587 1.18167 13.6067 0.709 12.512C0.236333 11.4173 0 10.2477 0 9.003C0 7.759 0.236 6.589 0.708 5.493C1.18067 4.39767 1.822 3.44467 2.632 2.634C3.44133 1.82333 4.39333 1.18167 5.488 0.709C6.58267 0.236333 7.75233 0 8.997 0C10.241 0 11.411 0.236 12.507 0.708C13.6023 1.18067 14.5553 1.822 15.366 2.632C16.1767 3.44133 16.8183 4.39333 17.291 5.488C17.7637 6.58267 18 7.75233 18 8.997C18 10.241 17.764 11.411 17.292 12.507C16.8193 13.6023 16.178 14.5553 15.368 15.366C14.5587 16.1767 13.6067 16.8183 12.512 17.291C11.4173 17.7637 10.2477 18 9.003 18ZM9 17C11.2333 17 13.125 16.225 14.675 14.675C16.225 13.125 17 11.2333 17 9C17 6.76667 16.225 4.875 14.675 3.325C13.125 1.775 11.2333 1 9 1C6.76667 1 4.875 1.775 3.325 3.325C1.775 4.875 1 6.76667 1 9C1 11.2333 1.775 13.125 3.325 14.675C4.875 16.225 6.76667 17 9 17Z" fill="#9F9F9F"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,6 @@
<svg width="49" height="49" viewBox="0 0 49 49" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32.6667 32.6667L24.5 24.5L16.3333 32.6667" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M24.5 24.5V42.875" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M41.6296 37.5461C43.6209 36.4605 45.194 34.7427 46.1006 32.6637C47.0072 30.5848 47.1956 28.2631 46.6362 26.0652C46.0768 23.8673 44.8013 21.9182 43.0111 20.5257C41.221 19.1331 39.018 18.3764 36.75 18.3749H34.1775C33.5595 15.9846 32.4077 13.7655 30.8087 11.8844C29.2096 10.0033 27.2049 8.50923 24.9453 7.51444C22.6857 6.51965 20.23 6.05006 17.7627 6.14096C15.2955 6.23186 12.881 6.8809 10.7007 8.03927C8.52047 9.19764 6.63116 10.8352 5.17486 12.8288C3.71856 14.8225 2.73317 17.1203 2.29276 19.5496C1.85235 21.9789 1.96839 24.4764 2.63215 26.8544C3.29592 29.2324 4.49013 31.429 6.12501 33.279" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M32.6667 32.6667L24.5 24.5L16.3333 32.6667" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -7,7 +7,7 @@ import 'package:traderscircuit/Utils/text.dart';
class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
@override
Size get preferredSize => Size.fromHeight(height);
Size get preferredSize => Size.fromHeight(height!);
const CommonAppbar(
{Key? key,
required this.titleTxt,
@@ -27,11 +27,11 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
final String? backPageName;
final Widget? customActionWidget;
final VoidCallback? onCustomActionPressed;
final double height;
final double? height;
@override
Widget build(BuildContext context) {
return PreferredSize(
preferredSize: Size.fromHeight(130),
preferredSize: Size.fromHeight(height ?? 130),
child: AppBar(
scrolledUnderElevation: 0.0,
backgroundColor: Colors.black,

View File

@@ -0,0 +1,36 @@
import 'package:image_cropper/image_cropper.dart';
import 'package:image_picker/image_picker.dart';
class ImagePickerMethod {
Future<String> getImage(ImageSource imgSource) async {
final ImagePicker picker = ImagePicker();
final XFile? pickedImg = await picker.pickImage(source: imgSource);
if (pickedImg != null) {
final croppedImg = await ImageCropper().cropImage(
sourcePath: pickedImg.path,
aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
compressFormat: ImageCompressFormat.jpg,
maxHeight: 512,
maxWidth: 512,
uiSettings: [
IOSUiSettings(
rotateButtonsHidden: true,
rotateClockwiseButtonHidden: true,
)
],
compressQuality: 100,
aspectRatioPresets: [
CropAspectRatioPreset.square,
],
);
if (croppedImg != null) {
return croppedImg.path;
} else {
return "";
}
} else {
return "";
}
}
}

View File

@@ -23,3 +23,40 @@ Widget CommonBtn({void Function()? onTap, required String text}) {
),
));
}
Widget kycBtn({
void Function()? onTap,
required String text,
required Color bgClr,
required Color borderClr,
}) {
return InkWell(
onTap: onTap,
child: Container(
width: 191,
height: 50,
decoration: ShapeDecoration(
color: bgClr,
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1,
color: borderClr,
),
borderRadius: BorderRadius.circular(8),
),
),
child: Center(
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontFamily: 'Cambria',
fontWeight: FontWeight.w400,
),
),
),
),
);
}

View File

@@ -0,0 +1,192 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../text.dart';
class CustomDropDownWidget extends StatefulWidget {
const CustomDropDownWidget(
{super.key, required this.header, required this.listData});
final String header;
final List<String> listData;
@override
State<CustomDropDownWidget> createState() => _CustomDropDownWidgetState();
}
class _CustomDropDownWidgetState extends State<CustomDropDownWidget> {
RxBool onDropTap = false.obs;
RxString selectedValue = "".obs;
@override
Widget build(BuildContext context) {
return Obx(
() => SizedBox(
width: Get.width,
// height: onDropTap.value ? 350 : 55,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () {
onDropTap.value = !onDropTap.value;
},
child: SizedBox(
width: 398,
height: 55,
child: Stack(
children: [
Positioned(
left: 398,
top: 55,
child: Opacity(
opacity: 0.50,
child: Transform(
transform: Matrix4.identity()
..translate(0.0, 0.0)
..rotateZ(-3.14),
child: Container(
width: 398,
height: 55,
decoration: BoxDecoration(
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)
],
),
border: Border(
top: onDropTap.value
? const BorderSide(
width: 0, color: Color(0xFF393939))
: const BorderSide(
width: 0.50,
color: Color(0xFF393939)),
bottom: const BorderSide(
width: 0.50, color: Color(0xFF393939)),
left: const BorderSide(
width: 0.50,
color: Color(0xFF393939),
),
right: const BorderSide(
width: 0.50,
color: Color(0xFF393939),
),
)),
),
),
),
),
Positioned(
left: 14,
top: 16,
child: Text(
selectedValue.isNotEmpty
? selectedValue.value
: widget.header,
style: const TextStyle(
color: Color(0xFFADADAD),
fontSize: 16,
fontFamily: 'Manrope',
fontWeight: FontWeight.w400,
height: 0,
),
),
),
Positioned(
right: 14,
top: 16,
child: onDropTap.value
? const Icon(
Icons.keyboard_arrow_up_rounded,
color: Colors.white,
)
: const Icon(
Icons.keyboard_arrow_down_rounded,
color: Colors.white,
)),
],
),
),
),
!onDropTap.value
? const SizedBox()
: Opacity(
opacity: 0.50,
child: Container(
width: Get.width,
// height: 216,
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: const RoundedRectangleBorder(
side:
BorderSide(width: 0.50, color: Color(0xFF393939)),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
),
),
),
child: ListView.builder(
shrinkWrap: true,
itemCount: widget.listData.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
selectedValue.value = widget.listData[index];
onDropTap.value = !onDropTap.value;
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: EdgeInsets.only(
left: 14,
top: index == 0 ? 16 : 0,
bottom: index ==
widget.listData.length - 1
? 16
: 0),
child:
text16W400(widget.listData[index])),
index == widget.listData.length - 1
? const SizedBox()
: Container(
width: Get.width,
margin: const EdgeInsets.only(
top: 16, bottom: 16),
decoration: const ShapeDecoration(
shape: RoundedRectangleBorder(
side: BorderSide(
width: 0.60,
strokeAlign: BorderSide
.strokeAlignCenter,
color: Color(0xFF393939),
),
),
),
),
],
),
);
}),
),
),
],
),
),
);
}
}

View File

@@ -56,6 +56,19 @@ Widget text18W400(String text) {
);
}
Widget text24W500(String text) {
return Text(
text,
style: TextStyle(
color: Colors.white,
fontSize: 24.sp,
fontWeight: FontWeight.w500,
fontFamily: 'manrope'),
maxLines: 2,
softWrap: true,
);
}
Widget text16W400(String text) {
return Text(
text,
@@ -231,8 +244,8 @@ Widget text14W300(String text) {
);
}
Widget text14W400(String text) { return Text(
Widget text14W400(String text) {
return Text(
text,
style: TextStyle(
fontSize: 14.sp,
@@ -243,13 +256,11 @@ Widget text14W400(String text) { return Text(
}
Widget text14W500(String text) {
return Text(
text,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w500,
fontFamily: 'manrope'),
);
@@ -261,13 +272,11 @@ Widget text16W400_DADADA(String text) {
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFFDADADA),
fontWeight: FontWeight.w400,
fontFamily: 'manrope'),
);
}
Widget text14W400_979797(String text) {
return Text(
text,
@@ -311,4 +320,3 @@ Widget text14W500_black(String text) {
fontFamily: 'manrope'),
);
}

View File

@@ -0,0 +1,8 @@
import 'package:get/get.dart';
class KYCController extends GetxController {
RxString panFrontImage = "".obs;
RxString panBackImage = "".obs;
RxString aadharFrontImage = "".obs;
RxString aadharBackImage = "".obs;
}

View File

@@ -97,7 +97,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
fontFamily: 'manrope',
),
debugShowCheckedModeBanner: false,
initialRoute: RouteName.mainscreen,
initialRoute: RouteName.splashScreen,
getPages: AppRoutes.appRoutes(),
),
designSize: const Size(390, 844),

View File

@@ -31,6 +31,7 @@ class RouteName {
//kyc
static const String kyc = '/kyc';
static const String kycImage = "/kycImage";
//update risk profile
static const String updateriskprofile = '/updateriskprofile';

View File

@@ -27,6 +27,8 @@ import 'package:traderscircuit/view/secureAccess.dart/Fingerprint.dart';
import 'package:traderscircuit/view/secureAccess.dart/Pin.dart';
import 'package:traderscircuit/view/secureAccess.dart/SecureAccess.dart';
import '../../view/login/uploadKycImage.dart';
class AppRoutes {
static appRoutes() => [
GetPage(
@@ -114,6 +116,10 @@ class AppRoutes {
name: RouteName.kyc,
page: () => const Kyc(),
),
GetPage(
name: RouteName.kycImage,
page: () => const UploadKYCImage(),
),
//update risk profile
GetPage(
@@ -130,7 +136,7 @@ class AppRoutes {
name: RouteName.privacypolicy,
page: () => const PrivacyPolicy(),
),
GetPage(
GetPage(
name: RouteName.aboutus,
page: () => const AboutUs(),
),

View File

@@ -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,
),
],
),
),
),
],
),
],
],
),
],
),
),
);
}

View File

@@ -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,

View File

@@ -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",
],
};

View 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')
],
),
),
),
],
),
),
],
)
],
),
),
),
);
}
}

View File

@@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.17.2"
connectivity_plus:
dependency: "direct main"
description:
@@ -65,6 +65,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.4"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5"
url: "https://pub.dev"
source: hosted
version: "0.3.3+7"
cupertino_icons:
dependency: "direct main"
description:
@@ -81,6 +89,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.10"
dotted_border:
dependency: "direct main"
description:
name: dotted_border
sha256: "108837e11848ca776c53b30bc870086f84b62ed6e01c503ed976e8f8c7df9c04"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
dropdown_button2:
dependency: "direct main"
description:
@@ -113,6 +129,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "7.0.0"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492"
url: "https://pub.dev"
source: hosted
version: "0.9.2+1"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6
url: "https://pub.dev"
source: hosted
version: "0.9.3+3"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
url: "https://pub.dev"
source: hosted
version: "2.6.2"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0
url: "https://pub.dev"
source: hosted
version: "0.9.3+1"
flutter:
dependency: "direct main"
description: flutter
@@ -126,6 +174,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.3"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
url: "https://pub.dev"
source: hosted
version: "2.0.17"
flutter_screenutil:
dependency: "direct main"
description:
@@ -138,10 +194,10 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
url: "https://pub.dev"
source: hosted
version: "2.0.10+1"
version: "2.0.9"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -160,6 +216,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "8.2.4"
gap:
dependency: "direct main"
description:
name: gap
sha256: f19387d4e32f849394758b91377f9153a1b41d79513ef7668c088c77dbc6955d
url: "https://pub.dev"
source: hosted
version: "3.0.1"
get:
dependency: "direct main"
description:
@@ -180,10 +244,10 @@ packages:
dependency: transitive
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "0.13.6"
http_parser:
dependency: transitive
description:
@@ -192,6 +256,94 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image_cropper:
dependency: "direct main"
description:
name: image_cropper
sha256: "542c3453109d16bcc388e43ae2276044d2cd6a6d20c68bdcff2c94ab9363ea15"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
image_cropper_for_web:
dependency: transitive
description:
name: image_cropper_for_web
sha256: "89c936aa772a35b69ca67b78049ae9fa163a4fb8da2f6dee3893db8883fb49d2"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
image_cropper_platform_interface:
dependency: transitive
description:
name: image_cropper_platform_interface
sha256: b232175c132b2f7ede3e1f101652bcd635cb4079a77c6dded8e6d32e6578d685
url: "https://pub.dev"
source: hosted
version: "4.0.0"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "26222b01a0c9a2c8fe02fc90b8208bd3325da5ed1f4a2acabf75939031ac0bdd"
url: "https://pub.dev"
source: hosted
version: "1.0.7"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: "39f2bfe497e495450c81abcd44b62f56c2a36a37a175da7d137b4454977b51b1"
url: "https://pub.dev"
source: hosted
version: "0.8.9+3"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3
url: "https://pub.dev"
source: hosted
version: "3.0.2"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3
url: "https://pub.dev"
source: hosted
version: "0.8.9+1"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b
url: "https://pub.dev"
source: hosted
version: "2.9.3"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
js:
dependency: transitive
description:
@@ -204,10 +356,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.1.1"
matcher:
dependency: transitive
description:
@@ -228,10 +380,18 @@ packages:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.9.1"
mime:
dependency: transitive
description:
name: mime
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
url: "https://pub.dev"
source: hosted
version: "1.0.4"
nm:
dependency: transitive
description:
@@ -248,6 +408,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.3"
path_drawing:
dependency: transitive
description:
name: path_drawing
sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_parsing:
dependency: transitive
description:
@@ -284,10 +452,10 @@ packages:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
url: "https://pub.dev"
source: hosted
version: "6.0.2"
version: "5.4.0"
pin_code_fields:
dependency: "direct main"
description:
@@ -356,10 +524,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_web
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.1"
shared_preferences_windows:
dependency: transitive
description:
@@ -385,18 +553,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.1"
string_scanner:
dependency: transitive
description:
@@ -417,10 +585,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.6.0"
typed_data:
dependency: transitive
description:
@@ -433,26 +601,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
version: "1.1.10+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
version: "1.1.10+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
version: "1.1.10+1"
vector_math:
dependency: transitive
description:
@@ -465,18 +633,18 @@ packages:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "0.1.4-beta"
win32:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.1.1"
xdg_directories:
dependency: transitive
description:
@@ -489,10 +657,10 @@ packages:
dependency: transitive
description:
name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
url: "https://pub.dev"
source: hosted
version: "6.5.0"
version: "6.3.0"
sdks:
dart: ">=3.2.0 <4.0.0"
flutter: ">=3.16.0"
dart: ">=3.1.0 <4.0.0"
flutter: ">=3.13.0"

View File

@@ -1,38 +1,17 @@
name: traderscircuit
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
publish_to: "none"
version: 1.0.0+1
environment:
sdk: ">=2.19.6 <3.0.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
get: ^4.6.5
flutter_screenutil: ^5.9.0
@@ -43,29 +22,20 @@ dependencies:
pin_code_fields: ^8.0.1
fluttertoast: ^8.0.9
dropdown_button2: ^2.1.4
gap: ^3.0.1
image_picker: ^1.0.7
dotted_border: ^2.1.0
image_cropper: ^4.0.1
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/images/svg/
@@ -73,29 +43,7 @@ flutter:
- assets/images/png/sidemenu/
- assets/images/png/
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: manrope
fonts:
- asset: assets/fonts/manrope/Manrope-VariableFont_wght.ttf
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages