Files
Traders_Circuit/lib/view/secureAccess.dart/SecureAccess.dart
Rajshinde046 07617c49b3 changes
2024-04-10 13:14:49 +05:30

281 lines
12 KiB
Dart

import 'dart:io';
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/commonBotton.dart';
import 'package:traderscircuit/Utils/text.dart';
import 'package:traderscircuit/resources/routes/route_name.dart';
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
import 'package:traderscircuit/view/secureAccess.dart/faceIdScreen.dart';
class SecureAccess extends StatefulWidget {
const SecureAccess({super.key});
@override
State<SecureAccess> createState() => _SecureAccessState();
}
class _SecureAccessState extends State<SecureAccess> {
TextEditingController pincode = TextEditingController();
Color primaryColor = Colors.transparent.withOpacity(0.2);
Color secondaryColor = Colors.grey.shade800;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CommonAppbar(titleTxt: "Secure your access"),
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,
children: [
SizedBox(
height: 30.h,
),
Platform.isIOS
? InkWell(
onTap: () {
// Get.to(LocalAuth());
Get.toNamed(RouteName.faceid);
},
child: GlassmorphicContainer(
width: double.infinity,
height: 80.h,
borderRadius: 8,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
]),
border: 0,
blur: 10,
borderGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff9A0000).withOpacity(0.5),
Color(0xFFffffff).withOpacity(0.5),
],
),
child: Center(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
SizedBox(
width: 10.w,
),
Image.asset(
"assets/images/png/face-id.png",
height: 40.h,
width: 40.w,
),
SizedBox(
width: 20.w,
),
text20W400(
"Face ID",
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Icon(
Icons.arrow_forward_ios,
color: Colors.white,
),
SizedBox(
width: 20.w,
),
],
)
],
),
),
),
)
: SizedBox(),
SizedBox(
height: 20.h,
),
Platform.isAndroid
? InkWell(
onTap: () {
Get.toNamed(RouteName.fingerprint);
},
child: GlassmorphicContainer(
width: double.infinity,
height: 80.h,
borderRadius: 8,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.1),
Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: [
0.1,
1,
]),
border: 0,
blur: 10,
borderGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff9A0000).withOpacity(0.5),
Color(0xFFffffff).withOpacity(0.5),
],
),
child: Center(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
SizedBox(
width: 10.w,
),
Image.asset(
"assets/images/png/fingerprint.png",
height: 40.h,
width: 40.w,
),
SizedBox(
width: 20.w,
),
text20W400("Fingerprint"),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Icon(
Icons.arrow_forward_ios,
color: Colors.white,
),
SizedBox(
width: 20.w,
)
],
)
],
),
),
),
)
: SizedBox(),
SizedBox(
height: 20.h,
),
// InkWell(
// onTap: () {
// Get.toNamed(RouteName.pin);
// },
// child: GlassmorphicContainer(
// width: double.infinity,
// height: 80.h,
// borderRadius: 8,
// linearGradient: LinearGradient(
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// colors: [
// Colors.white.withOpacity(0.1),
// Color(0xFFFFFFFF).withOpacity(0.05),
// ],
// stops: [
// 0.1,
// 1,
// ]),
// border: 0,
// blur: 10,
// borderGradient: LinearGradient(
// begin: Alignment.topLeft,
// end: Alignment.bottomRight,
// colors: [
// Color(0xff9A0000).withOpacity(0.5),
// Color(0xFFffffff).withOpacity(0.5),
// ],
// ),
// child: Center(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// SizedBox(
// width: 10.w,
// ),
// Image.asset(
// "assets/images/png/pin.png",
// height: 40.h,
// width: 40.w,
// ),
// SizedBox(
// width: 20.w,
// ),
// text20W400("4 Digit Pin"),
// ],
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Icon(
// Icons.arrow_forward_ios,
// color: Colors.white,
// ),
// SizedBox(
// width: 20.w,
// )
// ],
// ),
// ],
// ),
// ),
// ),
// ),
SizedBox(
height: 250.h,
),
CommonBtn(
text: "Setup Later",
onTap: () {
Get.toNamed(RouteName.adddetails);
},
)
],
),
),
],
),
],
),
);
}
}