Compare commits
14 Commits
verifygoog
...
getuserlog
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df11515d6b | ||
|
|
3e8b1ee1de | ||
|
|
0fc8831d23 | ||
|
|
43a58f0d20 | ||
|
|
4d0e030cce | ||
|
|
6fbe45f2c0 | ||
|
|
88441af32b | ||
|
|
96b9ec224b | ||
|
|
5708d1e6e7 | ||
|
|
4d16f572cb | ||
|
|
7565b44143 | ||
|
|
aca96431b7 | ||
|
|
289c368a5a | ||
|
|
06f53f58e0 |
@@ -22,6 +22,9 @@ if (flutterVersionName == null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
// END: FlutterFire Configuration
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
|
|||||||
29
android/app/google-services.json
Normal file
29
android/app/google-services.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "563133114654",
|
||||||
|
"project_id": "regroup-9aed2",
|
||||||
|
"storage_bucket": "regroup-9aed2.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:563133114654:android:9032ddcb6dc5add26c010f",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.regroup"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyA7z_Q3xN1IHZFzhfOtkXTyryGEJMOZrPY"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -6,6 +6,9 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
classpath 'com.google.gms:google-services:4.3.15'
|
||||||
|
// END: FlutterFire Configuration
|
||||||
classpath 'com.android.tools.build:gradle:7.2.0'
|
classpath 'com.android.tools.build:gradle:7.2.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
|
|||||||
1
firebase.json
Normal file
1
firebase.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"flutter":{"platforms":{"android":{"default":{"projectId":"regroup-9aed2","appId":"1:563133114654:android:9032ddcb6dc5add26c010f","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"regroup-9aed2","appId":"1:563133114654:ios:d5ce57e5b214757e6c010f","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"regroup-9aed2","configurations":{"android":"1:563133114654:android:9032ddcb6dc5add26c010f","ios":"1:563133114654:ios:d5ce57e5b214757e6c010f"}}}}}}
|
||||||
116
ios/Podfile.lock
116
ios/Podfile.lock
@@ -1,4 +1,10 @@
|
|||||||
PODS:
|
PODS:
|
||||||
|
- AppAuth (1.7.5):
|
||||||
|
- AppAuth/Core (= 1.7.5)
|
||||||
|
- AppAuth/ExternalUserAgent (= 1.7.5)
|
||||||
|
- AppAuth/Core (1.7.5)
|
||||||
|
- AppAuth/ExternalUserAgent (1.7.5):
|
||||||
|
- AppAuth/Core
|
||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
@@ -46,6 +52,32 @@ PODS:
|
|||||||
- file_picker (0.0.1):
|
- file_picker (0.0.1):
|
||||||
- DKImagePickerController/PhotoGallery
|
- DKImagePickerController/PhotoGallery
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- Firebase/Auth (10.25.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAuth (~> 10.25.0)
|
||||||
|
- Firebase/CoreOnly (10.25.0):
|
||||||
|
- FirebaseCore (= 10.25.0)
|
||||||
|
- firebase_auth (4.20.0):
|
||||||
|
- Firebase/Auth (= 10.25.0)
|
||||||
|
- firebase_core
|
||||||
|
- Flutter
|
||||||
|
- firebase_core (2.32.0):
|
||||||
|
- Firebase/CoreOnly (= 10.25.0)
|
||||||
|
- Flutter
|
||||||
|
- FirebaseAppCheckInterop (10.28.0)
|
||||||
|
- FirebaseAuth (10.25.0):
|
||||||
|
- FirebaseAppCheckInterop (~> 10.17)
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
|
||||||
|
- RecaptchaInterop (~> 100.0)
|
||||||
|
- FirebaseCore (10.25.0):
|
||||||
|
- FirebaseCoreInternal (~> 10.0)
|
||||||
|
- GoogleUtilities/Environment (~> 7.12)
|
||||||
|
- GoogleUtilities/Logger (~> 7.12)
|
||||||
|
- FirebaseCoreInternal (10.28.0):
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- flutter_facebook_auth (6.0.4):
|
- flutter_facebook_auth (6.0.4):
|
||||||
- FBSDKLoginKit (~> 16.3.1)
|
- FBSDKLoginKit (~> 16.3.1)
|
||||||
@@ -58,11 +90,51 @@ PODS:
|
|||||||
- google_maps_flutter_ios (0.0.1):
|
- google_maps_flutter_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- GoogleMaps (< 9.0)
|
- GoogleMaps (< 9.0)
|
||||||
|
- google_sign_in_ios (0.0.1):
|
||||||
|
- AppAuth (>= 1.7.4)
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- GoogleSignIn (~> 7.1)
|
||||||
|
- GTMSessionFetcher (>= 3.4.0)
|
||||||
- GoogleMaps (6.2.1):
|
- GoogleMaps (6.2.1):
|
||||||
- GoogleMaps/Maps (= 6.2.1)
|
- GoogleMaps/Maps (= 6.2.1)
|
||||||
- GoogleMaps/Base (6.2.1)
|
- GoogleMaps/Base (6.2.1)
|
||||||
- GoogleMaps/Maps (6.2.1):
|
- GoogleMaps/Maps (6.2.1):
|
||||||
- GoogleMaps/Base
|
- GoogleMaps/Base
|
||||||
|
- GoogleSignIn (7.1.0):
|
||||||
|
- AppAuth (< 2.0, >= 1.7.3)
|
||||||
|
- GTMAppAuth (< 5.0, >= 4.1.1)
|
||||||
|
- GTMSessionFetcher/Core (~> 3.3)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (7.13.3):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Network
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Environment (7.13.3):
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- PromisesObjC (< 3.0, >= 1.2)
|
||||||
|
- GoogleUtilities/Logger (7.13.3):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Network (7.13.3):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- "GoogleUtilities/NSData+zlib"
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Reachability
|
||||||
|
- "GoogleUtilities/NSData+zlib (7.13.3)":
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Privacy (7.13.3)
|
||||||
|
- GoogleUtilities/Reachability (7.13.3):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GTMAppAuth (4.1.1):
|
||||||
|
- AppAuth/Core (~> 1.7)
|
||||||
|
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
|
||||||
|
- GTMSessionFetcher (3.4.1):
|
||||||
|
- GTMSessionFetcher/Full (= 3.4.1)
|
||||||
|
- GTMSessionFetcher/Core (3.4.1)
|
||||||
|
- GTMSessionFetcher/Full (3.4.1):
|
||||||
|
- GTMSessionFetcher/Core
|
||||||
- image_cropper (0.0.4):
|
- image_cropper (0.0.4):
|
||||||
- Flutter
|
- Flutter
|
||||||
- TOCropViewController (~> 2.7.3)
|
- TOCropViewController (~> 2.7.3)
|
||||||
@@ -75,12 +147,16 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- permission_handler_apple (9.3.0):
|
- permission_handler_apple (9.3.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- PromisesObjC (2.4.0)
|
||||||
|
- RecaptchaInterop (100.0.0)
|
||||||
- SDWebImage (5.19.2):
|
- SDWebImage (5.19.2):
|
||||||
- SDWebImage/Core (= 5.19.2)
|
- SDWebImage/Core (= 5.19.2)
|
||||||
- SDWebImage/Core (5.19.2)
|
- SDWebImage/Core (5.19.2)
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- sign_in_with_apple (0.0.1):
|
||||||
|
- Flutter
|
||||||
- SwiftyGif (5.4.5)
|
- SwiftyGif (5.4.5)
|
||||||
- Toast (4.1.1)
|
- Toast (4.1.1)
|
||||||
- TOCropViewController (2.7.4)
|
- TOCropViewController (2.7.4)
|
||||||
@@ -89,27 +165,43 @@ DEPENDENCIES:
|
|||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||||
|
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
||||||
|
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`)
|
- flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`)
|
||||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||||
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
||||||
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
||||||
|
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`)
|
||||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
||||||
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
|
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
|
||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
|
- AppAuth
|
||||||
- DKImagePickerController
|
- DKImagePickerController
|
||||||
- DKPhotoGallery
|
- DKPhotoGallery
|
||||||
- FBAEMKit
|
- FBAEMKit
|
||||||
- FBSDKCoreKit
|
- FBSDKCoreKit
|
||||||
- FBSDKCoreKit_Basics
|
- FBSDKCoreKit_Basics
|
||||||
- FBSDKLoginKit
|
- FBSDKLoginKit
|
||||||
|
- Firebase
|
||||||
|
- FirebaseAppCheckInterop
|
||||||
|
- FirebaseAuth
|
||||||
|
- FirebaseCore
|
||||||
|
- FirebaseCoreInternal
|
||||||
- GoogleMaps
|
- GoogleMaps
|
||||||
|
- GoogleSignIn
|
||||||
|
- GoogleUtilities
|
||||||
|
- GTMAppAuth
|
||||||
|
- GTMSessionFetcher
|
||||||
|
- PromisesObjC
|
||||||
|
- RecaptchaInterop
|
||||||
- SDWebImage
|
- SDWebImage
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
- Toast
|
- Toast
|
||||||
@@ -122,6 +214,10 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||||
file_picker:
|
file_picker:
|
||||||
:path: ".symlinks/plugins/file_picker/ios"
|
:path: ".symlinks/plugins/file_picker/ios"
|
||||||
|
firebase_auth:
|
||||||
|
:path: ".symlinks/plugins/firebase_auth/ios"
|
||||||
|
firebase_core:
|
||||||
|
:path: ".symlinks/plugins/firebase_core/ios"
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: Flutter
|
:path: Flutter
|
||||||
flutter_facebook_auth:
|
flutter_facebook_auth:
|
||||||
@@ -132,6 +228,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/geolocator_apple/ios"
|
:path: ".symlinks/plugins/geolocator_apple/ios"
|
||||||
google_maps_flutter_ios:
|
google_maps_flutter_ios:
|
||||||
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
||||||
|
google_sign_in_ios:
|
||||||
|
:path: ".symlinks/plugins/google_sign_in_ios/darwin"
|
||||||
image_cropper:
|
image_cropper:
|
||||||
:path: ".symlinks/plugins/image_cropper/ios"
|
:path: ".symlinks/plugins/image_cropper/ios"
|
||||||
image_gallery_saver:
|
image_gallery_saver:
|
||||||
@@ -144,8 +242,11 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||||
|
sign_in_with_apple:
|
||||||
|
:path: ".symlinks/plugins/sign_in_with_apple/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
|
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
|
||||||
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
|
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
|
||||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||||
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
||||||
@@ -155,19 +256,34 @@ SPEC CHECKSUMS:
|
|||||||
FBSDKCoreKit_Basics: cd7b5f5d1e8868c26706917919d058999ca672c3
|
FBSDKCoreKit_Basics: cd7b5f5d1e8868c26706917919d058999ca672c3
|
||||||
FBSDKLoginKit: 572cca0bc6c90067ef197187697cb3b584310c52
|
FBSDKLoginKit: 572cca0bc6c90067ef197187697cb3b584310c52
|
||||||
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
||||||
|
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
||||||
|
firebase_auth: 5719ddc9f654b813405899480e84971bd8e61235
|
||||||
|
firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197
|
||||||
|
FirebaseAppCheckInterop: 5315f40293191bfec04b2cfab0215760e441540a
|
||||||
|
FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb
|
||||||
|
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
||||||
|
FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698
|
||||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
flutter_facebook_auth: c8700ab1770f3d8e5e7456220e4f3bbcdb831454
|
flutter_facebook_auth: c8700ab1770f3d8e5e7456220e4f3bbcdb831454
|
||||||
fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db
|
fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db
|
||||||
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
|
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
|
||||||
google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458
|
google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458
|
||||||
|
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
|
||||||
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
||||||
|
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
|
||||||
|
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||||
|
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
|
||||||
|
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
|
||||||
image_cropper: 2c150b3d63f4feaad31054d20381ddac0a460e63
|
image_cropper: 2c150b3d63f4feaad31054d20381ddac0a460e63
|
||||||
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
||||||
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
||||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
|
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
|
||||||
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
|
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
|
||||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||||
|
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
|
||||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||||
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
||||||
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
|
9FD3FE5A0194B5B2D8202DCF /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
3E093EFD052120EBB5EFE242 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
3E093EFD052120EBB5EFE242 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
5210D9302C4006FC0040021E /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
@@ -46,6 +48,7 @@
|
|||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
DC7FC30109CCD5376F6BFA0F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
DC7FC30109CCD5376F6BFA0F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
@@ -90,6 +93,7 @@
|
|||||||
97C146EF1CF9000F007C117D /* Products */,
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
01448FBCAC46C16EC8BC1181 /* Pods */,
|
01448FBCAC46C16EC8BC1181 /* Pods */,
|
||||||
DE8E73CF7AB07643531FB23E /* Frameworks */,
|
DE8E73CF7AB07643531FB23E /* Frameworks */,
|
||||||
|
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@@ -104,6 +108,7 @@
|
|||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
5210D9302C4006FC0040021E /* Runner.entitlements */,
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
@@ -192,6 +197,7 @@
|
|||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
|
9FD3FE5A0194B5B2D8202DCF /* GoogleService-Info.plist in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -375,6 +381,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 8;
|
CURRENT_PROJECT_VERSION = 8;
|
||||||
DEVELOPMENT_TEAM = A89AY6VY4F;
|
DEVELOPMENT_TEAM = A89AY6VY4F;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
@@ -508,6 +515,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 8;
|
CURRENT_PROJECT_VERSION = 8;
|
||||||
DEVELOPMENT_TEAM = A89AY6VY4F;
|
DEVELOPMENT_TEAM = A89AY6VY4F;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
@@ -535,6 +543,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 8;
|
CURRENT_PROJECT_VERSION = 8;
|
||||||
DEVELOPMENT_TEAM = A89AY6VY4F;
|
DEVELOPMENT_TEAM = A89AY6VY4F;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
|||||||
30
ios/Runner/GoogleService-Info.plist
Normal file
30
ios/Runner/GoogleService-Info.plist
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-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>API_KEY</key>
|
||||||
|
<string>AIzaSyCvettUZf1thSh9xO5-SxR_IYx-tCmVnc0</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>563133114654</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>com.regroup.wdi</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>regroup-9aed2</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>regroup-9aed2.appspot.com</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:563133114654:ios:d5ce57e5b214757e6c010f</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -4,5 +4,9 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>aps-environment</key>
|
<key>aps-environment</key>
|
||||||
<string>development</string>
|
<string>development</string>
|
||||||
|
<key>com.apple.developer.applesignin</key>
|
||||||
|
<array>
|
||||||
|
<string>Default</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
class ApiUrls {
|
class ApiUrls {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static const baseUrl = "https://regroup.betadelivery.com/api/v1/";
|
static const baseUrl = "https://regroup.betadelivery.com/api/v1/";
|
||||||
|
|
||||||
static const getlogin = "${baseUrl}login";
|
static const getlogin = "${baseUrl}login";
|
||||||
|
static const forgotpassword = "${baseUrl}forgot-password";
|
||||||
|
static const verifyotp = "${baseUrl}verify-otp";
|
||||||
|
static const tellUsBusinessApi = "${baseUrl}tell-us-about-your-business";
|
||||||
|
static const letUsUnderstandApi = "${baseUrl}update-business-profile-step-1";
|
||||||
|
static const resetpassword = "${baseUrl}reset-password";
|
||||||
|
|
||||||
static const registeration = "${baseUrl}send_otp";
|
static const registeration = "${baseUrl}send_otp";
|
||||||
|
|
||||||
@@ -26,10 +26,10 @@ class ApiUrls {
|
|||||||
|
|
||||||
static const postcommunities = "${baseUrl}select-communities";
|
static const postcommunities = "${baseUrl}select-communities";
|
||||||
|
|
||||||
|
static const googlelogin = "${baseUrl}sign-in-with-google-login";
|
||||||
|
|
||||||
|
static const storeDetailsOfOAuth = "${baseUrl}update-user-account-type";
|
||||||
|
|
||||||
|
static const getuserdetails = "${baseUrl}get-auth-user-data";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:regroup/Common/controller/MainController.dart';
|
import 'package:regroup/Common/controller/MainController.dart';
|
||||||
|
|
||||||
@@ -9,11 +10,56 @@ class MainScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
return Scaffold(
|
return WillPopScope(
|
||||||
resizeToAvoidBottomInset: false,
|
onWillPop: () async {
|
||||||
body: mainController.currentTab[mainController.selectedIndex.value],
|
_onBackButtonPressed(context);
|
||||||
|
return true; // Return true to allow the pop action
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
body: mainController.currentTab[mainController.selectedIndex.value],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> _onBackButtonPressed(BuildContext context) async {
|
||||||
|
bool? exitApp = await showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
backgroundColor: Color(0xFF222935),
|
||||||
|
title: const Text('Exit App', style: TextStyle(color: Colors.white)),
|
||||||
|
content: const Text('Do you really want to close the app?',
|
||||||
|
style: TextStyle(color: Colors.white)),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop(false);
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'No',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFD90B2E),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
SystemNavigator.pop();
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'Yes',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFD90B2E),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return exitApp ?? false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class NetworkApiServices {
|
|||||||
}
|
}
|
||||||
Response response;
|
Response response;
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
token = prefs.getString('token');
|
token = prefs.getString('access-token');
|
||||||
print("url is $url");
|
print("url is $url");
|
||||||
log(token.toString());
|
log(token.toString());
|
||||||
|
|
||||||
@@ -149,9 +149,7 @@ class NetworkApiServices {
|
|||||||
|
|
||||||
//New post api
|
//New post api
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
||||||
Future<ResponseData> postApi(data, String url,
|
Future<ResponseData> postApi(data, String url,
|
||||||
{bool optionalpar = false}) async {
|
{bool optionalpar = false}) async {
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
@@ -161,26 +159,21 @@ class NetworkApiServices {
|
|||||||
Response response;
|
Response response;
|
||||||
|
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
String? token = prefs.getString('access-token');
|
||||||
|
|
||||||
String? token = prefs.getString('token');
|
|
||||||
|
|
||||||
log(token.toString());
|
|
||||||
log(basicAuth);
|
|
||||||
try {
|
try {
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
url,
|
url,
|
||||||
data: data,
|
data: data,
|
||||||
options: optionalpar
|
options: optionalpar
|
||||||
|
// (token != null)
|
||||||
? Options(
|
? Options(
|
||||||
headers: {
|
headers: {
|
||||||
"authorization": basicAuth,
|
"authorization": basicAuth,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Options(
|
: Options(
|
||||||
headers: {
|
headers: {'authorization': basicAuth, 'access-token': token},
|
||||||
'authorization': basicAuth,
|
|
||||||
// 'access-token': token
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
log(response.toString());
|
log(response.toString());
|
||||||
@@ -203,7 +196,6 @@ class NetworkApiServices {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (e.response!.statusCode == 403) {
|
if (e.response!.statusCode == 403) {
|
||||||
|
|
||||||
if (e.response!.data['message'] is List) {
|
if (e.response!.data['message'] is List) {
|
||||||
return ResponseData<dynamic>(
|
return ResponseData<dynamic>(
|
||||||
e.response!.data['message'][0]!, ResponseStatus.FAILED,
|
e.response!.data['message'][0]!, ResponseStatus.FAILED,
|
||||||
@@ -213,7 +205,6 @@ class NetworkApiServices {
|
|||||||
e.response!.data['message'], ResponseStatus.FAILED,
|
e.response!.data['message'], ResponseStatus.FAILED,
|
||||||
data: e.response!.data);
|
data: e.response!.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ResponseData<dynamic>(
|
return ResponseData<dynamic>(
|
||||||
@@ -248,7 +239,7 @@ class NetworkApiServices {
|
|||||||
Response response;
|
Response response;
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
// ignore: unused_local_variable
|
// ignore: unused_local_variable
|
||||||
String? token = prefs.getString('token').toString();
|
String? token = prefs.getString('access-token').toString();
|
||||||
try {
|
try {
|
||||||
response = await dio.post(url,
|
response = await dio.post(url,
|
||||||
data: data,
|
data: data,
|
||||||
@@ -370,7 +361,7 @@ class NetworkApiServices {
|
|||||||
Response response;
|
Response response;
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
// String? token = prefs.getString('token');
|
// String? token = prefs.getString('token');
|
||||||
String? token = prefs.getString('token').toString();
|
String? token = prefs.getString('access-token').toString();
|
||||||
print("token is $token");
|
print("token is $token");
|
||||||
try {
|
try {
|
||||||
response = await dio.post(url,
|
response = await dio.post(url,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:async';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
String? myusername;
|
String? myusername;
|
||||||
|
String? fullname;
|
||||||
String? token;
|
String? token;
|
||||||
String? emailid;
|
String? emailid;
|
||||||
int? isprofileupdated;
|
int? isprofileupdated;
|
||||||
|
|||||||
@@ -27,19 +27,212 @@ class LoginModel {
|
|||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
String? accessToken;
|
String? accessToken;
|
||||||
int? id;
|
UserData? userData;
|
||||||
|
|
||||||
Data({this.accessToken, this.id});
|
Data({this.accessToken, this.userData});
|
||||||
|
|
||||||
Data.fromJson(Map<String, dynamic> json) {
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
accessToken = json['access-token'];
|
accessToken = json['access-token'];
|
||||||
id = json['id'];
|
userData = json['user_data'] != null
|
||||||
|
? new UserData.fromJson(json['user_data'])
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
data['access-token'] = this.accessToken;
|
data['access-token'] = this.accessToken;
|
||||||
data['id'] = this.id;
|
if (this.userData != null) {
|
||||||
|
data['user_data'] = this.userData!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserData {
|
||||||
|
int? id;
|
||||||
|
int? principalTypeXid;
|
||||||
|
int? principalSourceXid;
|
||||||
|
String? oneSignalPlayerId;
|
||||||
|
String? googleId;
|
||||||
|
String? appleId;
|
||||||
|
String? facebookId;
|
||||||
|
String? microsoftId;
|
||||||
|
String? userName;
|
||||||
|
String? pin;
|
||||||
|
String? fullName;
|
||||||
|
String? gender;
|
||||||
|
String? dateOfBirth;
|
||||||
|
String? phoneNumber;
|
||||||
|
String? otherPhoneNumber;
|
||||||
|
String? emailAddress;
|
||||||
|
String? addressLine1;
|
||||||
|
String? addressLine2;
|
||||||
|
String? cityXid;
|
||||||
|
String? stateXid;
|
||||||
|
String? countryXid;
|
||||||
|
String? postCode;
|
||||||
|
String? lastLoginDatetime;
|
||||||
|
String? profilePhoto;
|
||||||
|
String? referralCode;
|
||||||
|
String? description;
|
||||||
|
String? about;
|
||||||
|
String? position;
|
||||||
|
String? trainingScores;
|
||||||
|
String? height;
|
||||||
|
String? weight;
|
||||||
|
String? battingAverage;
|
||||||
|
int? isProfileUpdated;
|
||||||
|
String? isActive;
|
||||||
|
int? groupNotification;
|
||||||
|
int? communityNotification;
|
||||||
|
int? followerNotification;
|
||||||
|
int? newFollowerNotification;
|
||||||
|
int? directMessageNotification;
|
||||||
|
String? createdBy;
|
||||||
|
String? modifiedBy;
|
||||||
|
String? deletedAt;
|
||||||
|
String? createdAt;
|
||||||
|
String? updatedAt;
|
||||||
|
|
||||||
|
UserData(
|
||||||
|
{this.id,
|
||||||
|
this.principalTypeXid,
|
||||||
|
this.principalSourceXid,
|
||||||
|
this.oneSignalPlayerId,
|
||||||
|
this.googleId,
|
||||||
|
this.appleId,
|
||||||
|
this.facebookId,
|
||||||
|
this.microsoftId,
|
||||||
|
this.userName,
|
||||||
|
this.pin,
|
||||||
|
this.fullName,
|
||||||
|
this.gender,
|
||||||
|
this.dateOfBirth,
|
||||||
|
this.phoneNumber,
|
||||||
|
this.otherPhoneNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.addressLine1,
|
||||||
|
this.addressLine2,
|
||||||
|
this.cityXid,
|
||||||
|
this.stateXid,
|
||||||
|
this.countryXid,
|
||||||
|
this.postCode,
|
||||||
|
this.lastLoginDatetime,
|
||||||
|
this.profilePhoto,
|
||||||
|
this.referralCode,
|
||||||
|
this.description,
|
||||||
|
this.about,
|
||||||
|
this.position,
|
||||||
|
this.trainingScores,
|
||||||
|
this.height,
|
||||||
|
this.weight,
|
||||||
|
this.battingAverage,
|
||||||
|
this.isProfileUpdated,
|
||||||
|
this.isActive,
|
||||||
|
this.groupNotification,
|
||||||
|
this.communityNotification,
|
||||||
|
this.followerNotification,
|
||||||
|
this.newFollowerNotification,
|
||||||
|
this.directMessageNotification,
|
||||||
|
this.createdBy,
|
||||||
|
this.modifiedBy,
|
||||||
|
this.deletedAt,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt});
|
||||||
|
|
||||||
|
UserData.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
principalTypeXid = json['principal_type_xid'];
|
||||||
|
principalSourceXid = json['principal_source_xid'];
|
||||||
|
oneSignalPlayerId = json['one_signal_player_id'];
|
||||||
|
googleId = json['google_id'];
|
||||||
|
appleId = json['apple_id'];
|
||||||
|
facebookId = json['facebook_id'];
|
||||||
|
microsoftId = json['microsoft_id'];
|
||||||
|
userName = json['user_name'];
|
||||||
|
pin = json['pin'];
|
||||||
|
fullName = json['full_name'];
|
||||||
|
gender = json['gender'];
|
||||||
|
dateOfBirth = json['date_of_birth'];
|
||||||
|
phoneNumber = json['phone_number'];
|
||||||
|
otherPhoneNumber = json['other_phone_number'];
|
||||||
|
emailAddress = json['email_address'];
|
||||||
|
addressLine1 = json['address_line1'];
|
||||||
|
addressLine2 = json['address_line2'];
|
||||||
|
cityXid = json['city_xid'];
|
||||||
|
stateXid = json['state_xid'];
|
||||||
|
countryXid = json['country_xid'];
|
||||||
|
postCode = json['post_code'];
|
||||||
|
lastLoginDatetime = json['last_login_datetime'];
|
||||||
|
profilePhoto = json['profile_photo'];
|
||||||
|
referralCode = json['referral_code'];
|
||||||
|
description = json['description'];
|
||||||
|
about = json['about'];
|
||||||
|
position = json['position'];
|
||||||
|
trainingScores = json['training_scores'];
|
||||||
|
height = json['height'];
|
||||||
|
weight = json['weight'];
|
||||||
|
battingAverage = json['batting_average'];
|
||||||
|
isProfileUpdated = json['is_profile_updated'];
|
||||||
|
isActive = json['is_active'];
|
||||||
|
groupNotification = json['group_notification'];
|
||||||
|
communityNotification = json['community_notification'];
|
||||||
|
followerNotification = json['follower_notification'];
|
||||||
|
newFollowerNotification = json['new_follower_notification'];
|
||||||
|
directMessageNotification = json['direct_message_notification'];
|
||||||
|
createdBy = json['created_by'];
|
||||||
|
modifiedBy = json['modified_by'];
|
||||||
|
deletedAt = json['deleted_at'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
updatedAt = json['updated_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['principal_type_xid'] = this.principalTypeXid;
|
||||||
|
data['principal_source_xid'] = this.principalSourceXid;
|
||||||
|
data['one_signal_player_id'] = this.oneSignalPlayerId;
|
||||||
|
data['google_id'] = this.googleId;
|
||||||
|
data['apple_id'] = this.appleId;
|
||||||
|
data['facebook_id'] = this.facebookId;
|
||||||
|
data['microsoft_id'] = this.microsoftId;
|
||||||
|
data['user_name'] = this.userName;
|
||||||
|
data['pin'] = this.pin;
|
||||||
|
data['full_name'] = this.fullName;
|
||||||
|
data['gender'] = this.gender;
|
||||||
|
data['date_of_birth'] = this.dateOfBirth;
|
||||||
|
data['phone_number'] = this.phoneNumber;
|
||||||
|
data['other_phone_number'] = this.otherPhoneNumber;
|
||||||
|
data['email_address'] = this.emailAddress;
|
||||||
|
data['address_line1'] = this.addressLine1;
|
||||||
|
data['address_line2'] = this.addressLine2;
|
||||||
|
data['city_xid'] = this.cityXid;
|
||||||
|
data['state_xid'] = this.stateXid;
|
||||||
|
data['country_xid'] = this.countryXid;
|
||||||
|
data['post_code'] = this.postCode;
|
||||||
|
data['last_login_datetime'] = this.lastLoginDatetime;
|
||||||
|
data['profile_photo'] = this.profilePhoto;
|
||||||
|
data['referral_code'] = this.referralCode;
|
||||||
|
data['description'] = this.description;
|
||||||
|
data['about'] = this.about;
|
||||||
|
data['position'] = this.position;
|
||||||
|
data['training_scores'] = this.trainingScores;
|
||||||
|
data['height'] = this.height;
|
||||||
|
data['weight'] = this.weight;
|
||||||
|
data['batting_average'] = this.battingAverage;
|
||||||
|
data['is_profile_updated'] = this.isProfileUpdated;
|
||||||
|
data['is_active'] = this.isActive;
|
||||||
|
data['group_notification'] = this.groupNotification;
|
||||||
|
data['community_notification'] = this.communityNotification;
|
||||||
|
data['follower_notification'] = this.followerNotification;
|
||||||
|
data['new_follower_notification'] = this.newFollowerNotification;
|
||||||
|
data['direct_message_notification'] = this.directMessageNotification;
|
||||||
|
data['created_by'] = this.createdBy;
|
||||||
|
data['modified_by'] = this.modifiedBy;
|
||||||
|
data['deleted_at'] = this.deletedAt;
|
||||||
|
data['created_at'] = this.createdAt;
|
||||||
|
data['updated_at'] = this.updatedAt;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,11 +3,15 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:logger/web.dart';
|
||||||
import 'package:regroup/Common/base_manager.dart';
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
import 'package:regroup/Login/ViewModel/LoginApi.dart';
|
import 'package:regroup/Login/ViewModel/LoginApi.dart';
|
||||||
|
import 'package:regroup/Utils/Common/AppleOAuthService.dart';
|
||||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||||
|
import 'package:regroup/Utils/Common/googleOAuthService.dart';
|
||||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||||
|
import 'package:regroup/Utils/dialogs.dart';
|
||||||
import 'package:regroup/Utils/texts.dart';
|
import 'package:regroup/Utils/texts.dart';
|
||||||
import 'package:regroup/resources/routes/route_name.dart';
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||||
@@ -23,71 +27,107 @@ class LoginScreen extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LoginScreenState extends State<LoginScreen> {
|
class _LoginScreenState extends State<LoginScreen> {
|
||||||
Map<String, dynamic>? _userData;
|
String _accessToken = "";
|
||||||
AccessToken? _accessToken;
|
Map _userData = {};
|
||||||
bool _checking = true;
|
bool _checking = true;
|
||||||
final TextEditingController _emailController = TextEditingController();
|
final TextEditingController _emailController = TextEditingController();
|
||||||
RxBool isObscured = true.obs;
|
RxBool isObscured = true.obs;
|
||||||
final TextEditingController _passwordController = TextEditingController();
|
final TextEditingController _passwordController = TextEditingController();
|
||||||
// final GlobalKey<FormState> _form = GlobalKey<FormState>();
|
GoogleAuthService googleSigninController = Get.put(GoogleAuthService());
|
||||||
|
|
||||||
// RxString errormsg = ''.obs;
|
|
||||||
// RxString errormsgpass = ''.obs;
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
_checkIfisLoggedIn() async {
|
_loginWithApple() {
|
||||||
//user token
|
AppleOAuthService().logIn();
|
||||||
final accessToken = await FacebookAuth.instance.accessToken;
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
_checking = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (accessToken != null) {
|
|
||||||
print("/////////////////////////////////////////check");
|
|
||||||
print("worked");
|
|
||||||
print(accessToken.toJson());
|
|
||||||
final userData = await FacebookAuth.instance.getUserData();
|
|
||||||
_accessToken = accessToken;
|
|
||||||
setState(() {
|
|
||||||
_userData = userData;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
print("/////////////////////////////////////////check");
|
|
||||||
|
|
||||||
print("not worked");
|
|
||||||
_login();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_login() async {
|
_loginWithGoogle() {
|
||||||
final LoginResult result = await FacebookAuth.instance.login();
|
googleSigninController.handleGoogleSignIn().then((value) async {
|
||||||
|
if (value != 'Google Sign-In canceled') {
|
||||||
|
final resp = await LoginAPI().storeGoogleSignin(
|
||||||
|
{"google_access_token": value, "one_signal_player_id": "ABCD"});
|
||||||
|
if (resp.message == "go-to-signin-via-oauth") {
|
||||||
|
// Get.to(()=> );
|
||||||
|
Get.toNamed(RouteName.verifygoogleapplepage);
|
||||||
|
logger.d("go to sign in");
|
||||||
|
} else {
|
||||||
|
Get.snackbar(
|
||||||
|
"Success!",
|
||||||
|
'Login successful!',
|
||||||
|
duration: const Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
margin: const EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
|
||||||
if (result.status == LoginStatus.success) {
|
Get.toNamed(RouteName.mainscreen);
|
||||||
_accessToken = result.accessToken;
|
logger.d("go to login");
|
||||||
|
}
|
||||||
final userData = await FacebookAuth.instance.getUserData();
|
} else {
|
||||||
_userData = userData;
|
Get.snackbar(
|
||||||
} else {
|
'Error',
|
||||||
print(result.status);
|
'Google Sign-In canceled',
|
||||||
print(result.message);
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
}
|
backgroundColor: Colors.red,
|
||||||
setState(() {
|
colorText: Colors.white,
|
||||||
_checking = false;
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_logout() async {
|
// _checkIfisLoggedIn() async {
|
||||||
await FacebookAuth.instance.logOut();
|
// //user token
|
||||||
_accessToken = null;
|
// final accessToken = await FacebookAuth.instance.accessToken;
|
||||||
_userData = null;
|
|
||||||
setState(() {});
|
// setState(() {
|
||||||
}
|
// _checking = false;
|
||||||
|
// });
|
||||||
|
|
||||||
|
// if (accessToken != null) {
|
||||||
|
// print("/////////////////////////////////////////xcheck");
|
||||||
|
// print("worked");
|
||||||
|
// print(accessToken.toJson());
|
||||||
|
// final userData = await FacebookAuth.instance.getUserData();
|
||||||
|
// // _accessToken = accessToken;
|
||||||
|
// setState(() {
|
||||||
|
// _userData = userData;
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// print("/////////////////////////////////////////check");
|
||||||
|
|
||||||
|
// print("not worked");
|
||||||
|
// _login();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// _login() async {
|
||||||
|
// final LoginResult result = await FacebookAuth.instance.login();
|
||||||
|
|
||||||
|
// if (result.status == LoginStatus.success) {
|
||||||
|
// _accessToken = result.accessToken;
|
||||||
|
|
||||||
|
// final userData = await FacebookAuth.instance.getUserData();
|
||||||
|
// _userData = userData;
|
||||||
|
// } else {
|
||||||
|
// print(result.status);
|
||||||
|
// print(result.message);
|
||||||
|
// }
|
||||||
|
// setState(() {
|
||||||
|
// _checking = false;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// _logout() async {
|
||||||
|
// await FacebookAuth.instance.logOut();
|
||||||
|
// _accessToken = null;
|
||||||
|
// _userData = null;
|
||||||
|
// setState(() {});
|
||||||
|
// }
|
||||||
|
|
||||||
_logincheck() async {
|
_logincheck() async {
|
||||||
if (_emailController.text.isBlank! || _passwordController.text.isBlank!) {
|
if (_emailController.text.isBlank! || _passwordController.text.isBlank!) {
|
||||||
@@ -117,26 +157,25 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
final data = await LoginAPI().loginApi(updata);
|
final data = await LoginAPI().loginApi(updata);
|
||||||
if (data.status == ResponseStatus.SUCCESS) {
|
if (data.status == ResponseStatus.SUCCESS) {
|
||||||
// await global.setname();
|
// await global.setname();
|
||||||
Get.snackbar(
|
// Get.snackbar(
|
||||||
"Success!",
|
// "Success!",
|
||||||
'Login successful!',
|
// 'Login successful!',
|
||||||
duration: Duration(seconds: 2),
|
// duration: const Duration(seconds: 2),
|
||||||
colorText: Colors.white,
|
// colorText: Colors.white,
|
||||||
backgroundColor: Colors.green,
|
// backgroundColor: Colors.green,
|
||||||
margin: EdgeInsets.all(8),
|
// margin: const EdgeInsets.all(8),
|
||||||
snackStyle: SnackStyle.FLOATING,
|
// snackStyle: SnackStyle.FLOATING,
|
||||||
snackPosition: SnackPosition.BOTTOM,
|
// snackPosition: SnackPosition.BOTTOM,
|
||||||
);
|
// );
|
||||||
|
return utils.showToast(data.message);
|
||||||
Get.toNamed(RouteName.mainscreen);
|
|
||||||
} else if (data.status == ResponseStatus.FAILED) {
|
} else if (data.status == ResponseStatus.FAILED) {
|
||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
"Error!",
|
"Error!",
|
||||||
data.message,
|
data.message,
|
||||||
duration: Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
margin: EdgeInsets.all(8),
|
margin: const EdgeInsets.all(8),
|
||||||
snackStyle: SnackStyle.FLOATING,
|
snackStyle: SnackStyle.FLOATING,
|
||||||
snackPosition: SnackPosition.BOTTOM,
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
);
|
);
|
||||||
@@ -146,10 +185,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
"Error!",
|
"Error!",
|
||||||
data.data['message'],
|
data.data['message'],
|
||||||
duration: Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
margin: EdgeInsets.all(8),
|
margin: const EdgeInsets.all(8),
|
||||||
snackStyle: SnackStyle.FLOATING,
|
snackStyle: SnackStyle.FLOATING,
|
||||||
snackPosition: SnackPosition.BOTTOM,
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
);
|
);
|
||||||
@@ -361,7 +400,9 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(RouteName.verifygoogleapplepage);
|
_loginWithApple();
|
||||||
|
Get.toNamed(
|
||||||
|
RouteName.verifygoogleapplepage);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 55,
|
width: 55,
|
||||||
@@ -371,10 +412,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
begin: const Alignment(0.71, -0.70),
|
begin: const Alignment(0.71, -0.70),
|
||||||
end: const Alignment(-0.71, 0.7),
|
end: const Alignment(-0.71, 0.7),
|
||||||
colors: [
|
colors: [
|
||||||
Colors.white
|
Colors.white.withOpacity(
|
||||||
.withOpacity(0.07999999821186066),
|
0.07999999821186066),
|
||||||
Colors.white
|
Colors.white.withOpacity(
|
||||||
.withOpacity(0.12999999523162842)
|
0.12999999523162842)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
shape: const OvalBorder(
|
shape: const OvalBorder(
|
||||||
@@ -390,7 +431,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
const Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(RouteName.verifygoogleapplepage);
|
_loginWithGoogle();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 55,
|
width: 55,
|
||||||
@@ -400,10 +441,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
begin: const Alignment(0.71, -0.70),
|
begin: const Alignment(0.71, -0.70),
|
||||||
end: const Alignment(-0.71, 0.7),
|
end: const Alignment(-0.71, 0.7),
|
||||||
colors: [
|
colors: [
|
||||||
Colors.white
|
Colors.white.withOpacity(
|
||||||
.withOpacity(0.07999999821186066),
|
0.07999999821186066),
|
||||||
Colors.white
|
Colors.white.withOpacity(
|
||||||
.withOpacity(0.12999999523162842)
|
0.12999999523162842)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
shape: const OvalBorder(
|
shape: const OvalBorder(
|
||||||
@@ -419,8 +460,6 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
const Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
_checkIfisLoggedIn();
|
|
||||||
|
|
||||||
/* FacebookAuth.instance.login(
|
/* FacebookAuth.instance.login(
|
||||||
permissions: ['public_profile', 'email'],
|
permissions: ['public_profile', 'email'],
|
||||||
).then((value) {
|
).then((value) {
|
||||||
|
|||||||
@@ -35,20 +35,22 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: CommonAppbar(
|
appBar: const CommonAppbar(
|
||||||
titleTxt: '',
|
titleTxt: '',
|
||||||
),
|
),
|
||||||
|
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
||||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(top: 310, right: -30, child: CommonBlurRightSecond()),
|
const Positioned(
|
||||||
Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
|
top: 310, right: -30, child: CommonBlurRightSecond()),
|
||||||
|
const Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
|
||||||
GlassmorphicContainer(
|
GlassmorphicContainer(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height:
|
height:
|
||||||
@@ -62,10 +64,10 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
const Color(0XFF222935).withOpacity(0.60),
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
const Color(0XFF222935).withOpacity(0.60),
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
const Color(0XFF222935).withOpacity(0.60),
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
const Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
@@ -79,9 +81,9 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
colors: [
|
colors: [
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
const Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
const Color(0XFF222935).withOpacity(0.60),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@@ -94,7 +96,7 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
sizedBoxHeight(10.h),
|
sizedBoxHeight(10.h),
|
||||||
Container(
|
Container(
|
||||||
width: 154,
|
width: 154,
|
||||||
decoration: ShapeDecoration(
|
decoration: const ShapeDecoration(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 1,
|
width: 1,
|
||||||
@@ -152,7 +154,7 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
CustomDropDownRadio(
|
CustomDropDownRadio(
|
||||||
header: '',
|
header: '',
|
||||||
title: '',
|
title: '',
|
||||||
listData: [
|
listData: const [
|
||||||
'Individual',
|
'Individual',
|
||||||
'Business',
|
'Business',
|
||||||
],
|
],
|
||||||
@@ -161,7 +163,7 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
'assets/images/png/user.png',
|
'assets/images/png/user.png',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Spacer(
|
const Spacer(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
),
|
),
|
||||||
CustomButton(
|
CustomButton(
|
||||||
@@ -176,10 +178,7 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
|
|||||||
// Uploadata();
|
// Uploadata();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Spacer(
|
const Spacer()
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,27 +1,62 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:regroup/Common/api_urls.dart';
|
||||||
import 'package:regroup/Common/base_manager.dart';
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||||
|
import 'package:regroup/Global.dart';
|
||||||
import 'package:regroup/Login/Model/LoginModel.dart';
|
import 'package:regroup/Login/Model/LoginModel.dart';
|
||||||
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
class LoginAPI {
|
class LoginAPI {
|
||||||
LoginAPI();
|
|
||||||
Future<ResponseData> loginApi(var data) async {
|
Future<ResponseData> loginApi(var data) async {
|
||||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
final response = await NetworkApiServices().postApi(
|
final response = await NetworkApiServices()
|
||||||
data, 'https://regroup.betadelivery.com/api/v1/login',
|
.postApi(data, ApiUrls.getlogin, optionalpar: true);
|
||||||
optionalpar: true
|
|
||||||
|
|
||||||
// "auth/login/",
|
|
||||||
);
|
|
||||||
|
|
||||||
if (response.status == ResponseStatus.SUCCESS) {
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
//Map<String, dynamic> responseData = jsonDecode(response.data);
|
|
||||||
if (response.data['status'] == 'success') {
|
if (response.data['status'] == 'success') {
|
||||||
LoginModel loginObj = LoginModel.fromJson(response.data);
|
LoginModel loginObj = LoginModel.fromJson(response.data);
|
||||||
await prefs.setString('access-token', loginObj.data!.accessToken!);
|
await prefs.setString('access-token', loginObj.data!.accessToken!);
|
||||||
// await prefs.setString('refreshToken', loginObj.data!.refresh!);
|
await prefs.setString(
|
||||||
|
'fullname', loginObj.data?.userData?.fullName ?? "");
|
||||||
|
await prefs.setString(
|
||||||
|
'username', loginObj.data?.userData?.userName ?? "");
|
||||||
|
await prefs.setString(
|
||||||
|
'email', loginObj.data?.userData?.emailAddress ?? "");
|
||||||
|
await prefs.setString(
|
||||||
|
'phone', loginObj.data?.userData?.phoneNumber ?? "");
|
||||||
|
|
||||||
|
token = loginObj.data!.accessToken;
|
||||||
|
emailid = loginObj.data?.userData?.emailAddress;
|
||||||
|
myusername = loginObj.data?.userData?.userName;
|
||||||
|
fullname = loginObj.data?.userData?.fullName;
|
||||||
|
phonenumber = loginObj.data?.userData?.phoneNumber;
|
||||||
|
|
||||||
print("token is ${loginObj.data!.accessToken!}");
|
print("token is ${loginObj.data!.accessToken!}");
|
||||||
// print("refresh-token is ${loginObj.data!.refresh!}");
|
|
||||||
|
if (loginObj.data?.userData?.isProfileUpdated == 0) {
|
||||||
|
String? accountype =
|
||||||
|
loginObj.data?.userData?.principalTypeXid.toString();
|
||||||
|
|
||||||
|
if (accountype == "1") {
|
||||||
|
print('tell us individyal');
|
||||||
|
Get.toNamed(RouteName.tellusindividualscreen,
|
||||||
|
// arguments: {
|
||||||
|
// 'pageroute' : "mainscreen"
|
||||||
|
// }
|
||||||
|
);
|
||||||
|
} else if (accountype == "2") {
|
||||||
|
print('tell us business');
|
||||||
|
|
||||||
|
Get.toNamed(RouteName.tellusbusinessscreen,
|
||||||
|
// arguments: {
|
||||||
|
// 'pageroute' : "mainscreen"
|
||||||
|
// }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Get.toNamed(RouteName.mainscreen);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return ResponseData<dynamic>(
|
return ResponseData<dynamic>(
|
||||||
response.data['message'], ResponseStatus.FAILED);
|
response.data['message'], ResponseStatus.FAILED);
|
||||||
@@ -30,4 +65,31 @@ class LoginAPI {
|
|||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<ResponseData> storeGoogleSignin(var data) async {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
final response = await NetworkApiServices()
|
||||||
|
.postApi(data, ApiUrls.googlelogin, optionalpar: true);
|
||||||
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
|
await prefs.setString('access-token', response.data['data']['token']);
|
||||||
|
if (response.data['data']['is_account_type_updated'] == 3) {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
"go-to-signin-via-oauth", ResponseStatus.SUCCESS);
|
||||||
|
} else {
|
||||||
|
return ResponseData<dynamic>("go-to-login", ResponseStatus.SUCCESS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<ResponseData> storeUserDetailsWhenComingFromGoogleAppleSignin(
|
||||||
|
var data) async {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
final response = await NetworkApiServices()
|
||||||
|
.postApi(data, ApiUrls.storeDetailsOfOAuth, optionalpar: true);
|
||||||
|
if (response.status == ResponseStatus.SUCCESS) {}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
22
lib/Utils/Common/AppleOAuthService.dart
Normal file
22
lib/Utils/Common/AppleOAuthService.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:regroup/Utils/Common/googleOAuthService.dart';
|
||||||
|
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
|
||||||
|
|
||||||
|
class AppleOAuthService {
|
||||||
|
void logIn() async {
|
||||||
|
try {
|
||||||
|
final credential = await SignInWithApple.getAppleIDCredential(
|
||||||
|
scopes: [
|
||||||
|
AppleIDAuthorizationScopes.email,
|
||||||
|
AppleIDAuthorizationScopes.fullName,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
logger.d("email is ${credential.email}");
|
||||||
|
logger.d("fullname is ${credential.givenName}");
|
||||||
|
logger.d("token is ${credential.userIdentifier}");
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
print("Error occured");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,7 +48,7 @@ class _CustomDropDownWidgetSignupState
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: onDropTap.value
|
borderRadius: onDropTap.value
|
||||||
? BorderRadius.vertical(
|
? BorderRadius.vertical(
|
||||||
top: Radius.circular(30.r),
|
top: Radius.circular(30.r),
|
||||||
@@ -98,7 +98,7 @@ class _CustomDropDownWidgetSignupState
|
|||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: BorderRadius.vertical(
|
borderRadius: BorderRadius.vertical(
|
||||||
bottom: Radius.circular(30.r),
|
bottom: Radius.circular(30.r),
|
||||||
),
|
),
|
||||||
@@ -139,7 +139,7 @@ class _CustomDropDownWidgetSignupState
|
|||||||
),
|
),
|
||||||
// sizedBoxHeight(5.h),
|
// sizedBoxHeight(5.h),
|
||||||
if (index != widget.listData.length - 1)
|
if (index != widget.listData.length - 1)
|
||||||
Divider(thickness: 1, color: const Color(0xFF434A53)),
|
const Divider(thickness: 1, color: Color(0xFF434A53)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -216,7 +216,7 @@ class _CustomDropDownTag1State extends State<CustomDropDownTag1> {
|
|||||||
left: 12.w,
|
left: 12.w,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topLeft,
|
begin: Alignment.topLeft,
|
||||||
end: Alignment.bottomRight,
|
end: Alignment.bottomRight,
|
||||||
@@ -278,7 +278,7 @@ class _CustomDropDownTag1State extends State<CustomDropDownTag1> {
|
|||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: BorderRadius.vertical(
|
borderRadius: BorderRadius.vertical(
|
||||||
bottom: Radius.circular(30.r),
|
bottom: Radius.circular(30.r),
|
||||||
),
|
),
|
||||||
@@ -320,14 +320,14 @@ class _CustomDropDownTag1State extends State<CustomDropDownTag1> {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontFamily: 'Helvetica'),
|
fontFamily: 'Helvetica'),
|
||||||
),
|
),
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
text14400whiteblur(widget.rowData[widget.listData
|
text14400whiteblur(widget.rowData[widget.listData
|
||||||
.indexOf(filteredListData[index])]),
|
.indexOf(filteredListData[index])]),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (index != filteredListData.length - 1)
|
if (index != filteredListData.length - 1)
|
||||||
Divider(thickness: 1, color: const Color(0xFF434A53)),
|
const Divider(thickness: 1, color: Color(0xFF434A53)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -383,7 +383,7 @@ class _CustomDropDownTagState extends State<CustomDropDownTag> {
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: onDropTap.value
|
borderRadius: onDropTap.value
|
||||||
? BorderRadius.vertical(
|
? BorderRadius.vertical(
|
||||||
top: Radius.circular(30.r),
|
top: Radius.circular(30.r),
|
||||||
@@ -433,7 +433,7 @@ class _CustomDropDownTagState extends State<CustomDropDownTag> {
|
|||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: BorderRadius.vertical(
|
borderRadius: BorderRadius.vertical(
|
||||||
bottom: Radius.circular(30.r),
|
bottom: Radius.circular(30.r),
|
||||||
),
|
),
|
||||||
@@ -473,14 +473,14 @@ class _CustomDropDownTagState extends State<CustomDropDownTag> {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontFamily: 'Helvetica'),
|
fontFamily: 'Helvetica'),
|
||||||
),
|
),
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
text14400whiteblur(widget.rowData[index]),
|
text14400whiteblur(widget.rowData[index]),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// sizedBoxHeight(5.h),
|
// sizedBoxHeight(5.h),
|
||||||
if (index != widget.listData.length - 1)
|
if (index != widget.listData.length - 1)
|
||||||
Divider(thickness: 1, color: const Color(0xFF434A53)),
|
const Divider(thickness: 1, color: Color(0xFF434A53)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -551,10 +551,10 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
item,
|
item,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontFamily: 'Helvetica',
|
fontFamily: 'Helvetica',
|
||||||
@@ -566,7 +566,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
),
|
),
|
||||||
// SizedBox(height: 5.h),
|
// SizedBox(height: 5.h),
|
||||||
if (index != widget.listData.length - 1)
|
if (index != widget.listData.length - 1)
|
||||||
Divider(thickness: 1, color: const Color(0xFF434A53)),
|
const Divider(thickness: 1, color: Color(0xFF434A53)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -579,7 +579,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
value: _textController.text,
|
value: _textController.text,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Divider(thickness: 1, color: const Color(0xFF434A53)),
|
const Divider(thickness: 1, color: Color(0xFF434A53)),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Obx(() {
|
Obx(() {
|
||||||
@@ -594,8 +594,8 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
const Text(
|
||||||
"Other: ",
|
"Other: ",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -608,13 +608,13 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: _textController,
|
controller: _textController,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontFamily: 'Helvetica',
|
fontFamily: 'Helvetica',
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
decoration: InputDecoration(
|
decoration: const InputDecoration(
|
||||||
hintText: '',
|
hintText: '',
|
||||||
hintStyle: TextStyle(color: Colors.white70),
|
hintStyle: TextStyle(color: Colors.white70),
|
||||||
border: UnderlineInputBorder(),
|
border: UnderlineInputBorder(),
|
||||||
@@ -628,7 +628,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
widget.onItemSelected(_textController.text);
|
widget.onItemSelected(_textController.text);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: const Text(
|
||||||
'OK',
|
'OK',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -666,7 +666,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: onDropTap.value
|
borderRadius: onDropTap.value
|
||||||
? BorderRadius.vertical(
|
? BorderRadius.vertical(
|
||||||
top: Radius.circular(30.r),
|
top: Radius.circular(30.r),
|
||||||
@@ -715,7 +715,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
//height: widget.listData.length > 4 ? 250.h : null,
|
//height: widget.listData.length > 4 ? 250.h : null,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: BorderRadius.vertical(
|
borderRadius: BorderRadius.vertical(
|
||||||
bottom: Radius.circular(30.r),
|
bottom: Radius.circular(30.r),
|
||||||
),
|
),
|
||||||
@@ -784,7 +784,7 @@ class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
|
|||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius: onDropTap.value
|
borderRadius: onDropTap.value
|
||||||
? BorderRadius.vertical(top: Radius.circular(30.r))
|
? BorderRadius.vertical(top: Radius.circular(30.r))
|
||||||
: BorderRadius.circular(30.r),
|
: BorderRadius.circular(30.r),
|
||||||
@@ -834,7 +834,7 @@ class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
|
|||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.vertical(bottom: Radius.circular(30.r)),
|
BorderRadius.vertical(bottom: Radius.circular(30.r)),
|
||||||
border: Border.all(color: const Color(0xFF434A53)),
|
border: Border.all(color: const Color(0xFF434A53)),
|
||||||
@@ -895,9 +895,10 @@ class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Checkbox(
|
Checkbox(
|
||||||
side: BorderSide(color: Color(0xFF434A53)),
|
side:
|
||||||
|
const BorderSide(color: Color(0xFF434A53)),
|
||||||
value: selectedValues.contains(item),
|
value: selectedValues.contains(item),
|
||||||
activeColor: Color(0xFF434A53),
|
activeColor: const Color(0xFF434A53),
|
||||||
checkColor: Colors.white,
|
checkColor: Colors.white,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
if (value == true) {
|
if (value == true) {
|
||||||
@@ -913,7 +914,7 @@ class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (index != widget.listData.length - 1)
|
if (index != widget.listData.length - 1)
|
||||||
Divider(thickness: 1, color: const Color(0xFF434A53)),
|
const Divider(thickness: 1, color: Color(0xFF434A53)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
|||||||
readOnly: widget.readonly,
|
readOnly: widget.readonly,
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
enabled: widget.enabled,
|
enabled: widget.enabled,
|
||||||
enableInteractiveSelection: false,
|
enableInteractiveSelection: true,
|
||||||
maxLines: widget.maxlines,
|
maxLines: widget.maxlines,
|
||||||
obscureText: obscureText,
|
obscureText: obscureText,
|
||||||
controller: widget.textEditingController,
|
controller: widget.textEditingController,
|
||||||
@@ -159,7 +159,6 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
: widget.suffixIcon == null
|
: widget.suffixIcon == null
|
||||||
? null
|
? null
|
||||||
: widget.suffixIcon!,
|
: widget.suffixIcon!,
|
||||||
@@ -286,7 +285,7 @@ class _CustomTextFormField2State extends State<CustomTextFormField2> {
|
|||||||
readOnly: widget.readonly,
|
readOnly: widget.readonly,
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
enabled: widget.enabled,
|
enabled: widget.enabled,
|
||||||
enableInteractiveSelection: false,
|
enableInteractiveSelection: true,
|
||||||
maxLines: widget.maxlines,
|
maxLines: widget.maxlines,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
obscureText: obscureText,
|
obscureText: obscureText,
|
||||||
@@ -647,7 +646,7 @@ class _SearchTextFormFieldState extends State<SearchTextFormField> {
|
|||||||
readOnly: widget.readonly,
|
readOnly: widget.readonly,
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
enabled: widget.enabled,
|
enabled: widget.enabled,
|
||||||
enableInteractiveSelection: false,
|
enableInteractiveSelection: true,
|
||||||
maxLines: widget.maxlines,
|
maxLines: widget.maxlines,
|
||||||
obscureText: obscureText,
|
obscureText: obscureText,
|
||||||
controller: widget.textEditingController,
|
controller: widget.textEditingController,
|
||||||
|
|||||||
@@ -14,19 +14,22 @@ class NoInternet extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _NoInternetState extends State<NoInternet> {
|
class _NoInternetState extends State<NoInternet> {
|
||||||
|
|
||||||
Future<void> checkInternet() async {
|
Future<void> checkInternet() async {
|
||||||
final connectivityResult = await (Connectivity().checkConnectivity());
|
final connectivityResult = await (Connectivity().checkConnectivity());
|
||||||
|
|
||||||
if (connectivityResult.contains(ConnectivityResult.wifi) ||
|
if (connectivityResult.contains(ConnectivityResult.wifi) ||
|
||||||
connectivityResult.contains(ConnectivityResult.mobile) ) {
|
connectivityResult.contains(ConnectivityResult.mobile)) {
|
||||||
setState(() {
|
setState(() {
|
||||||
// _connectionStatus = connectivityResult.toString();
|
// _connectionStatus = connectivityResult.toString();
|
||||||
Get.back(result: true);
|
Get.back(result: true);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
Get.snackbar("Error", "Your internet is still down!");
|
Get.snackbar(
|
||||||
|
"Error",
|
||||||
|
"Your internet is still down!",
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
);
|
||||||
// _connectionStatus = connectivityResult.toString();
|
// _connectionStatus = connectivityResult.toString();
|
||||||
// print(_connectionStatus.toString());
|
// print(_connectionStatus.toString());
|
||||||
// Get.toNamed(RouteName.nointernet);
|
// Get.toNamed(RouteName.nointernet);
|
||||||
@@ -58,13 +61,19 @@ class _NoInternetState extends State<NoInternet> {
|
|||||||
sizedBoxHeight(40.h),
|
sizedBoxHeight(40.h),
|
||||||
Text(
|
Text(
|
||||||
'No Internet !',
|
'No Internet !',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 20,
|
||||||
|
color: Colors.white),
|
||||||
),
|
),
|
||||||
sizedBoxHeight(15.h),
|
sizedBoxHeight(15.h),
|
||||||
Text(
|
Text(
|
||||||
'Please Check Your Internet\nConnection',
|
'Please Check Your Internet\nConnection',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 20,
|
||||||
|
color: Colors.white),
|
||||||
),
|
),
|
||||||
sizedBoxHeight(20.h),
|
sizedBoxHeight(20.h),
|
||||||
CustomButton(
|
CustomButton(
|
||||||
|
|||||||
94
lib/Utils/Common/googleOAuthService.dart
Normal file
94
lib/Utils/Common/googleOAuthService.dart
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:google_sign_in/google_sign_in.dart';
|
||||||
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
|
import 'package:logger/logger.dart';
|
||||||
|
|
||||||
|
String? userName;
|
||||||
|
String? mobileNumber;
|
||||||
|
String? emailAddress;
|
||||||
|
String? firebaseidTokenGoogleSignin;
|
||||||
|
String? packageidTokenGoogleSignin;
|
||||||
|
var logger = Logger(
|
||||||
|
printer: PrettyPrinter(
|
||||||
|
// methodCount: 2, // Number of method calls to be displayed
|
||||||
|
// errorMethodCount: 8, // Number of method calls if stacktrace is provided
|
||||||
|
// lineLength: 120, // Width of the output
|
||||||
|
colors: true, // Colorful log messages
|
||||||
|
// printEmojis: true, // Print an emoji for each log message
|
||||||
|
// printTime: false // Should each log print contain a timestamp
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
class GoogleAuthService extends GetxController {
|
||||||
|
final GoogleSignIn _googleSignIn = GoogleSignIn(scopes: ['email']);
|
||||||
|
Rx<User?> user = Rx<User?>(FirebaseAuth.instance.currentUser);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
super.onInit();
|
||||||
|
FirebaseAuth.instance.authStateChanges().listen((User? newUser) {
|
||||||
|
user.value = newUser;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String?> handleGoogleSignIn() async {
|
||||||
|
// await FirebaseAuth.instance.signOut();
|
||||||
|
|
||||||
|
// Map<String, dynamic> updata = {
|
||||||
|
// "username": "kishan1",
|
||||||
|
// "email": "kishan1@gmail.com",
|
||||||
|
// "phone": "123456564",
|
||||||
|
// "ID": "efsfsfsefsef"
|
||||||
|
// };
|
||||||
|
// GoogleSigninApi().googleSigninApi(updata);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Sign out the user if they are already signed in
|
||||||
|
await _googleSignIn.signOut();
|
||||||
|
|
||||||
|
// This will show the Google Sign-In popup and allow the user to select an account.
|
||||||
|
final GoogleSignInAccount? googleUser = await _googleSignIn.signIn();
|
||||||
|
|
||||||
|
if (googleUser == null) {
|
||||||
|
return 'Google Sign-In canceled';
|
||||||
|
}
|
||||||
|
|
||||||
|
// // If the user signed in successfully, we can get their user information.
|
||||||
|
final GoogleSignInAuthentication googleAuth =
|
||||||
|
await googleUser.authentication;
|
||||||
|
final String? accessToken = googleAuth.accessToken;
|
||||||
|
packageidTokenGoogleSignin = googleAuth.accessToken;
|
||||||
|
final String? idToken = googleAuth.idToken;
|
||||||
|
logger.d(packageidTokenGoogleSignin);
|
||||||
|
//new method
|
||||||
|
|
||||||
|
// Sign in with Google credentials using Firebase Authentication.
|
||||||
|
final AuthCredential credential = GoogleAuthProvider.credential(
|
||||||
|
accessToken: accessToken,
|
||||||
|
idToken: idToken,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Use Firebase Authentication to sign in with the provided credential.
|
||||||
|
final UserCredential authResult =
|
||||||
|
await FirebaseAuth.instance.signInWithCredential(credential);
|
||||||
|
|
||||||
|
// Firebase user information is available in authResult.user.
|
||||||
|
final User? firebaseUser = authResult.user;
|
||||||
|
|
||||||
|
print("Firebase user ID: ${firebaseUser?.uid}");
|
||||||
|
print("Firebase user email: ${firebaseUser?.email}");
|
||||||
|
print("Firebase user display name: ${firebaseUser?.displayName}");
|
||||||
|
print("Firebase user metadata: ${firebaseUser?.metadata}");
|
||||||
|
print("Firebase user number: ${firebaseUser?.phoneNumber}");
|
||||||
|
userName = firebaseUser?.displayName;
|
||||||
|
mobileNumber = firebaseUser?.phoneNumber;
|
||||||
|
emailAddress = firebaseUser?.email;
|
||||||
|
firebaseidTokenGoogleSignin = firebaseUser?.uid;
|
||||||
|
return packageidTokenGoogleSignin;
|
||||||
|
} catch (error) {
|
||||||
|
// Handle any errors that occurred during the sign-in process.
|
||||||
|
print('Error during Google Sign-In: $error');
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
68
lib/firebase_options.dart
Normal file
68
lib/firebase_options.dart
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
// File generated by FlutterFire CLI.
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||||
|
import 'package:flutter/foundation.dart'
|
||||||
|
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
||||||
|
|
||||||
|
/// Default [FirebaseOptions] for use with your Firebase apps.
|
||||||
|
///
|
||||||
|
/// Example:
|
||||||
|
/// ```dart
|
||||||
|
/// import 'firebase_options.dart';
|
||||||
|
/// // ...
|
||||||
|
/// await Firebase.initializeApp(
|
||||||
|
/// options: DefaultFirebaseOptions.currentPlatform,
|
||||||
|
/// );
|
||||||
|
/// ```
|
||||||
|
class DefaultFirebaseOptions {
|
||||||
|
static FirebaseOptions get currentPlatform {
|
||||||
|
if (kIsWeb) {
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for web - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
switch (defaultTargetPlatform) {
|
||||||
|
case TargetPlatform.android:
|
||||||
|
return android;
|
||||||
|
case TargetPlatform.iOS:
|
||||||
|
return ios;
|
||||||
|
case TargetPlatform.macOS:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for macos - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
case TargetPlatform.windows:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for windows - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
case TargetPlatform.linux:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for linux - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions are not supported for this platform.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static const FirebaseOptions android = FirebaseOptions(
|
||||||
|
apiKey: 'AIzaSyA7z_Q3xN1IHZFzhfOtkXTyryGEJMOZrPY',
|
||||||
|
appId: '1:563133114654:android:9032ddcb6dc5add26c010f',
|
||||||
|
messagingSenderId: '563133114654',
|
||||||
|
projectId: 'regroup-9aed2',
|
||||||
|
storageBucket: 'regroup-9aed2.appspot.com',
|
||||||
|
);
|
||||||
|
|
||||||
|
static const FirebaseOptions ios = FirebaseOptions(
|
||||||
|
apiKey: 'AIzaSyCvettUZf1thSh9xO5-SxR_IYx-tCmVnc0',
|
||||||
|
appId: '1:563133114654:ios:d5ce57e5b214757e6c010f',
|
||||||
|
messagingSenderId: '563133114654',
|
||||||
|
projectId: 'regroup-9aed2',
|
||||||
|
storageBucket: 'regroup-9aed2.appspot.com',
|
||||||
|
iosBundleId: 'com.regroup.wdi',
|
||||||
|
);
|
||||||
|
}
|
||||||
141
lib/main.dart
141
lib/main.dart
@@ -1,20 +1,21 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:regroup/Utils/dialogs.dart';
|
import 'package:regroup/Utils/dialogs.dart';
|
||||||
|
import 'package:regroup/Utils/Common/NoInternet.dart';
|
||||||
|
import 'package:regroup/firebase_options.dart';
|
||||||
import 'package:regroup/resources/routes/route_name.dart';
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
import 'package:regroup/resources/routes/routes.dart';
|
import 'package:regroup/resources/routes/routes.dart';
|
||||||
import 'package:statsfl/statsfl.dart';
|
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||||
|
|
||||||
SystemChrome.setPreferredOrientations([
|
SystemChrome.setPreferredOrientations([
|
||||||
DeviceOrientation.portraitUp,
|
DeviceOrientation.portraitUp,
|
||||||
@@ -30,6 +31,8 @@ Future<void> main() async {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final streamController = StreamController.broadcast();
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
@@ -37,7 +40,137 @@ class MyApp extends StatefulWidget {
|
|||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||||
|
// var _connectionStatus = ConnectivityResult.values.toString();
|
||||||
|
// final Connectivity _connectivity = Connectivity();
|
||||||
|
// late StreamSubscription<ConnectivityResult> _connectivitySubscription;
|
||||||
|
|
||||||
|
List<ConnectivityResult> _connectionStatus = [ConnectivityResult.none];
|
||||||
|
final Connectivity _connectivity = Connectivity();
|
||||||
|
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
|
||||||
|
|
||||||
|
// Future<void> checkInternet() async {
|
||||||
|
// final connectivityResult = await (Connectivity().checkConnectivity());
|
||||||
|
|
||||||
|
// if (connectivityResult == ConnectivityResult.wifi ||
|
||||||
|
// connectivityResult == ConnectivityResult.mobile) {
|
||||||
|
// setState(() {
|
||||||
|
// _connectionStatus = connectivityResult.toString();
|
||||||
|
// print("has internet");
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// setState(() {
|
||||||
|
// _connectionStatus = connectivityResult.toString();
|
||||||
|
// print("no internet");
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
Future<void> initConnectivity() async {
|
||||||
|
late List<ConnectivityResult> result;
|
||||||
|
// Platform messages may fail, so we use a try/catch PlatformException.
|
||||||
|
try {
|
||||||
|
result = await _connectivity.checkConnectivity();
|
||||||
|
print("initconnectivitity");
|
||||||
|
} on PlatformException catch (e) {
|
||||||
|
print("errrror");
|
||||||
|
print(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!mounted) {
|
||||||
|
return Future.value(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _updateConnectionStatus(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
|
||||||
|
// setState(() {
|
||||||
|
// _connectionStatus = result.toString();
|
||||||
|
// });
|
||||||
|
|
||||||
|
// // ignore: avoid_print
|
||||||
|
// print('Connectivity changed: $_connectionStatus');
|
||||||
|
// }
|
||||||
|
|
||||||
|
Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
|
||||||
|
// setState(() {
|
||||||
|
// _connectionStatus = result;
|
||||||
|
// });
|
||||||
|
|
||||||
|
if (result.contains(ConnectivityResult.wifi) || result.contains(ConnectivityResult.mobile)) {
|
||||||
|
setState(() {
|
||||||
|
_connectionStatus = result;
|
||||||
|
Get.back(result: true);
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
_connectionStatus = result;
|
||||||
|
Get.toNamed(RouteName.nointernet);
|
||||||
|
});
|
||||||
|
// Get.toNamed(RouteName.nointernet);
|
||||||
|
}
|
||||||
|
// ignore: avoid_print
|
||||||
|
print('Connectivity changed: $_connectionStatus');
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _getStoragePermission() async {
|
||||||
|
DeviceInfoPlugin plugin = DeviceInfoPlugin();
|
||||||
|
AndroidDeviceInfo android = await plugin.androidInfo;
|
||||||
|
if (android.version.sdkInt < 33) {
|
||||||
|
if (await Permission.storage.request().isGranted) {
|
||||||
|
// setState(() {
|
||||||
|
// permissionGranted = true;
|
||||||
|
// });
|
||||||
|
} else if (await Permission.storage.request().isPermanentlyDenied) {
|
||||||
|
await openAppSettings();
|
||||||
|
await utils.showToast("Permission denied.");
|
||||||
|
}
|
||||||
|
// else if (await Permission.audio.request().isDenied) {
|
||||||
|
// // setState(() {
|
||||||
|
// // permissionGranted = false;
|
||||||
|
// // });
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
|
if (await Permission.photos.request().isGranted) {
|
||||||
|
// await utils.showToast("Permission granted.");
|
||||||
|
// setState(() {
|
||||||
|
// permissionGranted = true;
|
||||||
|
// });
|
||||||
|
} else if (await Permission.photos.request().isPermanentlyDenied) {
|
||||||
|
await openAppSettings();
|
||||||
|
await utils.showToast("Permission denied.");
|
||||||
|
} else if (await Permission.photos.request().isDenied) {
|
||||||
|
await openAppSettings();
|
||||||
|
await utils.showToast("Permission denied.");
|
||||||
|
// setState(() {
|
||||||
|
// permissionGranted = false;
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
initConnectivity();
|
||||||
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
_connectivitySubscription =
|
||||||
|
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
|
||||||
|
|
||||||
|
//do not remove this coomented code
|
||||||
|
// if (Platform.isAndroid) {
|
||||||
|
// _getStoragePermission();
|
||||||
|
// }
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_connectivitySubscription.cancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ScreenUtilInit(
|
return ScreenUtilInit(
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
import 'package:regroup/Common/CommonButton.dart';
|
import 'package:regroup/Common/CommonButton.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||||
import 'package:regroup/Utils/texts.dart';
|
import 'package:regroup/Utils/texts.dart';
|
||||||
|
import 'package:regroup/onboarding/NewPass/ViewModel/NewPassAPI.dart';
|
||||||
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
|
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||||
|
|
||||||
class NewPassword extends StatefulWidget {
|
class NewPassword extends StatefulWidget {
|
||||||
const NewPassword({super.key});
|
const NewPassword({super.key});
|
||||||
@@ -14,6 +20,77 @@ class NewPassword extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _NewPasswordState extends State<NewPassword> {
|
class _NewPasswordState extends State<NewPassword> {
|
||||||
|
TextEditingController newPassController = TextEditingController();
|
||||||
|
TextEditingController confirmPassController = TextEditingController();
|
||||||
|
|
||||||
|
final emailAddress = Get.arguments;
|
||||||
|
|
||||||
|
_newpassDone() async {
|
||||||
|
print('EmailAddress --- $emailAddress');
|
||||||
|
if (newPassController.text.isBlank! ||
|
||||||
|
confirmPassController.text.isBlank!) {
|
||||||
|
Get.snackbar(
|
||||||
|
'Error',
|
||||||
|
'Enter your credentials',
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
colorText: Colors.white,
|
||||||
|
);
|
||||||
|
} else if (!RegExp(r'^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[!@#\$&*~]).{8,}$')
|
||||||
|
.hasMatch(newPassController.text)) {
|
||||||
|
Get.snackbar(
|
||||||
|
'Error',
|
||||||
|
'Password must contain at least one special character, one capital letter, and one number',
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
colorText: Colors.white,
|
||||||
|
);
|
||||||
|
} else if (confirmPassController.text != newPassController.text) {
|
||||||
|
Get.snackbar(
|
||||||
|
'Error',
|
||||||
|
'Password does not match',
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
colorText: Colors.white,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Map<String, String> updata = {
|
||||||
|
"email_address": emailAddress,
|
||||||
|
"password": newPassController.text,
|
||||||
|
};
|
||||||
|
|
||||||
|
final data = await NewtpassAPI().newtpassApi(updata);
|
||||||
|
if (data.status == ResponseStatus.SUCCESS) {
|
||||||
|
// btnController.reset();
|
||||||
|
Get.snackbar(
|
||||||
|
"Success!",
|
||||||
|
'Password has been reset successfully!',
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
Future.delayed(Duration(seconds: 1), () {
|
||||||
|
Get.toNamed(RouteName.loginScreen);
|
||||||
|
});
|
||||||
|
// print('success');
|
||||||
|
} else {
|
||||||
|
Get.snackbar(
|
||||||
|
"Error!",
|
||||||
|
data.message,
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@@ -48,13 +125,51 @@ class _NewPasswordState extends State<NewPassword> {
|
|||||||
sizedBoxHeight(35.h),
|
sizedBoxHeight(35.h),
|
||||||
text16w400_FCFCFC("Create new password"),
|
text16w400_FCFCFC("Create new password"),
|
||||||
sizedBoxHeight(15.h),
|
sizedBoxHeight(15.h),
|
||||||
CustomTextFormField(),
|
CustomTextFormField(
|
||||||
|
textEditingController: newPassController,
|
||||||
|
validator: (val) {
|
||||||
|
if (val == null || val.isEmpty) {
|
||||||
|
return 'Please enter your password';
|
||||||
|
}
|
||||||
|
if (!RegExp(
|
||||||
|
r'^(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[!@#\$&*~]).{8,}$')
|
||||||
|
.hasMatch(val)) {
|
||||||
|
return 'Enter a valid password';
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter()
|
||||||
|
],
|
||||||
|
),
|
||||||
sizedBoxHeight(20.h),
|
sizedBoxHeight(20.h),
|
||||||
text16w400_FCFCFC("Confirm password"),
|
text16w400_FCFCFC("Confirm password"),
|
||||||
sizedBoxHeight(15.h),
|
sizedBoxHeight(15.h),
|
||||||
CustomTextFormField(),
|
CustomTextFormField(
|
||||||
|
textEditingController: confirmPassController,
|
||||||
|
validator: (val) {
|
||||||
|
if (val == null || val.isEmpty) {
|
||||||
|
return 'Please enter your password';
|
||||||
|
}
|
||||||
|
if (val != newPassController.text) {
|
||||||
|
return 'Password does not match';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter()
|
||||||
|
],
|
||||||
|
),
|
||||||
sizedBoxHeight(90.h),
|
sizedBoxHeight(90.h),
|
||||||
CommonBtn(text: 'Continue'),
|
CommonBtn(
|
||||||
|
text: 'Continue',
|
||||||
|
onTap: () {
|
||||||
|
_newpassDone();
|
||||||
|
},
|
||||||
|
),
|
||||||
])))
|
])))
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|||||||
21
lib/onboarding/NewPass/ViewModel/NewPassAPI.dart
Normal file
21
lib/onboarding/NewPass/ViewModel/NewPassAPI.dart
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import 'package:regroup/Common/api_urls.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
|
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||||
|
|
||||||
|
class NewtpassAPI {
|
||||||
|
NewtpassAPI();
|
||||||
|
Future<ResponseData<dynamic>> newtpassApi(var data) async {
|
||||||
|
final response = await NetworkApiServices().postApi(
|
||||||
|
data,
|
||||||
|
ApiUrls.resetpassword,
|
||||||
|
// "https://regroup.betadelivery.com/api/v1/reset-password",
|
||||||
|
);
|
||||||
|
if (response.data['status'] == 'success') {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
response.data['message'], ResponseStatus.SUCCESS);
|
||||||
|
} else {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
response.data['message'], ResponseStatus.FAILED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
332
lib/onboarding/Signup/Model/GetUserdetailsModel.dart
Normal file
332
lib/onboarding/Signup/Model/GetUserdetailsModel.dart
Normal file
@@ -0,0 +1,332 @@
|
|||||||
|
class GetuserdetailsModel {
|
||||||
|
String? status;
|
||||||
|
int? statusCode;
|
||||||
|
String? message;
|
||||||
|
Data? data;
|
||||||
|
|
||||||
|
GetuserdetailsModel({this.status, this.statusCode, this.message, this.data});
|
||||||
|
|
||||||
|
GetuserdetailsModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
status = json['status'];
|
||||||
|
statusCode = json['status_code'];
|
||||||
|
message = json['message'];
|
||||||
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['status'] = this.status;
|
||||||
|
data['status_code'] = this.statusCode;
|
||||||
|
data['message'] = this.message;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
UserData? userData;
|
||||||
|
List<UserCommunity>? userCommunity;
|
||||||
|
List<UserGroups>? userGroups;
|
||||||
|
|
||||||
|
Data({this.userData, this.userCommunity, this.userGroups});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
userData = json['userData'] != null
|
||||||
|
? new UserData.fromJson(json['userData'])
|
||||||
|
: null;
|
||||||
|
if (json['userCommunity'] != null) {
|
||||||
|
userCommunity = <UserCommunity>[];
|
||||||
|
json['userCommunity'].forEach((v) {
|
||||||
|
userCommunity!.add(new UserCommunity.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (json['userGroups'] != null) {
|
||||||
|
userGroups = <UserGroups>[];
|
||||||
|
json['userGroups'].forEach((v) {
|
||||||
|
userGroups!.add(new UserGroups.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.userData != null) {
|
||||||
|
data['userData'] = this.userData!.toJson();
|
||||||
|
}
|
||||||
|
if (this.userCommunity != null) {
|
||||||
|
data['userCommunity'] =
|
||||||
|
this.userCommunity!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
if (this.userGroups != null) {
|
||||||
|
data['userGroups'] = this.userGroups!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserData {
|
||||||
|
int? id;
|
||||||
|
int? principalTypeXid;
|
||||||
|
String? googleId;
|
||||||
|
String? appleId;
|
||||||
|
String? userName;
|
||||||
|
String? fullName;
|
||||||
|
String? gender;
|
||||||
|
String? dateOfBirth;
|
||||||
|
String? phoneNumber;
|
||||||
|
String? emailAddress;
|
||||||
|
String? addressLine1;
|
||||||
|
String? addressLine2;
|
||||||
|
String? postCode;
|
||||||
|
String? lastLoginDatetime;
|
||||||
|
String? profilePhoto;
|
||||||
|
int? isProfileUpdated;
|
||||||
|
String? isActive;
|
||||||
|
String? createdAt;
|
||||||
|
|
||||||
|
UserData(
|
||||||
|
{this.id,
|
||||||
|
this.principalTypeXid,
|
||||||
|
this.googleId,
|
||||||
|
this.appleId,
|
||||||
|
this.userName,
|
||||||
|
this.fullName,
|
||||||
|
this.gender,
|
||||||
|
this.dateOfBirth,
|
||||||
|
this.phoneNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.addressLine1,
|
||||||
|
this.addressLine2,
|
||||||
|
this.postCode,
|
||||||
|
this.lastLoginDatetime,
|
||||||
|
this.profilePhoto,
|
||||||
|
this.isProfileUpdated,
|
||||||
|
this.isActive,
|
||||||
|
this.createdAt});
|
||||||
|
|
||||||
|
UserData.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
principalTypeXid = json['principal_type_xid'];
|
||||||
|
googleId = json['google_id'];
|
||||||
|
appleId = json['apple_id'];
|
||||||
|
userName = json['user_name'];
|
||||||
|
fullName = json['full_name'];
|
||||||
|
gender = json['gender'];
|
||||||
|
dateOfBirth = json['date_of_birth'];
|
||||||
|
phoneNumber = json['phone_number'];
|
||||||
|
emailAddress = json['email_address'];
|
||||||
|
addressLine1 = json['address_line1'];
|
||||||
|
addressLine2 = json['address_line2'];
|
||||||
|
postCode = json['post_code'];
|
||||||
|
lastLoginDatetime = json['last_login_datetime'];
|
||||||
|
profilePhoto = json['profile_photo'];
|
||||||
|
isProfileUpdated = json['is_profile_updated'];
|
||||||
|
isActive = json['is_active'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['principal_type_xid'] = this.principalTypeXid;
|
||||||
|
data['google_id'] = this.googleId;
|
||||||
|
data['apple_id'] = this.appleId;
|
||||||
|
data['user_name'] = this.userName;
|
||||||
|
data['full_name'] = this.fullName;
|
||||||
|
data['gender'] = this.gender;
|
||||||
|
data['date_of_birth'] = this.dateOfBirth;
|
||||||
|
data['phone_number'] = this.phoneNumber;
|
||||||
|
data['email_address'] = this.emailAddress;
|
||||||
|
data['address_line1'] = this.addressLine1;
|
||||||
|
data['address_line2'] = this.addressLine2;
|
||||||
|
data['post_code'] = this.postCode;
|
||||||
|
data['last_login_datetime'] = this.lastLoginDatetime;
|
||||||
|
data['profile_photo'] = this.profilePhoto;
|
||||||
|
data['is_profile_updated'] = this.isProfileUpdated;
|
||||||
|
data['is_active'] = this.isActive;
|
||||||
|
data['created_at'] = this.createdAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserCommunity {
|
||||||
|
int? id;
|
||||||
|
int? iamPrincipalXid;
|
||||||
|
int? manageCommunityXid;
|
||||||
|
String? joinedAt;
|
||||||
|
int? isActive;
|
||||||
|
CommunityData? communityData;
|
||||||
|
|
||||||
|
UserCommunity(
|
||||||
|
{this.id,
|
||||||
|
this.iamPrincipalXid,
|
||||||
|
this.manageCommunityXid,
|
||||||
|
this.joinedAt,
|
||||||
|
this.isActive,
|
||||||
|
this.communityData});
|
||||||
|
|
||||||
|
UserCommunity.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
iamPrincipalXid = json['iam_principal_xid'];
|
||||||
|
manageCommunityXid = json['manage_community_xid'];
|
||||||
|
joinedAt = json['joined_at'];
|
||||||
|
isActive = json['is_active'];
|
||||||
|
communityData = json['community_data'] != null
|
||||||
|
? new CommunityData.fromJson(json['community_data'])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['iam_principal_xid'] = this.iamPrincipalXid;
|
||||||
|
data['manage_community_xid'] = this.manageCommunityXid;
|
||||||
|
data['joined_at'] = this.joinedAt;
|
||||||
|
data['is_active'] = this.isActive;
|
||||||
|
if (this.communityData != null) {
|
||||||
|
data['community_data'] = this.communityData!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CommunityData {
|
||||||
|
int? id;
|
||||||
|
String? communityProfilePhoto;
|
||||||
|
String? communityBannerImage;
|
||||||
|
String? communityName;
|
||||||
|
String? communityLocation;
|
||||||
|
String? communityDescription;
|
||||||
|
int? communityTypeXid;
|
||||||
|
int? activityXid;
|
||||||
|
int? isActive;
|
||||||
|
String? createdAt;
|
||||||
|
|
||||||
|
CommunityData(
|
||||||
|
{this.id,
|
||||||
|
this.communityProfilePhoto,
|
||||||
|
this.communityBannerImage,
|
||||||
|
this.communityName,
|
||||||
|
this.communityLocation,
|
||||||
|
this.communityDescription,
|
||||||
|
this.communityTypeXid,
|
||||||
|
this.activityXid,
|
||||||
|
this.isActive,
|
||||||
|
this.createdAt});
|
||||||
|
|
||||||
|
CommunityData.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
communityProfilePhoto = json['community_profile_photo'];
|
||||||
|
communityBannerImage = json['community_banner_image'];
|
||||||
|
communityName = json['community_name'];
|
||||||
|
communityLocation = json['community_location'];
|
||||||
|
communityDescription = json['community_description'];
|
||||||
|
communityTypeXid = json['community_type_xid'];
|
||||||
|
activityXid = json['activity_xid'];
|
||||||
|
isActive = json['is_active'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['community_profile_photo'] = this.communityProfilePhoto;
|
||||||
|
data['community_banner_image'] = this.communityBannerImage;
|
||||||
|
data['community_name'] = this.communityName;
|
||||||
|
data['community_location'] = this.communityLocation;
|
||||||
|
data['community_description'] = this.communityDescription;
|
||||||
|
data['community_type_xid'] = this.communityTypeXid;
|
||||||
|
data['activity_xid'] = this.activityXid;
|
||||||
|
data['is_active'] = this.isActive;
|
||||||
|
data['created_at'] = this.createdAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserGroups {
|
||||||
|
int? id;
|
||||||
|
int? iamPrincipalXid;
|
||||||
|
int? manageGroupXid;
|
||||||
|
String? createdAt;
|
||||||
|
GroupData? groupData;
|
||||||
|
|
||||||
|
UserGroups(
|
||||||
|
{this.id,
|
||||||
|
this.iamPrincipalXid,
|
||||||
|
this.manageGroupXid,
|
||||||
|
this.createdAt,
|
||||||
|
this.groupData});
|
||||||
|
|
||||||
|
UserGroups.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
iamPrincipalXid = json['iam_principal_xid'];
|
||||||
|
manageGroupXid = json['manage_group_xid'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
groupData = json['group_data'] != null
|
||||||
|
? new GroupData.fromJson(json['group_data'])
|
||||||
|
: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['iam_principal_xid'] = this.iamPrincipalXid;
|
||||||
|
data['manage_group_xid'] = this.manageGroupXid;
|
||||||
|
data['created_at'] = this.createdAt;
|
||||||
|
if (this.groupData != null) {
|
||||||
|
data['group_data'] = this.groupData!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GroupData {
|
||||||
|
int? id;
|
||||||
|
int? manageGroupTypeXid;
|
||||||
|
String? title;
|
||||||
|
String? backgroundImage;
|
||||||
|
String? groupImage;
|
||||||
|
String? link;
|
||||||
|
String? description;
|
||||||
|
int? isActive;
|
||||||
|
String? createdAt;
|
||||||
|
|
||||||
|
GroupData(
|
||||||
|
{this.id,
|
||||||
|
this.manageGroupTypeXid,
|
||||||
|
this.title,
|
||||||
|
this.backgroundImage,
|
||||||
|
this.groupImage,
|
||||||
|
this.link,
|
||||||
|
this.description,
|
||||||
|
this.isActive,
|
||||||
|
this.createdAt});
|
||||||
|
|
||||||
|
GroupData.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
manageGroupTypeXid = json['manage_group_type_xid'];
|
||||||
|
title = json['title'];
|
||||||
|
backgroundImage = json['background_image'];
|
||||||
|
groupImage = json['group_image'];
|
||||||
|
link = json['link'];
|
||||||
|
description = json['description'];
|
||||||
|
isActive = json['is_active'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['manage_group_type_xid'] = this.manageGroupTypeXid;
|
||||||
|
data['title'] = this.title;
|
||||||
|
data['background_image'] = this.backgroundImage;
|
||||||
|
data['group_image'] = this.groupImage;
|
||||||
|
data['link'] = this.link;
|
||||||
|
data['description'] = this.description;
|
||||||
|
data['is_active'] = this.isActive;
|
||||||
|
data['created_at'] = this.createdAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
class TellusIndividualModel {
|
||||||
|
String? status;
|
||||||
|
int? statusCode;
|
||||||
|
String? message;
|
||||||
|
Data? data;
|
||||||
|
|
||||||
|
TellusIndividualModel(
|
||||||
|
{this.status, this.statusCode, this.message, this.data});
|
||||||
|
|
||||||
|
TellusIndividualModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
status = json['status'];
|
||||||
|
statusCode = json['status_code'];
|
||||||
|
message = json['message'];
|
||||||
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['status'] = this.status;
|
||||||
|
data['status_code'] = this.statusCode;
|
||||||
|
data['message'] = this.message;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
Profile? profile;
|
||||||
|
|
||||||
|
Data({this.profile});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
profile =
|
||||||
|
json['profile'] != null ? new Profile.fromJson(json['profile']) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
if (this.profile != null) {
|
||||||
|
data['profile'] = this.profile!.toJson();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Profile {
|
||||||
|
int? id;
|
||||||
|
int? principalTypeXid;
|
||||||
|
int? principalSourceXid;
|
||||||
|
String? oneSignalPlayerId;
|
||||||
|
String? googleId;
|
||||||
|
String? appleId;
|
||||||
|
String? facebookId;
|
||||||
|
String? microsoftId;
|
||||||
|
String? userName;
|
||||||
|
String? pin;
|
||||||
|
String? fullName;
|
||||||
|
String? gender;
|
||||||
|
String? dateOfBirth;
|
||||||
|
String? phoneNumber;
|
||||||
|
String? otherPhoneNumber;
|
||||||
|
String? emailAddress;
|
||||||
|
String? addressLine1;
|
||||||
|
String? addressLine2;
|
||||||
|
String? cityXid;
|
||||||
|
String? stateXid;
|
||||||
|
String? countryXid;
|
||||||
|
String? postCode;
|
||||||
|
String? lastLoginDatetime;
|
||||||
|
String? profilePhoto;
|
||||||
|
String? referralCode;
|
||||||
|
String? description;
|
||||||
|
String? about;
|
||||||
|
String? position;
|
||||||
|
String? trainingScores;
|
||||||
|
String? height;
|
||||||
|
String? weight;
|
||||||
|
String? battingAverage;
|
||||||
|
int? isProfileUpdated;
|
||||||
|
String? isActive;
|
||||||
|
int? groupNotification;
|
||||||
|
int? communityNotification;
|
||||||
|
int? followerNotification;
|
||||||
|
int? newFollowerNotification;
|
||||||
|
int? directMessageNotification;
|
||||||
|
String? createdBy;
|
||||||
|
String? modifiedBy;
|
||||||
|
String? deletedAt;
|
||||||
|
String? createdAt;
|
||||||
|
String? updatedAt;
|
||||||
|
|
||||||
|
Profile(
|
||||||
|
{this.id,
|
||||||
|
this.principalTypeXid,
|
||||||
|
this.principalSourceXid,
|
||||||
|
this.oneSignalPlayerId,
|
||||||
|
this.googleId,
|
||||||
|
this.appleId,
|
||||||
|
this.facebookId,
|
||||||
|
this.microsoftId,
|
||||||
|
this.userName,
|
||||||
|
this.pin,
|
||||||
|
this.fullName,
|
||||||
|
this.gender,
|
||||||
|
this.dateOfBirth,
|
||||||
|
this.phoneNumber,
|
||||||
|
this.otherPhoneNumber,
|
||||||
|
this.emailAddress,
|
||||||
|
this.addressLine1,
|
||||||
|
this.addressLine2,
|
||||||
|
this.cityXid,
|
||||||
|
this.stateXid,
|
||||||
|
this.countryXid,
|
||||||
|
this.postCode,
|
||||||
|
this.lastLoginDatetime,
|
||||||
|
this.profilePhoto,
|
||||||
|
this.referralCode,
|
||||||
|
this.description,
|
||||||
|
this.about,
|
||||||
|
this.position,
|
||||||
|
this.trainingScores,
|
||||||
|
this.height,
|
||||||
|
this.weight,
|
||||||
|
this.battingAverage,
|
||||||
|
this.isProfileUpdated,
|
||||||
|
this.isActive,
|
||||||
|
this.groupNotification,
|
||||||
|
this.communityNotification,
|
||||||
|
this.followerNotification,
|
||||||
|
this.newFollowerNotification,
|
||||||
|
this.directMessageNotification,
|
||||||
|
this.createdBy,
|
||||||
|
this.modifiedBy,
|
||||||
|
this.deletedAt,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt});
|
||||||
|
|
||||||
|
Profile.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
principalTypeXid = json['principal_type_xid'];
|
||||||
|
principalSourceXid = json['principal_source_xid'];
|
||||||
|
oneSignalPlayerId = json['one_signal_player_id'];
|
||||||
|
googleId = json['google_id'];
|
||||||
|
appleId = json['apple_id'];
|
||||||
|
facebookId = json['facebook_id'];
|
||||||
|
microsoftId = json['microsoft_id'];
|
||||||
|
userName = json['user_name'];
|
||||||
|
pin = json['pin'];
|
||||||
|
fullName = json['full_name'];
|
||||||
|
gender = json['gender'];
|
||||||
|
dateOfBirth = json['date_of_birth'];
|
||||||
|
phoneNumber = json['phone_number'];
|
||||||
|
otherPhoneNumber = json['other_phone_number'];
|
||||||
|
emailAddress = json['email_address'];
|
||||||
|
addressLine1 = json['address_line1'];
|
||||||
|
addressLine2 = json['address_line2'];
|
||||||
|
cityXid = json['city_xid'];
|
||||||
|
stateXid = json['state_xid'];
|
||||||
|
countryXid = json['country_xid'];
|
||||||
|
postCode = json['post_code'];
|
||||||
|
lastLoginDatetime = json['last_login_datetime'];
|
||||||
|
profilePhoto = json['profile_photo'];
|
||||||
|
referralCode = json['referral_code'];
|
||||||
|
description = json['description'];
|
||||||
|
about = json['about'];
|
||||||
|
position = json['position'];
|
||||||
|
trainingScores = json['training_scores'];
|
||||||
|
height = json['height'];
|
||||||
|
weight = json['weight'];
|
||||||
|
battingAverage = json['batting_average'];
|
||||||
|
isProfileUpdated = json['is_profile_updated'];
|
||||||
|
isActive = json['is_active'];
|
||||||
|
groupNotification = json['group_notification'];
|
||||||
|
communityNotification = json['community_notification'];
|
||||||
|
followerNotification = json['follower_notification'];
|
||||||
|
newFollowerNotification = json['new_follower_notification'];
|
||||||
|
directMessageNotification = json['direct_message_notification'];
|
||||||
|
createdBy = json['created_by'];
|
||||||
|
modifiedBy = json['modified_by'];
|
||||||
|
deletedAt = json['deleted_at'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
updatedAt = json['updated_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['principal_type_xid'] = this.principalTypeXid;
|
||||||
|
data['principal_source_xid'] = this.principalSourceXid;
|
||||||
|
data['one_signal_player_id'] = this.oneSignalPlayerId;
|
||||||
|
data['google_id'] = this.googleId;
|
||||||
|
data['apple_id'] = this.appleId;
|
||||||
|
data['facebook_id'] = this.facebookId;
|
||||||
|
data['microsoft_id'] = this.microsoftId;
|
||||||
|
data['user_name'] = this.userName;
|
||||||
|
data['pin'] = this.pin;
|
||||||
|
data['full_name'] = this.fullName;
|
||||||
|
data['gender'] = this.gender;
|
||||||
|
data['date_of_birth'] = this.dateOfBirth;
|
||||||
|
data['phone_number'] = this.phoneNumber;
|
||||||
|
data['other_phone_number'] = this.otherPhoneNumber;
|
||||||
|
data['email_address'] = this.emailAddress;
|
||||||
|
data['address_line1'] = this.addressLine1;
|
||||||
|
data['address_line2'] = this.addressLine2;
|
||||||
|
data['city_xid'] = this.cityXid;
|
||||||
|
data['state_xid'] = this.stateXid;
|
||||||
|
data['country_xid'] = this.countryXid;
|
||||||
|
data['post_code'] = this.postCode;
|
||||||
|
data['last_login_datetime'] = this.lastLoginDatetime;
|
||||||
|
data['profile_photo'] = this.profilePhoto;
|
||||||
|
data['referral_code'] = this.referralCode;
|
||||||
|
data['description'] = this.description;
|
||||||
|
data['about'] = this.about;
|
||||||
|
data['position'] = this.position;
|
||||||
|
data['training_scores'] = this.trainingScores;
|
||||||
|
data['height'] = this.height;
|
||||||
|
data['weight'] = this.weight;
|
||||||
|
data['batting_average'] = this.battingAverage;
|
||||||
|
data['is_profile_updated'] = this.isProfileUpdated;
|
||||||
|
data['is_active'] = this.isActive;
|
||||||
|
data['group_notification'] = this.groupNotification;
|
||||||
|
data['community_notification'] = this.communityNotification;
|
||||||
|
data['follower_notification'] = this.followerNotification;
|
||||||
|
data['new_follower_notification'] = this.newFollowerNotification;
|
||||||
|
data['direct_message_notification'] = this.directMessageNotification;
|
||||||
|
data['created_by'] = this.createdBy;
|
||||||
|
data['modified_by'] = this.modifiedBy;
|
||||||
|
data['deleted_at'] = this.deletedAt;
|
||||||
|
data['created_at'] = this.createdAt;
|
||||||
|
data['updated_at'] = this.updatedAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,823 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||||
|
import 'package:glassmorphism/glassmorphism.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
|
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||||
|
import 'package:regroup/Utils/Common/ImageUpload.dart';
|
||||||
|
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||||
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||||
|
import 'package:regroup/Utils/dialogs.dart';
|
||||||
|
import 'package:regroup/Utils/texts.dart';
|
||||||
|
import 'package:regroup/onboarding/Signup/View/Business/ViewModel/TellUsBusinessApi.dart';
|
||||||
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
|
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:path/path.dart' as path;
|
||||||
|
|
||||||
|
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||||
|
|
||||||
|
class LetusUnderstand extends StatefulWidget {
|
||||||
|
const LetusUnderstand({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LetusUnderstand> createState() => _LetusUnderstandState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LetusUnderstandState extends State<LetusUnderstand> {
|
||||||
|
TextEditingController busunesscontactcontroller = TextEditingController();
|
||||||
|
TextEditingController emailidcontroller = TextEditingController();
|
||||||
|
TextEditingController businesshandlecontroller = TextEditingController();
|
||||||
|
TextEditingController openinghourscontroller = TextEditingController();
|
||||||
|
TextEditingController websitelinkcontroller = TextEditingController();
|
||||||
|
TextEditingController googlereviewlinkcontroller = TextEditingController();
|
||||||
|
TextEditingController tagscontroller = TextEditingController();
|
||||||
|
|
||||||
|
bool isValidPhoneNumber(String phoneNumber) {
|
||||||
|
final RegExp phoneNumberExpression = RegExp(r"^0{10}$");
|
||||||
|
|
||||||
|
return !phoneNumberExpression.hasMatch(phoneNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
String logoFile = "";
|
||||||
|
String bannerFile = "";
|
||||||
|
|
||||||
|
bool isImageAdded = false;
|
||||||
|
bool isbannerAdded = false;
|
||||||
|
|
||||||
|
String extractFileName(String filePath) {
|
||||||
|
return path.basename(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
convertFileToMultiPart(String? file) async {
|
||||||
|
return await MultipartFile.fromFile(
|
||||||
|
file!,
|
||||||
|
filename: path.basename(file),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _letusUnderstandDone() async {
|
||||||
|
FormData? updata;
|
||||||
|
if (busunesscontactcontroller.text.isBlank! ||
|
||||||
|
emailidcontroller.text.isBlank! ||
|
||||||
|
businesshandlecontroller.text.isBlank! ||
|
||||||
|
openinghourscontroller.text.isBlank! ||
|
||||||
|
websitelinkcontroller.text.isBlank! ||
|
||||||
|
googlereviewlinkcontroller.text.isBlank! ||
|
||||||
|
tagscontroller.text.isBlank!) {
|
||||||
|
Get.snackbar(
|
||||||
|
'Error',
|
||||||
|
'Enter your credentials',
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
colorText: Colors.white,
|
||||||
|
);
|
||||||
|
} else if (logoFile == "") {
|
||||||
|
utils.showToast('Upload business logo!');
|
||||||
|
} else if (bannerFile == "") {
|
||||||
|
utils.showToast('Upload banner image!');
|
||||||
|
} else {
|
||||||
|
updata = FormData.fromMap({
|
||||||
|
"business_contact_number": busunesscontactcontroller.text,
|
||||||
|
"business_email": emailidcontroller.text,
|
||||||
|
"business_handle": businesshandlecontroller.text,
|
||||||
|
"opening_hours": openinghourscontroller.text,
|
||||||
|
"website_link": websitelinkcontroller.text,
|
||||||
|
"google_review_link": googlereviewlinkcontroller.text,
|
||||||
|
"tags": tagscontroller.text,
|
||||||
|
"business_logo": await convertFileToMultiPart(logoFile),
|
||||||
|
"banner_image": await convertFileToMultiPart(bannerFile),
|
||||||
|
});
|
||||||
|
|
||||||
|
final data = await BusinessAPI().letUsUnderstandApi(updata);
|
||||||
|
if (data.status == ResponseStatus.SUCCESS) {
|
||||||
|
// await global.setname();
|
||||||
|
Get.snackbar(
|
||||||
|
"Success!",
|
||||||
|
'success!',
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
|
||||||
|
Get.toNamed(RouteName.individualgroupstep3);
|
||||||
|
} else if (data.status == ResponseStatus.FAILED) {
|
||||||
|
Get.snackbar(
|
||||||
|
"Error!",
|
||||||
|
data.message,
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
// _controller.isTextFieldEnabled.value = true;
|
||||||
|
} else {
|
||||||
|
// btnController.reset();
|
||||||
|
Get.snackbar(
|
||||||
|
"Error!",
|
||||||
|
data.data['message'],
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
// _controller.isTextFieldEnabled.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _selectDuration(BuildContext context) async {
|
||||||
|
final int? picked = await showDialog<int>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return durationPickerDialog();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (picked != null && picked >= 0) {
|
||||||
|
setState(() {
|
||||||
|
openinghourscontroller.text = '$picked';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget durationPickerDialog() {
|
||||||
|
int selectedHour = 1;
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text('Select Duration'),
|
||||||
|
content: Container(
|
||||||
|
width: double.minPositive,
|
||||||
|
child: Container(
|
||||||
|
height: 200,
|
||||||
|
child: ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: 20,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
int hour = index + 1;
|
||||||
|
return ListTile(
|
||||||
|
title: Text('$hour hours'),
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
selectedHour = hour;
|
||||||
|
});
|
||||||
|
Navigator.of(context).pop(selectedHour);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
child: Text('Cancel'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
// Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
|
||||||
|
// Positioned(top: 310, right: -30, child: CommonBlurRightSecond()),
|
||||||
|
// Positioned(top: 540, left: -30, child: CommonBlurLeftBlue()),
|
||||||
|
// GlassmorphicContainer(
|
||||||
|
// width: MediaQuery.of(context).size.width,
|
||||||
|
// height:
|
||||||
|
// // 500.h,
|
||||||
|
// MediaQuery.of(context).size.height,
|
||||||
|
// borderRadius: 2,
|
||||||
|
// blur: 6,
|
||||||
|
// alignment: Alignment.bottomLeft,
|
||||||
|
// border: 2,
|
||||||
|
// linearGradient: LinearGradient(
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// colors: [
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// borderGradient: LinearGradient(
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// colors: [
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// child:
|
||||||
|
|
||||||
|
Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||||
|
fit: BoxFit.fill)),
|
||||||
|
),
|
||||||
|
|
||||||
|
ListView(children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.topRight,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(RouteName.communitycommitscreen);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'Skip',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp,
|
||||||
|
fontFamily: 'Helvetica',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
decorationColor: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
sizedBoxHeight(30.h),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: text16400white('Step 1 of 3')),
|
||||||
|
sizedBoxHeight(20.h),
|
||||||
|
Container(
|
||||||
|
width: 358.w,
|
||||||
|
height: 25.h,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 1, color: Color(0xFF434A53)),
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 8.w, vertical: 2.h),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 15,
|
||||||
|
height: 15,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment(0.98, -0.21),
|
||||||
|
end: Alignment(-0.98, 0.21),
|
||||||
|
colors: [
|
||||||
|
Color(0xA5D90B2E),
|
||||||
|
Color(0x42D90B2E)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
sizedBoxHeight(30.h),
|
||||||
|
Center(
|
||||||
|
child: text20400white('Let us understand you better')),
|
||||||
|
sizedBoxHeight(10.w),
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
width: 154.w,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 1,
|
||||||
|
strokeAlign: BorderSide.strokeAlignCenter,
|
||||||
|
color: Color(0xFF858585),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
sizedBoxHeight(30.h),
|
||||||
|
text16400white('Business contact number'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: busunesscontactcontroller,
|
||||||
|
|
||||||
|
texttype: TextInputType.phone,
|
||||||
|
hintText: "Enter your business contact number",
|
||||||
|
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/phone.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value.isEmpty) {
|
||||||
|
return 'Enter your phone number';
|
||||||
|
} else if (!RegExp(r'(^(?:[+0]9)?[0-9]{10}$)')
|
||||||
|
.hasMatch(value)) {
|
||||||
|
return 'Enter a valid phone number';
|
||||||
|
} else if (!isValidPhoneNumber(value)) {
|
||||||
|
return 'Phone number cannot contain 10 zeros';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(10),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
text16400white('Business email address'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: emailidcontroller,
|
||||||
|
hintText: "Enter your email address",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
SizedBox(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/png/mail.png',
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// validatorText: "Email Id",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your e-mail address';
|
||||||
|
}
|
||||||
|
if (!RegExp(
|
||||||
|
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
|
||||||
|
.hasMatch(value)) {
|
||||||
|
return 'Enter a valid e-mail address';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// sizedBoxHeight(10.h),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
|
||||||
|
text16400white('Business handle'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: businesshandlecontroller,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your business handle",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/user.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your business handle';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// sizedBoxHeight(10.h),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
|
||||||
|
text16400white('Opening hours'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
_selectDuration(context);
|
||||||
|
},
|
||||||
|
child: AbsorbPointer(
|
||||||
|
child: CustomTextFormField(
|
||||||
|
textEditingController: openinghourscontroller,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your opening hours",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Container(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
child: Center(
|
||||||
|
child: Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/clock.png',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your opening hours';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[a-zA-ZS0-9 ]')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// sizedBoxHeight(10.h),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
|
||||||
|
text16400white('Website link'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: websitelinkcontroller,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your website link",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/globe.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your website link';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[a-zA-ZS0-9 ]')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// sizedBoxHeight(10.h),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
|
||||||
|
text16400white('Google review link'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: googlereviewlinkcontroller,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your google review link",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/globe.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your google review link';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[a-zA-ZS0-9 ]')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// sizedBoxHeight(10.h),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
|
||||||
|
text16400white('Tags'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: tagscontroller,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your tags",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/hashtag.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your tags';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
// FilteringTextInputFormatter.allow(
|
||||||
|
// RegExp('[a-zA-ZS0-9 ]')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// sizedBoxHeight(10.h),
|
||||||
|
sizedBoxHeight(15.h),
|
||||||
|
|
||||||
|
text16400white('Images upload'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
logoFile != "" && isImageAdded
|
||||||
|
? Container(
|
||||||
|
width: 169,
|
||||||
|
height: 115,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment(0.98, -0.21),
|
||||||
|
end: Alignment(-0.98, 0.21),
|
||||||
|
colors: [
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.30000001192092896),
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.2800000011920929)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 0.50, color: Color(0xFF7E7E7E)),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Image.file(
|
||||||
|
File(logoFile),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: double.infinity,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
// top: 0,
|
||||||
|
// left: 0,
|
||||||
|
right: 5,
|
||||||
|
bottom: 5,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// Clear the list and show the upload button
|
||||||
|
logoFile = "";
|
||||||
|
isImageAdded = false;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 27,
|
||||||
|
height: 27,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: Color(0xFF7E7E7E),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
5)),
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.delete_outline_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
)
|
||||||
|
|
||||||
|
// SvgPicture.asset(
|
||||||
|
// "assets/images/SVG/trash-2.svg",
|
||||||
|
// width: 17.w,
|
||||||
|
// height: 17.h,
|
||||||
|
// ),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
ImageUploadBottomSheet().showModal(
|
||||||
|
context,
|
||||||
|
false,
|
||||||
|
(result) {
|
||||||
|
var filenameresult =
|
||||||
|
extractFileName(result);
|
||||||
|
logoFile = result;
|
||||||
|
isImageAdded = true;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 169,
|
||||||
|
height: 115,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment(0.98, -0.21),
|
||||||
|
end: Alignment(-0.98, 0.21),
|
||||||
|
colors: [
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.30000001192092896),
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.2800000011920929)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 0.50,
|
||||||
|
color: Color(0xFF7E7E7E)),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/png/onlycamera.png'),
|
||||||
|
sizedBoxHeight(5.h),
|
||||||
|
Text(
|
||||||
|
'Upload business \nlogo',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bannerFile != "" && isbannerAdded
|
||||||
|
? Container(
|
||||||
|
width: 169,
|
||||||
|
height: 115,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment(0.98, -0.21),
|
||||||
|
end: Alignment(-0.98, 0.21),
|
||||||
|
colors: [
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.30000001192092896),
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.2800000011920929)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 0.50, color: Color(0xFF7E7E7E)),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Image.file(
|
||||||
|
File(bannerFile),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: double.infinity,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
// top: 0,
|
||||||
|
// left: 0,
|
||||||
|
right: 5,
|
||||||
|
bottom: 5,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// Clear the list and show the upload button
|
||||||
|
bannerFile = "";
|
||||||
|
isbannerAdded = false;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 27,
|
||||||
|
height: 27,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: Color(0xFF7E7E7E),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
5)),
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.delete_outline_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
)
|
||||||
|
|
||||||
|
// SvgPicture.asset(
|
||||||
|
// "assets/images/SVG/trash-2.svg",
|
||||||
|
// width: 17.w,
|
||||||
|
// height: 17.h,
|
||||||
|
// ),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
ImageUploadBottomSheet().showModal(
|
||||||
|
context,
|
||||||
|
false,
|
||||||
|
(result) {
|
||||||
|
var filenameresult =
|
||||||
|
extractFileName(result);
|
||||||
|
bannerFile = result;
|
||||||
|
isbannerAdded = true;
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 169,
|
||||||
|
height: 115,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment(0.98, -0.21),
|
||||||
|
end: Alignment(-0.98, 0.21),
|
||||||
|
colors: [
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.30000001192092896),
|
||||||
|
Colors.white
|
||||||
|
.withOpacity(0.2800000011920929)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 0.50,
|
||||||
|
color: Color(0xFF7E7E7E)),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/png/onlycamera.png'),
|
||||||
|
sizedBoxHeight(5.h),
|
||||||
|
Text(
|
||||||
|
'Upload banner \nimage',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 14.sp,
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(40.h),
|
||||||
|
CustomButton(
|
||||||
|
text: 'Continue',
|
||||||
|
onPressed: () {
|
||||||
|
// Get.toNamed(RouteName.businessSelectgroupstep2);
|
||||||
|
_letusUnderstandDone();
|
||||||
|
})
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
])
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
334
lib/onboarding/Signup/View/Business/View/tellusbusiness.dart
Normal file
334
lib/onboarding/Signup/View/Business/View/tellusbusiness.dart
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:glassmorphism/glassmorphism.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
|
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||||
|
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||||
|
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||||
|
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||||
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||||
|
import 'package:regroup/Utils/dialogs.dart';
|
||||||
|
import 'package:regroup/Utils/texts.dart';
|
||||||
|
import 'package:regroup/onboarding/Signup/View/Business/ViewModel/TellUsBusinessApi.dart';
|
||||||
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
|
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||||
|
|
||||||
|
class TellusaboutBusiness extends StatefulWidget {
|
||||||
|
const TellusaboutBusiness({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TellusaboutBusiness> createState() => _TellusaboutBusinessState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||||
|
TextEditingController businessownerController = TextEditingController();
|
||||||
|
TextEditingController businessNameController = TextEditingController();
|
||||||
|
TextEditingController businesslocationController = TextEditingController();
|
||||||
|
|
||||||
|
final List<String> _businesslist = [
|
||||||
|
'Retail',
|
||||||
|
'Hospitality',
|
||||||
|
'Event provider',
|
||||||
|
'Coaching services',
|
||||||
|
'Recruitment & Scouting',
|
||||||
|
'Healthcare & Wellbeing',
|
||||||
|
'Other',
|
||||||
|
];
|
||||||
|
|
||||||
|
String _selectedbusinesstype = '';
|
||||||
|
// String business_type = '';
|
||||||
|
|
||||||
|
void _onItemSelected(String value) {
|
||||||
|
setState(() {
|
||||||
|
_selectedbusinesstype = value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// String pagename = Get.arguments["pageroute"];
|
||||||
|
|
||||||
|
String getBusinessTypeId(String selectedBusinessType) {
|
||||||
|
if (selectedBusinessType.contains("Retail")) {
|
||||||
|
return '1';
|
||||||
|
} else if (selectedBusinessType.contains("Hospitality")) {
|
||||||
|
return '2';
|
||||||
|
} else if (selectedBusinessType.contains("Event provider")) {
|
||||||
|
return '3';
|
||||||
|
} else if (selectedBusinessType.contains("Coaching services")) {
|
||||||
|
return '4';
|
||||||
|
} else if (selectedBusinessType.contains("Recruitment & Scouting")) {
|
||||||
|
return '5';
|
||||||
|
} else if (selectedBusinessType.contains("Healthcare & Wellbeing")) {
|
||||||
|
return '6';
|
||||||
|
} else if (selectedBusinessType.contains("Other")) {
|
||||||
|
return '7';
|
||||||
|
} else {
|
||||||
|
return '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _tellUsBusinessDone() async {
|
||||||
|
if (businessownerController.text.isBlank! ||
|
||||||
|
businessNameController.text.isBlank! ||
|
||||||
|
businesslocationController.text.isBlank!) {
|
||||||
|
Get.snackbar(
|
||||||
|
'Error',
|
||||||
|
'Enter your credentials',
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
colorText: Colors.white,
|
||||||
|
);
|
||||||
|
} else if (_selectedbusinesstype.isEmpty) {
|
||||||
|
utils.showToast('Please select a business type');
|
||||||
|
} else {
|
||||||
|
String businessTypeId = getBusinessTypeId(_selectedbusinesstype);
|
||||||
|
Map<String, String> updata = {
|
||||||
|
"business_name": businessNameController.text,
|
||||||
|
"business_owner_name": businessownerController.text,
|
||||||
|
"business_location": businessownerController.text,
|
||||||
|
"business_type_xid": businessTypeId,
|
||||||
|
};
|
||||||
|
final data = await BusinessAPI().tellUsBusinessApi(updata);
|
||||||
|
if (data.status == ResponseStatus.SUCCESS) {
|
||||||
|
// await global.setname();
|
||||||
|
Get.snackbar(
|
||||||
|
"Success!",
|
||||||
|
'success!',
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
|
||||||
|
// if (pagename == "nextscreen") {
|
||||||
|
Get.toNamed(RouteName.businessletusunderstandstep1);
|
||||||
|
|
||||||
|
// } else if (pagename == "mainscreen") {
|
||||||
|
// Get.toNamed(RouteName.mainscreen);
|
||||||
|
// }
|
||||||
|
|
||||||
|
} else if (data.status == ResponseStatus.FAILED) {
|
||||||
|
Get.snackbar(
|
||||||
|
"Error!",
|
||||||
|
data.message,
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
// _controller.isTextFieldEnabled.value = true;
|
||||||
|
} else {
|
||||||
|
// btnController.reset();
|
||||||
|
Get.snackbar(
|
||||||
|
"Error!",
|
||||||
|
data.data['message'],
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
// _controller.isTextFieldEnabled.value = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||||
|
body: Stack(children: [
|
||||||
|
// Positioned(top: 90, left: -30, child: CommonBlurLeftSecond()),
|
||||||
|
// Positioned(top: 300, right: -30, child: CommonBlurRightSecond()),
|
||||||
|
// Positioned(top: 490, left: -30, child: CommonBlurLeftBlue()),
|
||||||
|
// GlassmorphicContainer(
|
||||||
|
// width: MediaQuery.of(context).size.width,
|
||||||
|
// height:
|
||||||
|
// // 500.h,
|
||||||
|
// MediaQuery.of(context).size.height,
|
||||||
|
// borderRadius: 2,
|
||||||
|
// blur: 6,
|
||||||
|
// alignment: Alignment.bottomLeft,
|
||||||
|
// border: 2,
|
||||||
|
// linearGradient: LinearGradient(
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// colors: [
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// borderGradient: LinearGradient(
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// colors: [
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
|
// Color(0XFF222935).withOpacity(0.60),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||||
|
fit: BoxFit.fill)),
|
||||||
|
),
|
||||||
|
|
||||||
|
ListView(physics: ScrollPhysics(), children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// const Spacer(flex: 1),
|
||||||
|
sizedBoxHeight(60.h),
|
||||||
|
Center(child: text20400white('Tell us about your business')),
|
||||||
|
sizedBoxHeight(10.w),
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
width: 154,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
width: 1,
|
||||||
|
strokeAlign: BorderSide.strokeAlignCenter,
|
||||||
|
color: Color(0xFF858585),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
sizedBoxHeight(40.h),
|
||||||
|
text16400white('Business owner name'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: businessownerController,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your business owner name",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/user.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business owner name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your business owner name';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text16400white('Business name'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: businessNameController,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your business name",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/briefcase.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your business name ';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text16400white('Business location'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: businesslocationController,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your business location",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/location.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your business location",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your business location ';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text16400white('Type of business'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomDropDownWidgetSignup(
|
||||||
|
header: 'Select type of business',
|
||||||
|
title: '',
|
||||||
|
listData: _businesslist,
|
||||||
|
onItemSelected: _onItemSelected,
|
||||||
|
leadingImage:
|
||||||
|
Image.asset('assets/images/png/briefcase.png'),
|
||||||
|
),
|
||||||
|
|
||||||
|
sizedBoxHeight(50.h),
|
||||||
|
CustomButton(
|
||||||
|
text: "Continue",
|
||||||
|
onPressed: () {
|
||||||
|
_tellUsBusinessDone();
|
||||||
|
// if (_selectedbusinesstype.isNotEmpty) {
|
||||||
|
// Get.toNamed(RouteName.businessletusunderstandstep1);
|
||||||
|
|
||||||
|
// // Get.to(() => BusinessPage());
|
||||||
|
// } else {
|
||||||
|
// // Handle case where no selection is made
|
||||||
|
// utils.showToast('Please select an gender type');
|
||||||
|
// }
|
||||||
|
}),
|
||||||
|
sizedBoxHeight(30.h),
|
||||||
|
// const Spacer(
|
||||||
|
// flex: 3,
|
||||||
|
// )
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
])
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import 'package:regroup/Common/api_urls.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
|
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
class BusinessAPI {
|
||||||
|
BusinessAPI();
|
||||||
|
|
||||||
|
Future<ResponseData<dynamic>> tellUsBusinessApi(var data) async {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
final response = await NetworkApiServices().postApi(
|
||||||
|
data,
|
||||||
|
ApiUrls.tellUsBusinessApi
|
||||||
|
// "https://regroup.betadelivery.com/api/v1/tell-us-about-your-business",
|
||||||
|
// optionalpar: true
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
|
//Map<String, dynamic> responseData = jsonDecode(response.data);
|
||||||
|
if (response.data['status'] == 'success') {
|
||||||
|
// LoginModel loginObj = LoginModel.fromJson(response.data);
|
||||||
|
} else {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
response.data['message'], ResponseStatus.FAILED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Future<ResponseData<dynamic>> letUsUnderstandApi(var data) async {
|
||||||
|
final response = await NetworkApiServices().postApi(
|
||||||
|
data,
|
||||||
|
ApiUrls.letUsUnderstandApi,
|
||||||
|
// "https://regroup.betadelivery.com/api/v1/update-business-profile-step-1",
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
|
//Map<String, dynamic> responseData = jsonDecode(response.data);
|
||||||
|
if (response.data['status'] == "success") {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
response.data['message'], ResponseStatus.SUCCESS);
|
||||||
|
} else {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
response.data['message'], ResponseStatus.FAILED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,672 +0,0 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:glassmorphism/glassmorphism.dart';
|
|
||||||
import 'package:regroup/Common/controller/CommonTextFormField.dart';
|
|
||||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
|
||||||
import 'package:regroup/Utils/Common/ImageUpload.dart';
|
|
||||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
|
||||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
|
||||||
import 'package:regroup/Utils/texts.dart';
|
|
||||||
import 'package:regroup/resources/routes/route_name.dart';
|
|
||||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
|
||||||
|
|
||||||
class LetusUnderstand extends StatefulWidget {
|
|
||||||
const LetusUnderstand({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<LetusUnderstand> createState() => _LetusUnderstandState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _LetusUnderstandState extends State<LetusUnderstand> {
|
|
||||||
TextEditingController busunesscontactcontroller = TextEditingController();
|
|
||||||
TextEditingController emailidcontroller = TextEditingController();
|
|
||||||
TextEditingController businesshandlecontroller = TextEditingController();
|
|
||||||
TextEditingController openinghourscontroller = TextEditingController();
|
|
||||||
TextEditingController websitelinkcontroller = TextEditingController();
|
|
||||||
TextEditingController googlereviewlinkcontroller = TextEditingController();
|
|
||||||
|
|
||||||
bool isValidPhoneNumber(String phoneNumber) {
|
|
||||||
final RegExp phoneNumberExpression = RegExp(r"^0{10}$");
|
|
||||||
|
|
||||||
return !phoneNumberExpression.hasMatch(phoneNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<File?> filePath = [];
|
|
||||||
List<File?> bannerPath = [];
|
|
||||||
|
|
||||||
bool isImageAdded = false;
|
|
||||||
bool isbannerAdded = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
|
||||||
body: Stack(
|
|
||||||
children: [
|
|
||||||
Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
|
|
||||||
Positioned(top: 310, right: -30, child: CommonBlurRightSecond()),
|
|
||||||
Positioned(top: 540, left: -30, child: CommonBlurLeftBlue()),
|
|
||||||
GlassmorphicContainer(
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
height:
|
|
||||||
// 500.h,
|
|
||||||
MediaQuery.of(context).size.height,
|
|
||||||
borderRadius: 2,
|
|
||||||
blur: 6,
|
|
||||||
alignment: Alignment.bottomLeft,
|
|
||||||
border: 2,
|
|
||||||
linearGradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
borderGradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: ListView(children: [
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.topRight,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(RouteName.communitycommitscreen);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
'Skip',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 16.sp,
|
|
||||||
fontFamily: 'Helvetica',
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
decorationColor: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(30.h),
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: text16400white('Step 1 of 3')),
|
|
||||||
sizedBoxHeight(20.h),
|
|
||||||
Container(
|
|
||||||
width: 358.w,
|
|
||||||
height: 25.h,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 1, color: Color(0xFF434A53)),
|
|
||||||
borderRadius: BorderRadius.circular(30),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 8.w, vertical: 2.h),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 15,
|
|
||||||
height: 15,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment(0.98, -0.21),
|
|
||||||
end: Alignment(-0.98, 0.21),
|
|
||||||
colors: [
|
|
||||||
Color(0xA5D90B2E),
|
|
||||||
Color(0x42D90B2E)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(30),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(30.h),
|
|
||||||
Center(
|
|
||||||
child:
|
|
||||||
text20400white('Let us understand you better')),
|
|
||||||
sizedBoxHeight(10.w),
|
|
||||||
Center(
|
|
||||||
child: Container(
|
|
||||||
width: 154.w,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 1,
|
|
||||||
strokeAlign: BorderSide.strokeAlignCenter,
|
|
||||||
color: Color(0xFF858585),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(30.h),
|
|
||||||
text16400white('Business contact number'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: busunesscontactcontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your business contact number",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/phone.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value.isEmpty) {
|
|
||||||
return 'Enter your phone number';
|
|
||||||
} else if (!RegExp(r'(^(?:[+0]9)?[0-9]{10}$)')
|
|
||||||
.hasMatch(value)) {
|
|
||||||
return 'Enter a valid phone number';
|
|
||||||
} else if (!isValidPhoneNumber(value)) {
|
|
||||||
return 'Phone number cannot contain 10 zeros';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
text16400white('Business email address'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: emailidcontroller,
|
|
||||||
hintText: "Enter your email address",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
SizedBox(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/png/mail.png',
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// validatorText: "Email Id",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your e-mail address';
|
|
||||||
}
|
|
||||||
if (!RegExp(
|
|
||||||
r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
|
|
||||||
.hasMatch(value)) {
|
|
||||||
return 'Enter a valid e-mail address';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter()
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// sizedBoxHeight(10.h),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
|
|
||||||
text16400white('Business handle'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: businesshandlecontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your business handle",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/user.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your business handle';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-Z ]'))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// sizedBoxHeight(10.h),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
|
|
||||||
text16400white('Opening hours'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: openinghourscontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your opening hours",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/clock.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your opening hours';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-ZS0-9 ]')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// sizedBoxHeight(10.h),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
|
|
||||||
text16400white('Website link'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: websitelinkcontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your website link",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/globe.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your website link';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-ZS0-9 ]')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// sizedBoxHeight(10.h),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
|
|
||||||
text16400white('Google review link'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: googlereviewlinkcontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your google review link",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/globe.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your google review link';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-ZS0-9 ]')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// sizedBoxHeight(10.h),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
|
|
||||||
text16400white('Tags'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: googlereviewlinkcontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your Tags",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/hashtag.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your tags';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-ZS0-9 ]')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// sizedBoxHeight(10.h),
|
|
||||||
sizedBoxHeight(15.h),
|
|
||||||
|
|
||||||
text16400white('Images upload'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
filePath.isNotEmpty && isImageAdded
|
|
||||||
? Container(
|
|
||||||
width: 169,
|
|
||||||
height: 115,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment(0.98, -0.21),
|
|
||||||
end: Alignment(-0.98, 0.21),
|
|
||||||
colors: [
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.30000001192092896),
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.2800000011920929)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 0.50,
|
|
||||||
color: Color(0xFF7E7E7E)),
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Image.file(
|
|
||||||
filePath[0]!,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: double.infinity,
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
// top: 0,
|
|
||||||
// left: 0,
|
|
||||||
right: 5,
|
|
||||||
bottom: 5,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
// Clear the list and show the upload button
|
|
||||||
filePath.clear();
|
|
||||||
isImageAdded = false;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 27,
|
|
||||||
height: 27,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
color: Color(0xFF7E7E7E),
|
|
||||||
shape:
|
|
||||||
RoundedRectangleBorder(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius
|
|
||||||
.circular(
|
|
||||||
5)),
|
|
||||||
),
|
|
||||||
child: Icon(
|
|
||||||
Icons
|
|
||||||
.delete_outline_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
)
|
|
||||||
|
|
||||||
// SvgPicture.asset(
|
|
||||||
// "assets/images/SVG/trash-2.svg",
|
|
||||||
// width: 17.w,
|
|
||||||
// height: 17.h,
|
|
||||||
// ),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
ImageUploadBottomSheet().showModal(
|
|
||||||
context,
|
|
||||||
false,
|
|
||||||
(result) {
|
|
||||||
var file = File(result);
|
|
||||||
|
|
||||||
// filePath[0] = file;
|
|
||||||
// filePath.clear();
|
|
||||||
filePath.add(file);
|
|
||||||
isImageAdded = true;
|
|
||||||
// isImageAdded = true;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 169,
|
|
||||||
height: 115,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment(0.98, -0.21),
|
|
||||||
end: Alignment(-0.98, 0.21),
|
|
||||||
colors: [
|
|
||||||
Colors.white.withOpacity(
|
|
||||||
0.30000001192092896),
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.2800000011920929)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 0.50,
|
|
||||||
color: Color(0xFF7E7E7E)),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/png/onlycamera.png'),
|
|
||||||
sizedBoxHeight(5.h),
|
|
||||||
Text(
|
|
||||||
'Upload business \nlogo',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
bannerPath.isNotEmpty && isbannerAdded
|
|
||||||
? Container(
|
|
||||||
width: 169,
|
|
||||||
height: 115,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment(0.98, -0.21),
|
|
||||||
end: Alignment(-0.98, 0.21),
|
|
||||||
colors: [
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.30000001192092896),
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.2800000011920929)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 0.50,
|
|
||||||
color: Color(0xFF7E7E7E)),
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Image.file(
|
|
||||||
bannerPath[0]!,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: double.infinity,
|
|
||||||
),
|
|
||||||
Positioned(
|
|
||||||
// top: 0,
|
|
||||||
// left: 0,
|
|
||||||
right: 5,
|
|
||||||
bottom: 5,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
// Clear the list and show the upload button
|
|
||||||
bannerPath.clear();
|
|
||||||
isbannerAdded = false;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 27,
|
|
||||||
height: 27,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
color: Color(0xFF7E7E7E),
|
|
||||||
shape:
|
|
||||||
RoundedRectangleBorder(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius
|
|
||||||
.circular(
|
|
||||||
5)),
|
|
||||||
),
|
|
||||||
child: Icon(
|
|
||||||
Icons
|
|
||||||
.delete_outline_outlined,
|
|
||||||
color: Colors.white,
|
|
||||||
)
|
|
||||||
|
|
||||||
// SvgPicture.asset(
|
|
||||||
// "assets/images/SVG/trash-2.svg",
|
|
||||||
// width: 17.w,
|
|
||||||
// height: 17.h,
|
|
||||||
// ),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
ImageUploadBottomSheet().showModal(
|
|
||||||
context,
|
|
||||||
false,
|
|
||||||
(result) {
|
|
||||||
var file = File(result);
|
|
||||||
|
|
||||||
// filePath[0] = file;
|
|
||||||
// filePath.clear();
|
|
||||||
bannerPath.add(file);
|
|
||||||
isbannerAdded = true;
|
|
||||||
// isImageAdded = true;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 169,
|
|
||||||
height: 115,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment(0.98, -0.21),
|
|
||||||
end: Alignment(-0.98, 0.21),
|
|
||||||
colors: [
|
|
||||||
Colors.white.withOpacity(
|
|
||||||
0.30000001192092896),
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.2800000011920929)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 0.50,
|
|
||||||
color: Color(0xFF7E7E7E)),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/png/onlycamera.png'),
|
|
||||||
sizedBoxHeight(5.h),
|
|
||||||
Text(
|
|
||||||
'Upload banner \nimage',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.white,
|
|
||||||
fontSize: 14.sp,
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(40.h),
|
|
||||||
CustomButton(text: 'Continue', onPressed: () {
|
|
||||||
Get.toNamed(RouteName.businessSelectgroupstep2);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
])),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,235 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:glassmorphism/glassmorphism.dart';
|
|
||||||
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
|
||||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
|
||||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
|
||||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
|
||||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
|
||||||
import 'package:regroup/Utils/dialogs.dart';
|
|
||||||
import 'package:regroup/Utils/texts.dart';
|
|
||||||
import 'package:regroup/resources/routes/route_name.dart';
|
|
||||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
|
||||||
|
|
||||||
class TellusaboutBusiness extends StatefulWidget {
|
|
||||||
const TellusaboutBusiness({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<TellusaboutBusiness> createState() => _TellusaboutBusinessState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
|
||||||
TextEditingController businessownerController = TextEditingController();
|
|
||||||
TextEditingController businessNameController = TextEditingController();
|
|
||||||
TextEditingController businesslocation = TextEditingController();
|
|
||||||
|
|
||||||
final List<String> _businesslist = [
|
|
||||||
'Retail',
|
|
||||||
'Hospitality',
|
|
||||||
'Event provider',
|
|
||||||
'Coaching services',
|
|
||||||
'Recruitment & Scouting',
|
|
||||||
'Healthcare & Wellbeing',
|
|
||||||
'Other',
|
|
||||||
];
|
|
||||||
|
|
||||||
String _selectedbusinesstype = '';
|
|
||||||
|
|
||||||
void _onItemSelected(String value) {
|
|
||||||
setState(() {
|
|
||||||
_selectedbusinesstype = value;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
|
||||||
body: Stack(
|
|
||||||
children: [
|
|
||||||
Positioned(top: 90, left: -30, child: CommonBlurLeftSecond()),
|
|
||||||
Positioned(top: 300, right: -30, child: CommonBlurRightSecond()),
|
|
||||||
Positioned(top: 490, left: -30, child: CommonBlurLeftBlue()),
|
|
||||||
GlassmorphicContainer(
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
height:
|
|
||||||
// 500.h,
|
|
||||||
MediaQuery.of(context).size.height,
|
|
||||||
borderRadius: 2,
|
|
||||||
blur: 6,
|
|
||||||
alignment: Alignment.bottomLeft,
|
|
||||||
border: 2,
|
|
||||||
linearGradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
borderGradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: ListView(physics: ScrollPhysics(), children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
// const Spacer(flex: 1),
|
|
||||||
sizedBoxHeight(60.h),
|
|
||||||
Center(
|
|
||||||
child:
|
|
||||||
text20400white('Tell us about your business')),
|
|
||||||
sizedBoxHeight(10.w),
|
|
||||||
Center(
|
|
||||||
child: Container(
|
|
||||||
width: 154,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(
|
|
||||||
width: 1,
|
|
||||||
strokeAlign: BorderSide.strokeAlignCenter,
|
|
||||||
color: Color(0xFF858585),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(40.h),
|
|
||||||
text16400white('Business owner name'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: businessownerController,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your business owner name",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/user.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business owner name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your business owner name';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-Z ]'))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
text16400white('Business name'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: businessNameController,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your business name",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/briefcase.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your business name ';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-Z ]'))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
text16400white('Business location'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: businessNameController,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your business location",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/location.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your business location",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your business location ';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-Z ]'))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
text16400white('Type of business'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomDropDownWidgetSignup(
|
|
||||||
header: 'Select type of business',
|
|
||||||
title: '',
|
|
||||||
listData: _businesslist,
|
|
||||||
onItemSelected: _onItemSelected,
|
|
||||||
leadingImage:
|
|
||||||
Image.asset('assets/images/png/briefcase.png'),
|
|
||||||
),
|
|
||||||
|
|
||||||
sizedBoxHeight(50.h),
|
|
||||||
CustomButton(
|
|
||||||
text: "Continue",
|
|
||||||
onPressed: () {
|
|
||||||
if (_selectedbusinesstype.isNotEmpty) {
|
|
||||||
Get.toNamed(RouteName.businessletusunderstandstep1);
|
|
||||||
|
|
||||||
// Get.to(() => BusinessPage());
|
|
||||||
} else {
|
|
||||||
// Handle case where no selection is made
|
|
||||||
utils.showToast('Please select an gender type');
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
sizedBoxHeight(30.h),
|
|
||||||
// const Spacer(
|
|
||||||
// flex: 3,
|
|
||||||
// )
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
])),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -143,7 +143,8 @@ class _SelectIndividualGroupState extends State<SelectIndividualGroup> {
|
|||||||
Color(0XFF222935).withOpacity(0.60),
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Padding(
|
child:
|
||||||
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 16.w, vertical: 50.h),
|
horizontal: 16.w, vertical: 50.h),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
|||||||
TextEditingController datecontroller = TextEditingController();
|
TextEditingController datecontroller = TextEditingController();
|
||||||
TextEditingController locationcontroller = TextEditingController();
|
TextEditingController locationcontroller = TextEditingController();
|
||||||
|
|
||||||
|
// String pagename = Get.arguments["pageroute"];
|
||||||
|
|
||||||
|
|
||||||
DateTime? _selectedDate;
|
DateTime? _selectedDate;
|
||||||
final photographController = TextEditingController();
|
final photographController = TextEditingController();
|
||||||
|
|
||||||
@@ -161,7 +164,12 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
|||||||
utils.showToast("tell us done Successfully!");
|
utils.showToast("tell us done Successfully!");
|
||||||
Get.back();
|
Get.back();
|
||||||
// Get.toNamed(RouteName.individualprofilestep1);
|
// Get.toNamed(RouteName.individualprofilestep1);
|
||||||
|
// if (pagename == "nextscreen") {
|
||||||
Get.toNamed(RouteName.individualactivitystep2);
|
Get.toNamed(RouteName.individualactivitystep2);
|
||||||
|
|
||||||
|
// } else if (pagename == "mainscreen") {
|
||||||
|
// Get.toNamed(RouteName.mainscreen);
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
Get.back();
|
Get.back();
|
||||||
return utils.showToast(data.message);
|
return utils.showToast(data.message);
|
||||||
@@ -170,124 +178,106 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GestureDetector(
|
return WillPopScope(
|
||||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
onWillPop: () async {
|
||||||
child: Scaffold(
|
SystemNavigator.pop();
|
||||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
Navigator.pop(context);
|
||||||
body: Stack(
|
return true;
|
||||||
children: [
|
},
|
||||||
Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
|
child: GestureDetector(
|
||||||
Positioned(top: 310, right: -30, child: CommonBlurRightSecond()),
|
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
|
child: Scaffold(
|
||||||
GlassmorphicContainer(
|
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||||
width: MediaQuery.of(context).size.width,
|
body: Stack(
|
||||||
height:
|
children: [
|
||||||
// 500.h,
|
Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
|
||||||
MediaQuery.of(context).size.height,
|
Positioned(top: 310, right: -30, child: CommonBlurRightSecond()),
|
||||||
borderRadius: 2,
|
Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
|
||||||
blur: 6,
|
GlassmorphicContainer(
|
||||||
alignment: Alignment.bottomLeft,
|
width: MediaQuery.of(context).size.width,
|
||||||
border: 2,
|
height:
|
||||||
linearGradient: LinearGradient(
|
// 500.h,
|
||||||
begin: Alignment.topCenter,
|
MediaQuery.of(context).size.height,
|
||||||
end: Alignment.bottomCenter,
|
borderRadius: 2,
|
||||||
colors: [
|
blur: 6,
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
alignment: Alignment.bottomLeft,
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
border: 2,
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
linearGradient: LinearGradient(
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
borderGradient: LinearGradient(
|
borderGradient: LinearGradient(
|
||||||
begin: Alignment.topCenter,
|
begin: Alignment.topCenter,
|
||||||
end: Alignment.bottomCenter,
|
end: Alignment.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
Color(0XFF222935).withOpacity(0.60),
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: ListView(physics: ScrollPhysics(), children: [
|
child: ListView(physics: ScrollPhysics(), children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// const Spacer(flex: 1),
|
// const Spacer(flex: 1),
|
||||||
sizedBoxHeight(50.h),
|
sizedBoxHeight(50.h),
|
||||||
Center(
|
Center(
|
||||||
child: text20400white('Tell us about yourself')),
|
child: text20400white('Tell us about yourself')),
|
||||||
sizedBoxHeight(10.w),
|
sizedBoxHeight(10.w),
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 154,
|
width: 154,
|
||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 1,
|
width: 1,
|
||||||
strokeAlign: BorderSide.strokeAlignCenter,
|
strokeAlign: BorderSide.strokeAlignCenter,
|
||||||
color: Color(0xFF858585),
|
color: Color(0xFF858585),
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(20.h),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
ImageUploadBottomSheet().showModal(
|
|
||||||
context,
|
|
||||||
false,
|
|
||||||
(result) {
|
|
||||||
print("File path is $result");
|
|
||||||
editProfileImage.profilePicPath.value =
|
|
||||||
result;
|
|
||||||
var filenameresult = extractFileName(result);
|
|
||||||
print("File name is $filenameresult");
|
|
||||||
photographController.text = filenameresult;
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Stack(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
|
||||||
// Outer circle
|
|
||||||
Container(
|
|
||||||
width: 139.w,
|
|
||||||
height: 139.h,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
color: Colors.transparent,
|
|
||||||
border: Border.all(
|
|
||||||
color: Color(0XFFD90B2E)
|
|
||||||
.withOpacity(0.50),
|
|
||||||
width: 2),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Middle circle
|
)),
|
||||||
Container(
|
),
|
||||||
width: 119.w,
|
sizedBoxHeight(20.h),
|
||||||
height: 119.h,
|
GestureDetector(
|
||||||
decoration: BoxDecoration(
|
onTap: () {
|
||||||
shape: BoxShape.circle,
|
ImageUploadBottomSheet().showModal(
|
||||||
color: Colors.transparent,
|
context,
|
||||||
border: Border.all(
|
false,
|
||||||
color: Color(0XFFD90B2E)
|
(result) {
|
||||||
.withOpacity(0.50),
|
print("File path is $result");
|
||||||
width: 2),
|
editProfileImage.profilePicPath.value =
|
||||||
),
|
result;
|
||||||
),
|
var filenameresult = extractFileName(result);
|
||||||
// Inner circle
|
print("File name is $filenameresult");
|
||||||
Container(
|
photographController.text = filenameresult;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
// Outer circle
|
||||||
|
Container(
|
||||||
|
width: 139.w,
|
||||||
|
height: 139.h,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
@@ -296,217 +286,242 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
|||||||
.withOpacity(0.50),
|
.withOpacity(0.50),
|
||||||
width: 2),
|
width: 2),
|
||||||
),
|
),
|
||||||
child: Obx(() =>
|
),
|
||||||
// editProfileImage
|
// Middle circle
|
||||||
// .profilePicPath.value !=
|
Container(
|
||||||
// ''
|
width: 119.w,
|
||||||
// ?
|
height: 119.h,
|
||||||
editProfileImage.profilePicPath
|
decoration: BoxDecoration(
|
||||||
.value !=
|
shape: BoxShape.circle,
|
||||||
''
|
color: Colors.transparent,
|
||||||
? ClipOval(
|
border: Border.all(
|
||||||
child:
|
color: Color(0XFFD90B2E)
|
||||||
SizedBox.fromSize(
|
.withOpacity(0.50),
|
||||||
size: Size.fromRadius(
|
width: 2),
|
||||||
50.r),
|
),
|
||||||
child: Image(
|
),
|
||||||
image: FileImage(
|
// Inner circle
|
||||||
File(
|
Container(
|
||||||
editProfileImage
|
decoration: BoxDecoration(
|
||||||
.profilePicPath
|
shape: BoxShape.circle,
|
||||||
.value,
|
color: Colors.transparent,
|
||||||
|
border: Border.all(
|
||||||
|
color: Color(0XFFD90B2E)
|
||||||
|
.withOpacity(0.50),
|
||||||
|
width: 2),
|
||||||
|
),
|
||||||
|
child: Obx(() =>
|
||||||
|
// editProfileImage
|
||||||
|
// .profilePicPath.value !=
|
||||||
|
// ''
|
||||||
|
// ?
|
||||||
|
editProfileImage.profilePicPath
|
||||||
|
.value !=
|
||||||
|
''
|
||||||
|
? ClipOval(
|
||||||
|
child:
|
||||||
|
SizedBox.fromSize(
|
||||||
|
size: Size.fromRadius(
|
||||||
|
50.r),
|
||||||
|
child: Image(
|
||||||
|
image: FileImage(
|
||||||
|
File(
|
||||||
|
editProfileImage
|
||||||
|
.profilePicPath
|
||||||
|
.value,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
width: 200.w,
|
||||||
|
height: 200.h,
|
||||||
),
|
),
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: 200.w,
|
|
||||||
height: 200.h,
|
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
)
|
: Image.asset(
|
||||||
: Image.asset(
|
"assets/images/png/camera.png")
|
||||||
"assets/images/png/camera.png")
|
// : Image.asset(
|
||||||
// : Image.asset(
|
// "assets/images/png/camera.png")
|
||||||
// "assets/images/png/camera.png")
|
)),
|
||||||
)),
|
// Main button
|
||||||
// Main button
|
],
|
||||||
],
|
),
|
||||||
),
|
const SizedBox(height: 9),
|
||||||
const SizedBox(height: 9),
|
text16400white('Add profile picture')
|
||||||
text16400white('Add profile picture')
|
],
|
||||||
],
|
)),
|
||||||
)),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(20.h),
|
|
||||||
text16400white('Full name'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: fullNameController,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your full name",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/user.png',
|
|
||||||
),
|
),
|
||||||
// validatorText: "Enter your full name",
|
sizedBoxHeight(20.h),
|
||||||
validator: (value) {
|
text16400white('Full name'),
|
||||||
if (value!.isEmpty) {
|
sizedBoxHeight(10.h),
|
||||||
return 'Enter your full name ';
|
CustomTextFormField(
|
||||||
}
|
textEditingController: fullNameController,
|
||||||
return null;
|
texttype: TextInputType.text,
|
||||||
},
|
hintText: "Enter your full name",
|
||||||
inputFormatters: [
|
leadingIcon:
|
||||||
// LengthLimitingTextInputFormatter(20),
|
// const Icon(Icons.mail_outline),
|
||||||
RemoveEmojiInputFormatter(),
|
Image.asset(
|
||||||
FilteringTextInputFormatter.allow(
|
width: 22.w,
|
||||||
RegExp('[a-zA-Z ]'))
|
height: 17.h,
|
||||||
],
|
'assets/images/png/user.png',
|
||||||
),
|
),
|
||||||
sizedBoxHeight(10.h),
|
// validatorText: "Enter your full name",
|
||||||
text16400white('User name'),
|
validator: (value) {
|
||||||
sizedBoxHeight(10.h),
|
if (value!.isEmpty) {
|
||||||
CustomTextFormField(
|
return 'Enter your full name ';
|
||||||
textEditingController: userNameController,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your user name",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/user.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your user name",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your user name ';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-Z ]'))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
text16400white('Date of birth'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: datecontroller,
|
|
||||||
readonly: true,
|
|
||||||
onTap: () {
|
|
||||||
_selectDate(context);
|
|
||||||
},
|
|
||||||
// texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your date of birth",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/dateimage.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter date of birth",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your date of birth';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
text16400white('Gender'),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomDropDownWidgetSignup(
|
|
||||||
header: 'Select gender',
|
|
||||||
title: '',
|
|
||||||
listData: _gender,
|
|
||||||
onItemSelected: _onItemSelected,
|
|
||||||
leadingImage:
|
|
||||||
Image.asset('assets/images/png/gendericon.png'),
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
text16400white('Location'),
|
|
||||||
sizedBoxWidth(5.w),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/png/informationicon.png')
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(10.h),
|
|
||||||
CustomTextFormField(
|
|
||||||
textEditingController: locationcontroller,
|
|
||||||
texttype: TextInputType.text,
|
|
||||||
hintText: "Enter your location",
|
|
||||||
leadingIcon:
|
|
||||||
// const Icon(Icons.mail_outline),
|
|
||||||
Image.asset(
|
|
||||||
width: 22.w,
|
|
||||||
height: 17.h,
|
|
||||||
'assets/images/png/location.png',
|
|
||||||
),
|
|
||||||
// validatorText: "Enter your location",
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Enter your location ';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
inputFormatters: [
|
|
||||||
// LengthLimitingTextInputFormatter(20),
|
|
||||||
RemoveEmojiInputFormatter(),
|
|
||||||
FilteringTextInputFormatter.allow(
|
|
||||||
RegExp('[a-zA-Z ]'))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
sizedBoxHeight(20.h),
|
|
||||||
CustomButton(
|
|
||||||
text: "Continue",
|
|
||||||
onPressed: () {
|
|
||||||
if (
|
|
||||||
// isValid!
|
|
||||||
// fullNameController.text.isBlank! &&
|
|
||||||
// userNameController.text.isBlank! &&
|
|
||||||
// datecontroller.text.isBlank! &&
|
|
||||||
// _selectedgendertype.isEmpty &&
|
|
||||||
// locationcontroller.text.isBlank! &&
|
|
||||||
// editProfileImage.profilePicPath.value ==
|
|
||||||
// ''
|
|
||||||
fullNameController.text.isBlank! ||
|
|
||||||
userNameController.text.isBlank! ||
|
|
||||||
datecontroller.text.isBlank! ||
|
|
||||||
_selectedgendertype.isEmpty ||
|
|
||||||
locationcontroller.text.isBlank! ||
|
|
||||||
editProfileImage.profilePicPath.value ==
|
|
||||||
'') {
|
|
||||||
utils.showToast('Please fill all fields');
|
|
||||||
} else {
|
|
||||||
TellusUploadData();
|
|
||||||
}
|
}
|
||||||
// if (_selectedgendertype.isNotEmpty) {
|
return null;
|
||||||
// Get.toNamed(RouteName.individualprofilestep1);
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text16400white('User name'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: userNameController,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your user name",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/user.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your user name",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your user name ';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text16400white('Date of birth'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: datecontroller,
|
||||||
|
readonly: true,
|
||||||
|
onTap: () {
|
||||||
|
_selectDate(context);
|
||||||
|
},
|
||||||
|
// texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your date of birth",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/dateimage.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter date of birth",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your date of birth';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text16400white('Gender'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomDropDownWidgetSignup(
|
||||||
|
header: 'Select gender',
|
||||||
|
title: '',
|
||||||
|
listData: _gender,
|
||||||
|
onItemSelected: _onItemSelected,
|
||||||
|
leadingImage:
|
||||||
|
Image.asset('assets/images/png/gendericon.png'),
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
text16400white('Location'),
|
||||||
|
sizedBoxWidth(5.w),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/png/informationicon.png')
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
CustomTextFormField(
|
||||||
|
textEditingController: locationcontroller,
|
||||||
|
texttype: TextInputType.text,
|
||||||
|
hintText: "Enter your location",
|
||||||
|
leadingIcon:
|
||||||
|
// const Icon(Icons.mail_outline),
|
||||||
|
Image.asset(
|
||||||
|
width: 22.w,
|
||||||
|
height: 17.h,
|
||||||
|
'assets/images/png/location.png',
|
||||||
|
),
|
||||||
|
// validatorText: "Enter your location",
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Enter your location ';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
inputFormatters: [
|
||||||
|
// LengthLimitingTextInputFormatter(20),
|
||||||
|
RemoveEmojiInputFormatter(),
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[a-zA-Z ]'))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
sizedBoxHeight(20.h),
|
||||||
|
CustomButton(
|
||||||
|
text: "Continue",
|
||||||
|
onPressed: () {
|
||||||
|
if (
|
||||||
|
// isValid!
|
||||||
|
// fullNameController.text.isBlank! &&
|
||||||
|
// userNameController.text.isBlank! &&
|
||||||
|
// datecontroller.text.isBlank! &&
|
||||||
|
// _selectedgendertype.isEmpty &&
|
||||||
|
// locationcontroller.text.isBlank! &&
|
||||||
|
// editProfileImage.profilePicPath.value ==
|
||||||
|
// ''
|
||||||
|
fullNameController.text.isBlank! ||
|
||||||
|
userNameController.text.isBlank! ||
|
||||||
|
datecontroller.text.isBlank! ||
|
||||||
|
_selectedgendertype.isEmpty ||
|
||||||
|
locationcontroller.text.isBlank! ||
|
||||||
|
editProfileImage.profilePicPath.value ==
|
||||||
|
'') {
|
||||||
|
utils.showToast('Please fill all fields');
|
||||||
|
} else {
|
||||||
|
TellusUploadData();
|
||||||
|
}
|
||||||
|
// if (_selectedgendertype.isNotEmpty) {
|
||||||
|
// Get.toNamed(RouteName.individualprofilestep1);
|
||||||
|
|
||||||
// // Get.to(() => BusinessPage());
|
// // Get.to(() => BusinessPage());
|
||||||
// } else {
|
// } else {
|
||||||
// // Handle case where no selection is made
|
// // Handle case where no selection is made
|
||||||
// utils.showToast('Please select an gender type');
|
// utils.showToast('Please select an gender type');
|
||||||
// }
|
// }
|
||||||
}),
|
}),
|
||||||
sizedBoxHeight(30.h),
|
sizedBoxHeight(30.h),
|
||||||
// const Spacer(
|
// const Spacer(
|
||||||
// flex: 3,
|
// flex: 3,
|
||||||
// )
|
// )
|
||||||
],
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
])),
|
||||||
])),
|
],
|
||||||
],
|
)),
|
||||||
)),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@@ -53,10 +54,18 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
|||||||
|
|
||||||
if (accounttype == 'Individual') {
|
if (accounttype == 'Individual') {
|
||||||
print('individual selected');
|
print('individual selected');
|
||||||
Get.toNamed(RouteName.tellusindividualscreen);
|
Get.toNamed(RouteName.tellusindividualscreen,
|
||||||
|
// arguments: {
|
||||||
|
// 'pageroute' : "nextscreen"
|
||||||
|
// }
|
||||||
|
);
|
||||||
} else if (accounttype == 'Business') {
|
} else if (accounttype == 'Business') {
|
||||||
print('business selected');
|
print('business selected');
|
||||||
Get.toNamed(RouteName.tellusbusinessscreen);
|
Get.toNamed(RouteName.tellusbusinessscreen,
|
||||||
|
// arguments: {
|
||||||
|
// 'pageroute' : "nextscreen"
|
||||||
|
// }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return utils.showToast(data.message);
|
return utils.showToast(data.message);
|
||||||
|
|||||||
72
lib/onboarding/Signup/view_model/getUserprofile.dart
Normal file
72
lib/onboarding/Signup/view_model/getUserprofile.dart
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:regroup/Common/api_urls.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
|
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||||
|
import 'package:regroup/Global.dart';
|
||||||
|
import 'package:regroup/Utils/dialogs.dart';
|
||||||
|
import 'package:regroup/onboarding/Signup/Model/GetUserdetailsModel.dart';
|
||||||
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
GetuserdetailsModel? getuserobj;
|
||||||
|
|
||||||
|
|
||||||
|
class Getuserdetails {
|
||||||
|
Getuserdetails();
|
||||||
|
|
||||||
|
Future<ResponseData<dynamic>> Getuser() async {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
final response = await NetworkApiServices().getApi(ApiUrls.getuserdetails);
|
||||||
|
|
||||||
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
|
dynamic responseData = response.data;
|
||||||
|
|
||||||
|
if (responseData is Map<String, dynamic>) {
|
||||||
|
// Assuming response data is a map
|
||||||
|
getuserobj = GetuserdetailsModel.fromJson(responseData);
|
||||||
|
|
||||||
|
await prefs.setString('fullname', getuserobj?.data?.userData?.fullName ?? "");
|
||||||
|
await prefs.setString('username', getuserobj?.data?.userData?.userName ?? "");
|
||||||
|
await prefs.setString('email', getuserobj?.data?.userData?.emailAddress ?? "");
|
||||||
|
await prefs.setString('phone', getuserobj?.data?.userData?.phoneNumber ?? "");
|
||||||
|
|
||||||
|
emailid = prefs.getString('email');
|
||||||
|
myusername = prefs.getString('username');
|
||||||
|
fullname = prefs.getString('fullname');
|
||||||
|
phonenumber = prefs.getString('phone');
|
||||||
|
|
||||||
|
|
||||||
|
} else if (responseData is String) {
|
||||||
|
// Parse the JSON string into a map
|
||||||
|
Map<String, dynamic> jsonMap;
|
||||||
|
try {
|
||||||
|
jsonMap = json.decode(responseData);
|
||||||
|
} catch (e) {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
"Error decoding JSON string: $responseData",
|
||||||
|
ResponseStatus.FAILED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
await prefs.setString('fullname', getuserobj?.data?.userData?.fullName ?? "");
|
||||||
|
await prefs.setString('username', getuserobj?.data?.userData?.userName ?? "");
|
||||||
|
await prefs.setString('email', getuserobj?.data?.userData?.emailAddress ?? "");
|
||||||
|
await prefs.setString('phone', getuserobj?.data?.userData?.phoneNumber ?? "");
|
||||||
|
|
||||||
|
emailid = prefs.getString('email');
|
||||||
|
myusername = prefs.getString('username');
|
||||||
|
fullname = prefs.getString('fullname');
|
||||||
|
phonenumber = prefs.getString('phone');
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Handle other types if necessary
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
"Unexpected response format", ResponseStatus.FAILED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,10 +4,9 @@ import 'package:regroup/Common/api_urls.dart';
|
|||||||
import 'package:regroup/Common/base_manager.dart';
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||||
import 'package:regroup/Global.dart';
|
import 'package:regroup/Global.dart';
|
||||||
|
import 'package:regroup/onboarding/Signup/Model/Onboarding/Individual/tellusIndividual.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Onboard {
|
class Onboard {
|
||||||
Onboard();
|
Onboard();
|
||||||
|
|
||||||
@@ -29,13 +28,10 @@ class Onboard {
|
|||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
Map<String, dynamic> res = response.data;
|
Map<String, dynamic> res = response.data;
|
||||||
print("res is $res");
|
print("res is $res");
|
||||||
await prefs.setString('token', res['data']['token']);
|
await prefs.setString('access-token', res['data']['token']);
|
||||||
await prefs.setString('email', res['data']['email']);
|
// await prefs.setInt('isprofileupdate', res['data']['is_profile_updated']);
|
||||||
await prefs.setInt('isprofileupdate', res['data']['is_profile_updated']);
|
|
||||||
|
|
||||||
token = res['data']['token'];
|
token = res['data']['token'];
|
||||||
emailid = res['data']['email'];
|
|
||||||
isprofileupdated = res['data']['is_profile_updated'];
|
|
||||||
|
|
||||||
print("token is $token");
|
print("token is $token");
|
||||||
print("email is $emailid");
|
print("email is $emailid");
|
||||||
@@ -46,40 +42,63 @@ class Onboard {
|
|||||||
|
|
||||||
Future<ResponseData> PosttellusIndividual(updata) async {
|
Future<ResponseData> PosttellusIndividual(updata) async {
|
||||||
print("updata is $updata");
|
print("updata is $updata");
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
final response =
|
final response =
|
||||||
await NetworkApiServices().postApi(updata, ApiUrls.tellusIndividual);
|
await NetworkApiServices().postApi(updata, ApiUrls.tellusIndividual);
|
||||||
print("response is ${response.data}");
|
print("response is ${response.data}");
|
||||||
print("response message is ${response.message}");
|
print("response message is ${response.message}");
|
||||||
|
|
||||||
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
|
if (response.data['status'] == 'success') {
|
||||||
|
TellusIndividualModel tellusindiObj = TellusIndividualModel.fromJson(response.data);
|
||||||
|
// await prefs.setString('fullname', tellusindiObj.data?.profile?.fullName ?? "");
|
||||||
|
// await prefs.setString('username', tellusindiObj.data?.profile?.userName ?? "");
|
||||||
|
// await prefs.setString('email', tellusindiObj.data?.profile?.emailAddress ?? "");
|
||||||
|
// await prefs.setString('phone', tellusindiObj.data?.profile?.phoneNumber ?? "");
|
||||||
|
|
||||||
|
// emailid = tellusindiObj.data?.profile?.emailAddress;
|
||||||
|
// myusername = tellusindiObj.data?.profile?.userName;
|
||||||
|
// fullname = tellusindiObj.data?.profile?.fullName;
|
||||||
|
// phonenumber = tellusindiObj.data?.profile?.phoneNumber;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return ResponseData<dynamic>(
|
||||||
|
response.data['message'], ResponseStatus.FAILED);
|
||||||
|
}
|
||||||
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ResponseData<dynamic>> PostIndividualActivity(updata) async {
|
Future<ResponseData<dynamic>> PostIndividualActivity(updata) async {
|
||||||
print("updata is $updata");
|
print("updata is $updata");
|
||||||
final response = await NetworkApiServices()
|
final response = await NetworkApiServices().postApi(
|
||||||
.postApi(updata, ApiUrls.postindividualactivity,);
|
updata,
|
||||||
|
ApiUrls.postindividualactivity,
|
||||||
|
);
|
||||||
print("response is ${response.data}");
|
print("response is ${response.data}");
|
||||||
print("response message is ${response.message}");
|
print("response message is ${response.message}");
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ResponseData<dynamic>> postGroups(updata) async {
|
Future<ResponseData<dynamic>> postGroups(updata) async {
|
||||||
print("updata is $updata");
|
print("updata is $updata");
|
||||||
final response = await NetworkApiServices()
|
final response = await NetworkApiServices().postApi(
|
||||||
.postApi(updata, ApiUrls.postgroups,);
|
updata,
|
||||||
|
ApiUrls.postgroups,
|
||||||
|
);
|
||||||
print("response is ${response.data}");
|
print("response is ${response.data}");
|
||||||
print("response message is ${response.message}");
|
print("response message is ${response.message}");
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ResponseData<dynamic>> postCommunities(updata) async {
|
Future<ResponseData<dynamic>> postCommunities(updata) async {
|
||||||
print("updata is $updata");
|
print("updata is $updata");
|
||||||
final response = await NetworkApiServices()
|
final response = await NetworkApiServices().postApi(
|
||||||
.postApi(updata, ApiUrls.postcommunities,);
|
updata,
|
||||||
|
ApiUrls.postcommunities,
|
||||||
|
);
|
||||||
print("response is ${response.data}");
|
print("response is ${response.data}");
|
||||||
print("response message is ${response.message}");
|
print("response message is ${response.message}");
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:regroup/Global.dart';
|
||||||
import 'package:regroup/Utils/Common/NoInternet.dart';
|
import 'package:regroup/Utils/Common/NoInternet.dart';
|
||||||
|
import 'package:regroup/onboarding/Signup/view_model/getUserprofile.dart';
|
||||||
import 'package:regroup/resources/routes/route_name.dart';
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
// import 'package:shared_preferences/shared_preferences.dart';
|
// import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
class SplashScreen extends StatefulWidget {
|
class SplashScreen extends StatefulWidget {
|
||||||
@@ -23,21 +26,21 @@ class _SplashScreenState extends State<SplashScreen> {
|
|||||||
final Connectivity _connectivity = Connectivity();
|
final Connectivity _connectivity = Connectivity();
|
||||||
List<ConnectivityResult> _connectionStatus = [ConnectivityResult.none];
|
List<ConnectivityResult> _connectionStatus = [ConnectivityResult.none];
|
||||||
|
|
||||||
Future<void> checkInternet() async {
|
// Future<void> checkInternet() async {
|
||||||
final connectivityResult = await (Connectivity().checkConnectivity());
|
// final connectivityResult = await (Connectivity().checkConnectivity());
|
||||||
|
|
||||||
if (connectivityResult == ConnectivityResult.wifi ||
|
// if (connectivityResult == ConnectivityResult.wifi ||
|
||||||
connectivityResult == ConnectivityResult.mobile) {
|
// connectivityResult == ConnectivityResult.mobile) {
|
||||||
setState(() {
|
// setState(() {
|
||||||
_connectionStatus = connectivityResult;
|
// _connectionStatus = connectivityResult;
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
setState(() {
|
// setState(() {
|
||||||
_connectionStatus = connectivityResult;
|
// _connectionStatus = connectivityResult;
|
||||||
|
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
Future<void> initConnectivity() async {
|
Future<void> initConnectivity() async {
|
||||||
late List<ConnectivityResult> result;
|
late List<ConnectivityResult> result;
|
||||||
@@ -48,7 +51,6 @@ class _SplashScreenState extends State<SplashScreen> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!mounted) {
|
if (!mounted) {
|
||||||
return Future.value(null);
|
return Future.value(null);
|
||||||
}
|
}
|
||||||
@@ -70,24 +72,117 @@ class _SplashScreenState extends State<SplashScreen> {
|
|||||||
// TODO: implement initState
|
// TODO: implement initState
|
||||||
super.initState();
|
super.initState();
|
||||||
initConnectivity();
|
initConnectivity();
|
||||||
|
|
||||||
log(_connectionStatus.toString());
|
log(_connectionStatus.toString());
|
||||||
|
|
||||||
Future.delayed(Duration(seconds: 2), () async {
|
Future.delayed(Duration(seconds: 2), () async {
|
||||||
if (_connectionStatus.contains(ConnectivityResult.none)) {
|
if (_connectionStatus.contains(ConnectivityResult.none)) {
|
||||||
var result = await Get.to(NoInternet());
|
var result = await Get.to(NoInternet());
|
||||||
if (result != null && result) {
|
if (result != null && result) {
|
||||||
|
print('this is first');
|
||||||
Timer(const Duration(seconds: 1), () async {
|
Timer(const Duration(seconds: 1), () async {
|
||||||
Get.toNamed(RouteName.onboarding1);
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
|
||||||
|
token = prefs.getString('access-token');
|
||||||
|
emailid = prefs.getString('email');
|
||||||
|
myusername = prefs.getString('username');
|
||||||
|
fullname = prefs.getString('fullname');
|
||||||
|
phonenumber = prefs.getString('phone');
|
||||||
|
|
||||||
|
if (token == null || token!.isEmpty) {
|
||||||
|
Get.toNamed(RouteName.onboarding1);
|
||||||
|
} else {
|
||||||
|
Getuserdetails().Getuser().then((value) {
|
||||||
|
print(getuserobj!.data!.userData!.isProfileUpdated!);
|
||||||
|
// .then((value) {
|
||||||
|
if (getuserobj?.data?.userData?.isProfileUpdated == 0) {
|
||||||
|
String? accountype =
|
||||||
|
getuserobj?.data?.userData?.principalTypeXid.toString();
|
||||||
|
|
||||||
|
if (accountype == "1") {
|
||||||
|
Get.toNamed(RouteName.tellusindividualscreen,
|
||||||
|
// arguments: {'pageroute': "mainscreen"}
|
||||||
|
);
|
||||||
|
} else if (accountype == "2") {
|
||||||
|
Get.toNamed(RouteName.tellusbusinessscreen,
|
||||||
|
// arguments: {'pageroute': "mainscreen"}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Get.toNamed(RouteName.mainscreen);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// print(getuserobj!.data!.userData!.isProfileUpdated!);
|
||||||
|
|
||||||
|
// // .then((value) {
|
||||||
|
// if (getuserobj?.data?.userData?.isProfileUpdated == 0) {
|
||||||
|
// String? accountype =
|
||||||
|
// getuserobj?.data?.userData?.principalTypeXid.toString();
|
||||||
|
|
||||||
|
// if (accountype == "1") {
|
||||||
|
// Get.toNamed(RouteName.tellusindividualscreen,
|
||||||
|
// arguments: {
|
||||||
|
// 'pageroute' : "mainscreen"
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
// } else if (accountype == "2") {
|
||||||
|
// Get.toNamed(RouteName.tellusbusinessscreen);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// Get.toNamed(RouteName.mainscreen);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Timer(const Duration(seconds: 2), () async {
|
Timer(const Duration(seconds: 2), () async {
|
||||||
Get.toNamed(RouteName.onboarding1);
|
print('this is second');
|
||||||
|
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
|
||||||
|
token = prefs.getString('access-token');
|
||||||
|
emailid = prefs.getString('email');
|
||||||
|
myusername = prefs.getString('username');
|
||||||
|
fullname = prefs.getString('fullname');
|
||||||
|
phonenumber = prefs.getString('phone');
|
||||||
|
|
||||||
|
if (token == null || token!.isEmpty) {
|
||||||
|
Get.toNamed(RouteName.onboarding1);
|
||||||
|
} else {
|
||||||
|
Getuserdetails().Getuser().then((value) {
|
||||||
|
print(getuserobj!.data!.userData!.isProfileUpdated!);
|
||||||
|
// .then((value) {
|
||||||
|
if (getuserobj?.data?.userData?.isProfileUpdated == 0) {
|
||||||
|
String? accountype =
|
||||||
|
getuserobj?.data?.userData?.principalTypeXid.toString();
|
||||||
|
|
||||||
|
if (accountype == "1") {
|
||||||
|
Get.toNamed(RouteName.tellusindividualscreen,
|
||||||
|
// arguments: {'pageroute': "mainscreen"}
|
||||||
|
);
|
||||||
|
} else if (accountype == "2") {
|
||||||
|
Get.toNamed(RouteName.tellusbusinessscreen,
|
||||||
|
// arguments: {'pageroute': "mainscreen"}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Get.toNamed(RouteName.mainscreen);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Future.delayed(Duration(seconds: 2), () async {
|
||||||
|
// Timer(const Duration(seconds: 1), () async {
|
||||||
|
// Get.toNamed(RouteName.onboarding1);
|
||||||
|
// });
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -113,11 +208,11 @@ class _SplashScreenState extends State<SplashScreen> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SvgPicture.asset("assets/images/svg/mainsplash.svg",
|
SvgPicture.asset(
|
||||||
width: 211.w,
|
"assets/images/svg/mainsplash.svg",
|
||||||
height: 211.h,
|
width: 211.w,
|
||||||
|
height: 211.h,
|
||||||
)
|
)
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
228
lib/onboarding/forgotPass/View/ForgotOtp.dart
Normal file
228
lib/onboarding/forgotPass/View/ForgotOtp.dart
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:glassmorphism/glassmorphism.dart';
|
||||||
|
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||||
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
|
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||||
|
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||||
|
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||||
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||||
|
import 'package:regroup/Utils/texts.dart';
|
||||||
|
import 'package:regroup/onboarding/forgotPass/ViewModel/ForgotPassAPI.dart';
|
||||||
|
import 'package:regroup/resources/routes/route_name.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
|
class ForgotOtp extends StatefulWidget {
|
||||||
|
const ForgotOtp({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ForgotOtp> createState() => _ForgotOtpState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ForgotOtpState extends State<ForgotOtp> {
|
||||||
|
TextEditingController? pincode = TextEditingController();
|
||||||
|
final String emailAddress = Get.arguments;
|
||||||
|
|
||||||
|
double? principleId;
|
||||||
|
|
||||||
|
get utils => null;
|
||||||
|
|
||||||
|
// principleId = prefs.getString('email').toString();
|
||||||
|
|
||||||
|
checkValidation() async {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
principleId = prefs.getInt('principal_xid')!.toDouble();
|
||||||
|
if (pincode!.text.isEmpty) {
|
||||||
|
utils.showToast('Pin field is empty');
|
||||||
|
} else {
|
||||||
|
Map<String, String> updata = {
|
||||||
|
"iam_principal_xid": principleId.toString(),
|
||||||
|
"otp": pincode!.text,
|
||||||
|
};
|
||||||
|
final data = await ForgotPassAPI().verifyotp(updata);
|
||||||
|
if (data.status == ResponseStatus.SUCCESS) {
|
||||||
|
// btnController.success();
|
||||||
|
// btnController.reset();
|
||||||
|
Get.snackbar(
|
||||||
|
"Success!",
|
||||||
|
'OTP verification successful!',
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
Future.delayed(Duration(seconds: 1), () {
|
||||||
|
Get.toNamed(RouteName.newpassword, arguments: emailAddress);
|
||||||
|
});
|
||||||
|
// print('success');
|
||||||
|
} else {
|
||||||
|
// btnController.error();
|
||||||
|
// btnController.reset();
|
||||||
|
Get.snackbar(
|
||||||
|
"Error!",
|
||||||
|
data.data['message'],
|
||||||
|
duration: Duration(seconds: 2),
|
||||||
|
colorText: Colors.white,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
snackStyle: SnackStyle.FLOATING,
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||||
|
appBar: CommonAppbar(
|
||||||
|
titleTxt: '',
|
||||||
|
),
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
// CommonBlurLeftSecond(),
|
||||||
|
Positioned(top: 150, right: -30, child: CommonBlurRightSecond()),
|
||||||
|
Positioned(top: 350, left: -30, child: CommonBlurLeftBlue()),
|
||||||
|
GlassmorphicContainer(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
height:
|
||||||
|
// 500.h,
|
||||||
|
MediaQuery.of(context).size.height,
|
||||||
|
borderRadius: 2,
|
||||||
|
blur: 6,
|
||||||
|
alignment: Alignment.bottomLeft,
|
||||||
|
border: 2,
|
||||||
|
linearGradient: LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
borderGradient: LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
|
||||||
|
Color(0XFF222935).withOpacity(0.60),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
sizedBoxHeight(20.h),
|
||||||
|
text22400white('Check your email'),
|
||||||
|
sizedBoxHeight(10.h),
|
||||||
|
text14400white(
|
||||||
|
'Enter the verification code that we sent to $emailAddress'),
|
||||||
|
sizedBoxHeight(40.h),
|
||||||
|
text16400white('Enter code'),
|
||||||
|
sizedBoxHeight(20.h),
|
||||||
|
PinCodeTextField(
|
||||||
|
validator: (value) {
|
||||||
|
if (value != null && value.isEmpty) {
|
||||||
|
return "Please Enter verification code";
|
||||||
|
} else if (value != null && value.length < 4) {
|
||||||
|
return "OTP length should be at least 4";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
|
],
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
length: 4,
|
||||||
|
obscureText: false,
|
||||||
|
animationType: AnimationType.fade,
|
||||||
|
pinTheme: PinTheme(
|
||||||
|
selectedFillColor: Color(0xFF434A53),
|
||||||
|
inactiveFillColor: Color(0xFF434A53),
|
||||||
|
inactiveColor: Color(0xFF434A53),
|
||||||
|
activeColor: Color(0xFF434A53),
|
||||||
|
selectedColor: Color(0xFF434A53),
|
||||||
|
shape: PinCodeFieldShape.underline,
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
fieldHeight: 70,
|
||||||
|
fieldWidth: 70,
|
||||||
|
activeFillColor:
|
||||||
|
// Colors.white
|
||||||
|
Color(0xFF303030).withOpacity(0.4),
|
||||||
|
// textStyle: TextStyle(color: Colors.white, fontSize: 20), // Change text color and font size
|
||||||
|
),
|
||||||
|
animationDuration: Duration(milliseconds: 300),
|
||||||
|
enableActiveFill: true,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
controller: pincode,
|
||||||
|
onCompleted: (v) {
|
||||||
|
print("Completed");
|
||||||
|
},
|
||||||
|
onChanged: (value) {
|
||||||
|
print(value);
|
||||||
|
setState(() {
|
||||||
|
// currentText = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cursorColor: Colors.white,
|
||||||
|
textStyle: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 20.sp,
|
||||||
|
fontFamily: 'Helvetica',
|
||||||
|
),
|
||||||
|
beforeTextPaste: (text) {
|
||||||
|
print("Allowing to paste $text");
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
appContext: context,
|
||||||
|
),
|
||||||
|
const Spacer(
|
||||||
|
flex: 3,
|
||||||
|
),
|
||||||
|
CustomButton(
|
||||||
|
text: 'Continue',
|
||||||
|
onPressed: () {
|
||||||
|
// if (pincode!.text.isEmpty) {
|
||||||
|
// utils.showToast('Pin field is empty');
|
||||||
|
// } else {
|
||||||
|
// if (accounttype == 'Individual') {
|
||||||
|
// print('individual selected');
|
||||||
|
// Get.toNamed(RouteName.tellusindividualscreen);
|
||||||
|
// } else if (accounttype == 'Business') {
|
||||||
|
// print('business selected');
|
||||||
|
// Get.toNamed(RouteName.tellusbusinessscreen);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
checkValidation();
|
||||||
|
}),
|
||||||
|
const Spacer(
|
||||||
|
// flex: 2,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -52,9 +52,10 @@ class _ForgotPassState extends State<ForgotPass> {
|
|||||||
snackPosition: SnackPosition.BOTTOM,
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
);
|
);
|
||||||
prefs.setString('email', emailController.text);
|
prefs.setString('email', emailController.text);
|
||||||
prefs.setString('principal_xid', resp.data['data']['iam_principal_xid']);
|
prefs.setInt(
|
||||||
|
'principal_xid', resp.data['data']['iam_principal_xid']);
|
||||||
Future.delayed(Duration(seconds: 1), () {
|
Future.delayed(Duration(seconds: 1), () {
|
||||||
Get.toNamed(RouteName.verifyusercreen,
|
Get.toNamed(RouteName.forgotOtp,
|
||||||
arguments: emailController.text);
|
arguments: emailController.text);
|
||||||
});
|
});
|
||||||
// print('success');
|
// print('success');
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:regroup/Common/api_urls.dart';
|
||||||
import 'package:regroup/Common/base_manager.dart';
|
import 'package:regroup/Common/base_manager.dart';
|
||||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
@@ -10,7 +11,8 @@ class ForgotPassAPI {
|
|||||||
Future<ResponseData<dynamic>> requestotp(var data) async {
|
Future<ResponseData<dynamic>> requestotp(var data) async {
|
||||||
final response = await NetworkApiServices().postApi(
|
final response = await NetworkApiServices().postApi(
|
||||||
data,
|
data,
|
||||||
"https://regroup.betadelivery.com/api/v1/forgot-password",
|
ApiUrls.forgotpassword,
|
||||||
|
// "https://regroup.betadelivery.com/api/v1/forgot-password",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status == ResponseStatus.SUCCESS) {
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
@@ -30,7 +32,8 @@ class ForgotPassAPI {
|
|||||||
Future<ResponseData<dynamic>> verifyotp(var data) async {
|
Future<ResponseData<dynamic>> verifyotp(var data) async {
|
||||||
final response = await NetworkApiServices().postApi(
|
final response = await NetworkApiServices().postApi(
|
||||||
data,
|
data,
|
||||||
"https://regroup.betadelivery.com/api/v1/forgot-password/verify-otp",
|
ApiUrls.verifyotp,
|
||||||
|
// "https://regroup.betadelivery.com/api/v1/forgot-password/verify-otp",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status == ResponseStatus.SUCCESS) {
|
if (response.status == ResponseStatus.SUCCESS) {
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ class RouteName {
|
|||||||
static const String addtimeline = '/addtimeline';
|
static const String addtimeline = '/addtimeline';
|
||||||
static const String verifycode = '/verifycode';
|
static const String verifycode = '/verifycode';
|
||||||
static const String newpassword = '/newpassword';
|
static const String newpassword = '/newpassword';
|
||||||
|
static const String forgotOtp= '/forgotOtp';
|
||||||
|
|
||||||
|
|
||||||
static const String availability = '/availability';
|
static const String availability = '/availability';
|
||||||
|
|
||||||
|
|||||||
@@ -85,10 +85,10 @@ import 'package:regroup/Login/View/verifygoogleapple.dart';
|
|||||||
|
|
||||||
import 'package:regroup/Utils/Common/NoInternet.dart';
|
import 'package:regroup/Utils/Common/NoInternet.dart';
|
||||||
import 'package:regroup/onboarding/NewPass/View/NewPass.dart';
|
import 'package:regroup/onboarding/NewPass/View/NewPass.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Business/step1Letusunderstandbetter.dart';
|
import 'package:regroup/onboarding/Signup/View/Business/View/step1Letusunderstandbetter.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Business/step2Selectgroup.dart';
|
import 'package:regroup/onboarding/Signup/View/Business/View/step2Selectgroup.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Business/step3SelectCommunity.dart';
|
import 'package:regroup/onboarding/Signup/View/Business/View/step3SelectCommunity.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Business/tellusbusiness.dart';
|
import 'package:regroup/onboarding/Signup/View/Business/View/tellusbusiness.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Individual/step1Selectprofile.dart';
|
import 'package:regroup/onboarding/Signup/View/Individual/step1Selectprofile.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Individual/step2Selectactivity.dart';
|
import 'package:regroup/onboarding/Signup/View/Individual/step2Selectactivity.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/Individual/step3Selectyourgroup.dart';
|
import 'package:regroup/onboarding/Signup/View/Individual/step3Selectyourgroup.dart';
|
||||||
@@ -98,6 +98,7 @@ import 'package:regroup/onboarding/Signup/View/communitycommitment.dart';
|
|||||||
import 'package:regroup/onboarding/Signup/View/signupendpage.dart';
|
import 'package:regroup/onboarding/Signup/View/signupendpage.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/signupscreen.dart';
|
import 'package:regroup/onboarding/Signup/View/signupscreen.dart';
|
||||||
import 'package:regroup/onboarding/Signup/View/verifyuser.dart';
|
import 'package:regroup/onboarding/Signup/View/verifyuser.dart';
|
||||||
|
import 'package:regroup/onboarding/forgotPass/View/ForgotOtp.dart';
|
||||||
import 'package:regroup/onboarding/forgotPass/View/ForgotPass.dart';
|
import 'package:regroup/onboarding/forgotPass/View/ForgotPass.dart';
|
||||||
import 'package:regroup/onboarding/onboarding1.dart';
|
import 'package:regroup/onboarding/onboarding1.dart';
|
||||||
import 'package:regroup/onboarding/splashscreen.dart';
|
import 'package:regroup/onboarding/splashscreen.dart';
|
||||||
@@ -488,7 +489,10 @@ class AppRoutes {
|
|||||||
name: RouteName.newpassword,
|
name: RouteName.newpassword,
|
||||||
page: () => const NewPassword(),
|
page: () => const NewPassword(),
|
||||||
),
|
),
|
||||||
|
GetPage(
|
||||||
|
name: RouteName.forgotOtp,
|
||||||
|
page: () => const ForgotOtp(),
|
||||||
|
),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: RouteName.verifygoogleapplepage,
|
name: RouteName.verifygoogleapplepage,
|
||||||
page: () => const Verifygoogleandapple(),
|
page: () => const Verifygoogleandapple(),
|
||||||
|
|||||||
204
pubspec.lock
204
pubspec.lock
@@ -1,6 +1,14 @@
|
|||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
|
_flutterfire_internals:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: _flutterfire_internals
|
||||||
|
sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.35"
|
||||||
animations:
|
animations:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -85,10 +93,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: cross_file
|
name: cross_file
|
||||||
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
|
sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.3+8"
|
version: "0.3.4+1"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -217,6 +225,54 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.3+1"
|
version: "0.9.3+1"
|
||||||
|
firebase_auth:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_auth
|
||||||
|
sha256: cfc2d970829202eca09e2896f0a5aa7c87302817ecc0bdfa954f026046bf10ba
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.20.0"
|
||||||
|
firebase_auth_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_auth_platform_interface
|
||||||
|
sha256: a0270e1db3b2098a14cb2a2342b3cd2e7e458e0c391b1f64f6f78b14296ec093
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.3.0"
|
||||||
|
firebase_auth_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_auth_web
|
||||||
|
sha256: "64e067e763c6378b7e774e872f0f59f6812885e43020e25cde08f42e9459837b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.12.0"
|
||||||
|
firebase_core:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_core
|
||||||
|
sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.32.0"
|
||||||
|
firebase_core_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_platform_interface
|
||||||
|
sha256: "1003a5a03a61fc9a22ef49f37cbcb9e46c86313a7b2e7029b9390cf8c6fc32cb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.1.0"
|
||||||
|
firebase_core_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_core_web
|
||||||
|
sha256: "23509cb3cddfb3c910c143279ac3f07f06d3120f7d835e4a5d4b42558e978712"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.17.3"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -392,6 +448,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.3.0"
|
||||||
|
google_identity_services_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: google_identity_services_web
|
||||||
|
sha256: "9482364c9f8b7bd36902572ebc3a7c2b5c8ee57a9c93e6eb5099c1a9ec5265d8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.1+1"
|
||||||
google_maps_flutter:
|
google_maps_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -424,14 +488,54 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.0"
|
version: "2.8.0"
|
||||||
|
google_sign_in:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: google_sign_in
|
||||||
|
sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.2.1"
|
||||||
|
google_sign_in_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: google_sign_in_android
|
||||||
|
sha256: "7647893c65e6720973f0e579051c8f84b877b486614d9f70a404259c41a4632e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.1.23"
|
||||||
|
google_sign_in_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: google_sign_in_ios
|
||||||
|
sha256: a058c9880be456f21e2e8571c1126eaacd570bdc5b6c6d9d15aea4bdf22ca9fe
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.7.6"
|
||||||
|
google_sign_in_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: google_sign_in_platform_interface
|
||||||
|
sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.5"
|
||||||
|
google_sign_in_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: google_sign_in_web
|
||||||
|
sha256: d606264c7a1a526a3aa79d938b85a601d8589731a478bd4a3dcbdeb14a572228
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.4+1"
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: http
|
name: http
|
||||||
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
|
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -552,6 +656,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.1"
|
version: "0.7.1"
|
||||||
|
leak_tracker:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker
|
||||||
|
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "10.0.0"
|
||||||
|
leak_tracker_flutter_testing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker_flutter_testing
|
||||||
|
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
|
leak_tracker_testing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: leak_tracker_testing
|
||||||
|
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -560,6 +688,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
|
logger:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: logger
|
||||||
|
sha256: af05cc8714f356fd1f3888fb6741cbe9fbe25cdb6eedbab80e1a6db21047d4a4
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.0"
|
||||||
lottie:
|
lottie:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -572,26 +708,26 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
|
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.16"
|
version: "0.12.16+1"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.0"
|
version: "0.8.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.0"
|
version: "1.11.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -612,10 +748,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path
|
name: path
|
||||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.3"
|
version: "1.9.0"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -812,10 +948,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: shared_preferences_web
|
name: shared_preferences_web
|
||||||
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
|
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.3.0"
|
||||||
shared_preferences_windows:
|
shared_preferences_windows:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -840,6 +976,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.6"
|
version: "1.0.6"
|
||||||
|
sign_in_with_apple:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: sign_in_with_apple
|
||||||
|
sha256: "5c34c601d6910d7db0077063001ccd9d9329ee58b9038ee07153ffcdd76e91bd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.1.1"
|
||||||
|
sign_in_with_apple_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sign_in_with_apple_platform_interface
|
||||||
|
sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
sign_in_with_apple_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sign_in_with_apple_web
|
||||||
|
sha256: c009e9beeb6c376e86aaa154fcc8b4e075d4bad90c56286b9668a51cdb6129ea
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -1005,14 +1165,22 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
|
vm_service:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vm_service
|
||||||
|
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "13.0.0"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.5.1"
|
||||||
win32:
|
win32:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1046,5 +1214,5 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "6.5.0"
|
version: "6.5.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.2.0 <4.0.0"
|
dart: ">=3.3.0 <4.0.0"
|
||||||
flutter: ">=3.16.0"
|
flutter: ">=3.19.0"
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ dependencies:
|
|||||||
statsfl: ^2.3.0
|
statsfl: ^2.3.0
|
||||||
glass_kit: ^4.0.1
|
glass_kit: ^4.0.1
|
||||||
flutter_facebook_auth: ^6.0.4
|
flutter_facebook_auth: ^6.0.4
|
||||||
|
firebase_core: ^2.25.5
|
||||||
|
google_sign_in: ^6.2.1
|
||||||
|
firebase_auth: ^4.20.0
|
||||||
|
logger: ^2.3.0
|
||||||
|
sign_in_with_apple: any
|
||||||
timer_button: ^2.1.1
|
timer_button: ^2.1.1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user