Merge branch 'main' of https://github.com/WDI-Ideas/trader-s-circuit into jayeshjain25
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.traderscircuit">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission
|
||||
android:name="android.permission.USE_BIOMETRIC"/>
|
||||
<application
|
||||
android:label="Traders Circuit"
|
||||
android:name="${applicationName}"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.example.traderscircuit
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
class MainActivity: FlutterFragmentActivity() {
|
||||
// ...
|
||||
}
|
||||
|
||||
185
ios/Podfile.lock
185
ios/Podfile.lock
@@ -1,35 +1,220 @@
|
||||
PODS:
|
||||
- BranchSDK (3.3.0)
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- ReachabilitySwift
|
||||
- DKImagePickerController/Core (4.3.4):
|
||||
- DKImagePickerController/ImageDataManager
|
||||
- DKImagePickerController/Resource
|
||||
- DKImagePickerController/ImageDataManager (4.3.4)
|
||||
- DKImagePickerController/PhotoGallery (4.3.4):
|
||||
- DKImagePickerController/Core
|
||||
- DKPhotoGallery
|
||||
- DKImagePickerController/Resource (4.3.4)
|
||||
- DKPhotoGallery (0.0.17):
|
||||
- DKPhotoGallery/Core (= 0.0.17)
|
||||
- DKPhotoGallery/Model (= 0.0.17)
|
||||
- DKPhotoGallery/Preview (= 0.0.17)
|
||||
- DKPhotoGallery/Resource (= 0.0.17)
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Core (0.0.17):
|
||||
- DKPhotoGallery/Model
|
||||
- DKPhotoGallery/Preview
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Model (0.0.17):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Preview (0.0.17):
|
||||
- DKPhotoGallery/Model
|
||||
- DKPhotoGallery/Resource
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Resource (0.0.17):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- file_picker (0.0.1):
|
||||
- DKImagePickerController/PhotoGallery
|
||||
- Flutter
|
||||
- Firebase/CoreOnly (10.18.0):
|
||||
- FirebaseCore (= 10.18.0)
|
||||
- firebase_core (2.24.2):
|
||||
- Firebase/CoreOnly (= 10.18.0)
|
||||
- Flutter
|
||||
- FirebaseCore (10.18.0):
|
||||
- FirebaseCoreInternal (~> 10.0)
|
||||
- GoogleUtilities/Environment (~> 7.12)
|
||||
- GoogleUtilities/Logger (~> 7.12)
|
||||
- FirebaseCoreInternal (10.23.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||
- Flutter (1.0.0)
|
||||
- flutter_branch_sdk (7.1.0):
|
||||
- BranchSDK (~> 3.3.0)
|
||||
- Flutter
|
||||
- flutter_isolate (0.0.1):
|
||||
- Flutter
|
||||
- fluttertoast (0.0.2):
|
||||
- Flutter
|
||||
- Toast
|
||||
- GoogleUtilities/Environment (7.13.0):
|
||||
- GoogleUtilities/Privacy
|
||||
- PromisesObjC (< 3.0, >= 1.2)
|
||||
- GoogleUtilities/Logger (7.13.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Privacy
|
||||
- "GoogleUtilities/NSData+zlib (7.13.0)":
|
||||
- GoogleUtilities/Privacy
|
||||
- GoogleUtilities/Privacy (7.13.0)
|
||||
- image_cropper (0.0.4):
|
||||
- Flutter
|
||||
- TOCropViewController (~> 2.6.1)
|
||||
- image_picker_ios (0.0.1):
|
||||
- Flutter
|
||||
- local_auth_darwin (0.0.1):
|
||||
- Flutter
|
||||
- onesignal_flutter (3.5.3):
|
||||
- Flutter
|
||||
- OneSignalXCFramework (= 3.12.9)
|
||||
- OneSignalXCFramework (3.12.9):
|
||||
- OneSignalXCFramework/OneSignalCore (= 3.12.9)
|
||||
- OneSignalXCFramework/OneSignalExtension (= 3.12.9)
|
||||
- OneSignalXCFramework/OneSignalOutcomes (= 3.12.9)
|
||||
- OneSignalXCFramework/OneSignalCore (3.12.9)
|
||||
- OneSignalXCFramework/OneSignalExtension (3.12.9):
|
||||
- OneSignalXCFramework/OneSignalCore
|
||||
- OneSignalXCFramework/OneSignalOutcomes
|
||||
- OneSignalXCFramework/OneSignalOutcomes (3.12.9):
|
||||
- OneSignalXCFramework/OneSignalCore
|
||||
- path_provider_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- PromisesObjC (2.4.0)
|
||||
- ReachabilitySwift (5.0.0)
|
||||
- SDWebImage (5.19.1):
|
||||
- SDWebImage/Core (= 5.19.1)
|
||||
- SDWebImage/Core (5.19.1)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite (0.0.3):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- SwiftyGif (5.4.5)
|
||||
- Toast (4.1.0)
|
||||
- TOCropViewController (2.6.1)
|
||||
- video_player_avfoundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- wakelock (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_branch_sdk (from `.symlinks/plugins/flutter_branch_sdk/ios`)
|
||||
- flutter_isolate (from `.symlinks/plugins/flutter_isolate/ios`)
|
||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
|
||||
- onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
|
||||
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
|
||||
- wakelock (from `.symlinks/plugins/wakelock/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- BranchSDK
|
||||
- DKImagePickerController
|
||||
- DKPhotoGallery
|
||||
- Firebase
|
||||
- FirebaseCore
|
||||
- FirebaseCoreInternal
|
||||
- GoogleUtilities
|
||||
- OneSignalXCFramework
|
||||
- PromisesObjC
|
||||
- ReachabilitySwift
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- Toast
|
||||
- TOCropViewController
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
file_picker:
|
||||
:path: ".symlinks/plugins/file_picker/ios"
|
||||
firebase_core:
|
||||
:path: ".symlinks/plugins/firebase_core/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_branch_sdk:
|
||||
:path: ".symlinks/plugins/flutter_branch_sdk/ios"
|
||||
flutter_isolate:
|
||||
:path: ".symlinks/plugins/flutter_isolate/ios"
|
||||
fluttertoast:
|
||||
:path: ".symlinks/plugins/fluttertoast/ios"
|
||||
image_cropper:
|
||||
:path: ".symlinks/plugins/image_cropper/ios"
|
||||
image_picker_ios:
|
||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||
local_auth_darwin:
|
||||
:path: ".symlinks/plugins/local_auth_darwin/darwin"
|
||||
onesignal_flutter:
|
||||
:path: ".symlinks/plugins/onesignal_flutter/ios"
|
||||
path_provider_foundation:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
share_plus:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sqflite:
|
||||
:path: ".symlinks/plugins/sqflite/darwin"
|
||||
video_player_avfoundation:
|
||||
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
||||
wakelock:
|
||||
:path: ".symlinks/plugins/wakelock/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
BranchSDK: 262dbab56b767807f49f45191c8499cd9c4b4d76
|
||||
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||
Firebase: 414ad272f8d02dfbf12662a9d43f4bba9bec2a06
|
||||
firebase_core: 0af4a2b24f62071f9bf283691c0ee41556dcb3f5
|
||||
FirebaseCore: 2322423314d92f946219c8791674d2f3345b598f
|
||||
FirebaseCoreInternal: 6a292e6f0bece1243a737e81556e56e5e19282e3
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_branch_sdk: 1ca1798cfb9ff9acf11028dee0592e3fa0234649
|
||||
flutter_isolate: 0edf5081826d071adf21759d1eb10ff5c24503b5
|
||||
fluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265
|
||||
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
|
||||
image_cropper: a3291c624a953049bc6a02e1f8c8ceb162a24b25
|
||||
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
||||
local_auth_darwin: c7e464000a6a89e952235699e32b329457608d98
|
||||
onesignal_flutter: c56e81f5a422b0b1e06820338f299333ca85c171
|
||||
OneSignalXCFramework: 3c3ef25ecca5eae1bf80a3272c49fd1dbab96b35
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
||||
SDWebImage: 40b0b4053e36c660a764958bff99eed16610acbb
|
||||
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
Toast: ec33c32b8688982cecc6348adeae667c1b9938da
|
||||
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
|
||||
video_player_avfoundation: e9e6f9cae7d7a6d9b43519b0aab382bca60fcfd1
|
||||
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
|
||||
|
||||
PODFILE CHECKSUM: 87eb8569d101acc3edb071281a9b070909b01eb4
|
||||
|
||||
|
||||
@@ -121,7 +121,6 @@
|
||||
92E17F8AAD32B5210B15E16E /* Pods-Runner.release.xcconfig */,
|
||||
2BC458090944EAB20D4B99D4 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -359,6 +358,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = QU2GSU93B4;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
@@ -487,6 +487,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = QU2GSU93B4;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
@@ -509,6 +510,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = QU2GSU93B4;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string>Why is my app authenticating using face id?</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
|
||||
@@ -15,6 +15,9 @@ class ApiUrls {
|
||||
//add details
|
||||
static String AddDetails = "${base}userDetails";
|
||||
|
||||
//add kyc
|
||||
static String AddKyc = "${base}addUserKYC";
|
||||
|
||||
// About API
|
||||
static String aboutUsApi = "${base}aboutUs";
|
||||
|
||||
|
||||
@@ -94,21 +94,6 @@ class _AddDetailsState extends State<AddDetails> {
|
||||
if (resp.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
Get.toNamed(RouteName.kyc);
|
||||
// SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// await prefs.setString('accessToken', resp.data["data"]["access-token"]);
|
||||
// await prefs.setString('productType',
|
||||
// resp.data["data"]["nature_of_business_id"].toString());
|
||||
// naturebusiness =
|
||||
// resp.data["data"]["nature_of_business_id"].toString();
|
||||
|
||||
// ProfileApi().GetProfileApi().then(
|
||||
// (value) {
|
||||
|
||||
// Get.toNamed(RouteName.mainscreen);
|
||||
// },
|
||||
// );
|
||||
|
||||
// Get.to(() => CustomBottomBar(pageIndex: 0));
|
||||
} else if (resp.status == ResponseStatus.PRIVATE) {
|
||||
Get.back();
|
||||
String? message = resp.data['message'];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,13 +68,16 @@ class _VerifyOTPState extends State<VerifyOTP> {
|
||||
// ProfileApi().GetProfileApi().then(
|
||||
// (value) {
|
||||
|
||||
isProfileUpdated == 0
|
||||
? Get.toNamed(RouteName.adddetails)
|
||||
: isKycUpdated == 0
|
||||
? Get.toNamed(RouteName.kyc)
|
||||
: isriskProfileUpdated == 0
|
||||
? Get.toNamed(RouteName.updateriskprofile)
|
||||
: Get.toNamed(RouteName.mainscreen);
|
||||
Get.toNamed(RouteName.secureaccess);
|
||||
|
||||
// // isProfileUpdated == 0
|
||||
// // ? Get.toNamed(RouteName.adddetails)
|
||||
// // : isKycUpdated == 0
|
||||
// // ? Get.toNamed(RouteName.kyc)
|
||||
// // : isriskProfileUpdated == 0
|
||||
// // ? Get.toNamed(RouteName.updateriskprofile)
|
||||
// // : Get.toNamed(RouteName.mainscreen);
|
||||
|
||||
// Get.toNamed(RouteName.mainscreen);
|
||||
// },
|
||||
// );
|
||||
|
||||
@@ -4,8 +4,10 @@ import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/Utils/utils.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 Faceid extends StatefulWidget {
|
||||
const Faceid({super.key});
|
||||
@@ -55,8 +57,14 @@ class _FaceidState extends State<Faceid> {
|
||||
),
|
||||
CommonBtn(
|
||||
text: "Setup",
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.adddetails);
|
||||
onTap: () async {
|
||||
bool result = await LocalAuth.authenticate();
|
||||
// Get.toNamed(RouteName.adddetails);
|
||||
if (result) {
|
||||
Get.toNamed(RouteName.adddetails);
|
||||
} else {
|
||||
Utils.showToast("msg");
|
||||
}
|
||||
},
|
||||
)
|
||||
],
|
||||
|
||||
@@ -6,6 +6,7 @@ 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:local_auth/local_auth.dart';
|
||||
|
||||
class Fingerprint extends StatefulWidget {
|
||||
const Fingerprint({super.key});
|
||||
@@ -17,6 +18,40 @@ class Fingerprint extends StatefulWidget {
|
||||
class _FingerprintState extends State<Fingerprint> {
|
||||
Color primaryColor = Colors.transparent.withOpacity(0.2);
|
||||
Color secondaryColor = Colors.grey.shade800;
|
||||
|
||||
bool? _hasBioSensor;
|
||||
LocalAuthentication authentication = LocalAuthentication();
|
||||
|
||||
Future<void> _checkBio() async {
|
||||
try {
|
||||
_hasBioSensor = await authentication.canCheckBiometrics;
|
||||
// print(_hasBioSensor);
|
||||
if (_hasBioSensor!) {
|
||||
_getAuth();
|
||||
}
|
||||
// ignore: empty_catches
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
Future<void> _getAuth() async {
|
||||
bool isAuth = false;
|
||||
try {
|
||||
isAuth = await authentication.authenticate(
|
||||
localizedReason: 'localizedReason',
|
||||
options: const AuthenticationOptions(
|
||||
// biometricOnly: true,
|
||||
useErrorDialogs: true,
|
||||
stickyAuth: true,
|
||||
),
|
||||
);
|
||||
if (isAuth) {
|
||||
Get.toNamed(RouteName.adddetails);
|
||||
}
|
||||
print(isAuth);
|
||||
// ignore: empty_catches
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -53,7 +88,8 @@ class _FingerprintState extends State<Fingerprint> {
|
||||
CommonBtn(
|
||||
text: "Setup",
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.adddetails);
|
||||
_checkBio();
|
||||
// Get.toNamed(RouteName.adddetails);
|
||||
},
|
||||
)
|
||||
],
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -7,6 +9,7 @@ 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});
|
||||
@@ -42,212 +45,220 @@ class _SecureAccessState extends State<SecureAccess> {
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
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",
|
||||
),
|
||||
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),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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,
|
||||
),
|
||||
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"),
|
||||
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),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: Colors.white,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
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,
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// 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,
|
||||
),
|
||||
|
||||
47
lib/view/secureAccess.dart/faceIdScreen.dart
Normal file
47
lib/view/secureAccess.dart/faceIdScreen.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
|
||||
class LocalAuth {
|
||||
static final _auth = LocalAuthentication();
|
||||
|
||||
static Future<bool> _canAthenticate() async =>
|
||||
await _auth.canCheckBiometrics || await _auth.isDeviceSupported();
|
||||
|
||||
static Future<bool> authenticate() async {
|
||||
try {
|
||||
if (!await _canAthenticate()) return false;
|
||||
return await _auth.authenticate(
|
||||
localizedReason: 'Use Fingerprint or Face Id to authenticate',
|
||||
options: const AuthenticationOptions(
|
||||
biometricOnly: true,
|
||||
useErrorDialogs: true,
|
||||
stickyAuth: true,
|
||||
),
|
||||
// authMessages: <AuthMessages>[
|
||||
// AndroidAuthMessages(
|
||||
// signInTitle: 'Oops! Biometric authentication required!',
|
||||
// cancelButton: 'No thanks',
|
||||
// ),
|
||||
// IOSAuthMessages(
|
||||
// cancelButton: 'No thanks',
|
||||
// ),
|
||||
// ],
|
||||
|
||||
);
|
||||
// final bool didAuthenticate = await _auth.authenticate(
|
||||
// localizedReason: 'Please authenticate to show account balance',
|
||||
// authMessages: const <AuthMessages>[
|
||||
// AndroidAuthMessages(
|
||||
// signInTitle: 'Oops! Biometric authentication required!',
|
||||
// cancelButton: 'No thanks',
|
||||
// ),
|
||||
// IOSAuthMessages(
|
||||
// cancelButton: 'No thanks',
|
||||
// ),
|
||||
// ]);
|
||||
} catch (e) {
|
||||
debugPrint('error $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
lib/view_model/Login/add_kyc_api.dart
Normal file
27
lib/view_model/Login/add_kyc_api.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:traderscircuit/Utils/api_urls.dart';
|
||||
import 'package:traderscircuit/Utils/base_manager.dart';
|
||||
import 'package:traderscircuit/data/network/network_api_services.dart';
|
||||
|
||||
class AddKycAPI {
|
||||
AddKycAPI(this.data);
|
||||
var data;
|
||||
Future<ResponseData<dynamic>> addkycApi() async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
// optionalpar: true,
|
||||
data,
|
||||
ApiUrls.AddKyc,
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
print("token is $response");
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
54
pubspec.lock
54
pubspec.lock
@@ -528,6 +528,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.4"
|
||||
intl:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: intl
|
||||
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.19.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -568,6 +576,46 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
local_auth:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: local_auth
|
||||
sha256: "280421b416b32de31405b0a25c3bd42dfcef2538dfbb20c03019e02a5ed55ed0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
local_auth_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_android
|
||||
sha256: "3bcd732dda7c75fcb7ddaef12e131230f53dcc8c00790d0d6efb3aa0fbbeda57"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.37"
|
||||
local_auth_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_darwin
|
||||
sha256: "33381a15b0de2279523eca694089393bb146baebdce72a404555d03174ebc1e9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
local_auth_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_platform_interface
|
||||
sha256: "1b842ff177a7068442eae093b64abe3592f816afd2a533c0ebcdbe40f9d2075a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.10"
|
||||
local_auth_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_windows
|
||||
sha256: "505ba3367ca781efb1c50d3132e44a2446bccc4163427bc203b9b4d8994d97ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.10"
|
||||
lottie:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1135,5 +1183,7 @@ packages:
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
sdks:
|
||||
dart: ">=3.1.0 <4.0.0"
|
||||
flutter: ">=3.13.0"
|
||||
|
||||
dart: ">=3.2.3 <4.0.0"
|
||||
flutter: ">=3.16.6"
|
||||
|
||||
|
||||
@@ -39,11 +39,15 @@ dependencies:
|
||||
firebase_core:
|
||||
dio: ^5.1.2
|
||||
expansion_tile_group: ^1.2.4
|
||||
|
||||
local_auth: ^2.2.0
|
||||
|
||||
scgateway_flutter_plugin: ^2.3.1
|
||||
async: ^2.4.1
|
||||
just_audio: ^0.9.37
|
||||
audio_video_progress_bar: ^2.0.2
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
Reference in New Issue
Block a user