Compare commits
112 Commits
bfeddd6bc7
...
newchanges
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ee967cfd6 | ||
|
|
0b7d366d60 | ||
|
|
a93cb7214f | ||
|
|
143912fa1a | ||
|
|
4b0f264d53 | ||
|
|
02405fc097 | ||
|
|
b0040e84b8 | ||
|
|
190c72de1c | ||
|
|
00b2e87126 | ||
|
|
50102b9e7b | ||
|
|
166cf2e257 | ||
|
|
d5c4896fc4 | ||
|
|
39f4e6a6a3 | ||
|
|
d05c4fe467 | ||
|
|
174455ced9 | ||
|
|
57135da8ec | ||
|
|
59a5ca924b | ||
|
|
67df2a802d | ||
|
|
640be1823e | ||
|
|
5271dfe1cb | ||
|
|
9e86590e72 | ||
|
|
3f0514801e | ||
|
|
8365ca11bc | ||
|
|
4abc8103a2 | ||
|
|
089af9df2c | ||
|
|
8d99c7ea2b | ||
|
|
634b1a3bc4 | ||
|
|
725d2cb01d | ||
|
|
79105e3813 | ||
|
|
eeafd92625 | ||
|
|
435cdf0909 | ||
|
|
dcabb4966e | ||
|
|
c5b6a2e536 | ||
|
|
a67bcf9100 | ||
|
|
fc0a71d3c1 | ||
|
|
40ac2bef76 | ||
|
|
e9521c9315 | ||
|
|
417d3e6a63 | ||
|
|
562eec187e | ||
|
|
78c6999f94 | ||
|
|
b9d038b167 | ||
|
|
f46732290b | ||
|
|
abf668e14c | ||
|
|
43f4e2ddfc | ||
|
|
157ce0b4a9 | ||
|
|
4cebac15f6 | ||
|
|
03e2d5c817 | ||
|
|
d3618b1535 | ||
|
|
07f9168053 | ||
|
|
4a72a9c718 | ||
|
|
1bc84a0a98 | ||
|
|
d40658c6d3 | ||
|
|
459021c40f | ||
|
|
c2ba93738d | ||
|
|
2a2c0586f4 | ||
|
|
4d9ae79067 | ||
|
|
985b00b1c7 | ||
|
|
e969cbc458 | ||
|
|
b11e16340c | ||
|
|
2fa64b61ca | ||
|
|
04544aa0eb | ||
|
|
c45ee2e088 | ||
|
|
47c735da45 | ||
|
|
1af9882526 | ||
|
|
9365b858f9 | ||
|
|
dd878393c6 | ||
|
|
a31e34e790 | ||
|
|
2bfe5c8ef8 | ||
|
|
7c9b97b41f | ||
|
|
fb304ca5d8 | ||
|
|
df11515d6b | ||
|
|
ccc2a73929 | ||
|
|
a9ae9ac028 | ||
|
|
54da408ce1 | ||
|
|
3e8b1ee1de | ||
|
|
0fc8831d23 | ||
|
|
43a58f0d20 | ||
|
|
4d0e030cce | ||
|
|
6fbe45f2c0 | ||
|
|
88441af32b | ||
|
|
96b9ec224b | ||
|
|
5708d1e6e7 | ||
|
|
4d16f572cb | ||
|
|
7565b44143 | ||
|
|
aca96431b7 | ||
|
|
289c368a5a | ||
|
|
06f53f58e0 | ||
|
|
9ee76bca98 | ||
|
|
7ed2830e3b | ||
|
|
54283a2a4c | ||
|
|
d56f25864e | ||
|
|
47641d5f7b | ||
|
|
b0642c3ea5 | ||
|
|
3614bbb43d | ||
|
|
f8246d33ed | ||
|
|
f9fca85bf5 | ||
|
|
5cb32f1152 | ||
|
|
bb3eec2081 | ||
|
|
c108aa7ddd | ||
|
|
b547f96ec6 | ||
|
|
636f79fb60 | ||
|
|
7a33e1f2c0 | ||
|
|
7c47c2ce24 | ||
|
|
e6e84a058c | ||
|
|
1198c9b694 | ||
|
|
86b93fef5f | ||
|
|
6fbd5ece0d | ||
|
|
9b9f2ed42e | ||
|
|
db8fd0f98b | ||
|
|
a6bbf734e9 | ||
|
|
2ac83c5c37 | ||
| 7960707396 |
4
.vscode/settings.json
vendored
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"CodeGPT.apiKey": "CodeGPT Plus Beta",
|
||||
"dart.flutterSdkPath": "D:\\pooja\\fluttersdk\\flutter_3.16.9\\flutter"
|
||||
}
|
||||
@@ -22,6 +22,9 @@ if (flutterVersionName == null) {
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
// START: FlutterFire Configuration
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
// END: FlutterFire Configuration
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
|
||||
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"
|
||||
}
|
||||
@@ -16,10 +16,12 @@
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||
<application
|
||||
android:label="regroup"
|
||||
android:label="ReGroup"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
android:icon="@mipmap/launcher_icon"
|
||||
android:allowBackup="false"
|
||||
android:fullBackupContent="false">
|
||||
<activity
|
||||
android:name="com.yalantis.ucrop.UCropActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
||||
BIN
android/app/src/main/res/mipmap-hdpi/launcher_icon.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/launcher_icon.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">ReGroup123</string>
|
||||
<string name="facebook_app_id">8076081959097016</string>
|
||||
<string name="fb_login_protocol_scheme">fb8076081959097016</string>
|
||||
<string name="facebook_client_token">ca5a1805872edbec0d3a0a0b02229ba5</string>
|
||||
<string name="app_name">Regroup</string>
|
||||
<string name="facebook_app_id">803386025107790</string>
|
||||
<string name="fb_login_protocol_scheme">fb803386025107790</string>
|
||||
<string name="facebook_client_token">fa69ee794ff94e50c7ddbfac1e035cb9</string>
|
||||
</resources>
|
||||
@@ -6,6 +6,9 @@ buildscript {
|
||||
}
|
||||
|
||||
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 "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
|
||||
BIN
assets/images/jpg/AppLogo.jpg
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
assets/images/png/Ellipse 37 (1).png
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
assets/images/png/Rectangle 49 (1).png
Normal file
|
After Width: | Height: | Size: 3.8 MiB |
BIN
assets/images/png/edit 1.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
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"}}}}}}
|
||||
141
ios/Podfile.lock
@@ -1,4 +1,10 @@
|
||||
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):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
@@ -35,10 +41,47 @@ PODS:
|
||||
- DKPhotoGallery/Resource (0.0.19):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- FBAEMKit (16.3.1):
|
||||
- FBSDKCoreKit_Basics (= 16.3.1)
|
||||
- FBSDKCoreKit (16.3.1):
|
||||
- FBAEMKit (= 16.3.1)
|
||||
- FBSDKCoreKit_Basics (= 16.3.1)
|
||||
- FBSDKCoreKit_Basics (16.3.1)
|
||||
- FBSDKLoginKit (16.3.1):
|
||||
- FBSDKCoreKit (= 16.3.1)
|
||||
- file_picker (0.0.1):
|
||||
- DKImagePickerController/PhotoGallery
|
||||
- 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_facebook_auth (6.0.4):
|
||||
- FBSDKLoginKit (~> 16.3.1)
|
||||
- Flutter
|
||||
- fluttertoast (0.0.2):
|
||||
- Flutter
|
||||
- Toast
|
||||
@@ -47,11 +90,51 @@ PODS:
|
||||
- google_maps_flutter_ios (0.0.1):
|
||||
- Flutter
|
||||
- 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/Maps (= 6.2.1)
|
||||
- GoogleMaps/Base (6.2.1)
|
||||
- GoogleMaps/Maps (6.2.1):
|
||||
- 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):
|
||||
- Flutter
|
||||
- TOCropViewController (~> 2.7.3)
|
||||
@@ -64,12 +147,16 @@ PODS:
|
||||
- FlutterMacOS
|
||||
- permission_handler_apple (9.3.0):
|
||||
- Flutter
|
||||
- PromisesObjC (2.4.0)
|
||||
- RecaptchaInterop (100.0.0)
|
||||
- SDWebImage (5.19.2):
|
||||
- SDWebImage/Core (= 5.19.2)
|
||||
- SDWebImage/Core (5.19.2)
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sign_in_with_apple (0.0.1):
|
||||
- Flutter
|
||||
- SwiftyGif (5.4.5)
|
||||
- Toast (4.1.1)
|
||||
- TOCropViewController (2.7.4)
|
||||
@@ -78,22 +165,43 @@ DEPENDENCIES:
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/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_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`)
|
||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/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_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
|
||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- AppAuth
|
||||
- DKImagePickerController
|
||||
- DKPhotoGallery
|
||||
- FBAEMKit
|
||||
- FBSDKCoreKit
|
||||
- FBSDKCoreKit_Basics
|
||||
- FBSDKLoginKit
|
||||
- Firebase
|
||||
- FirebaseAppCheckInterop
|
||||
- FirebaseAuth
|
||||
- FirebaseCore
|
||||
- FirebaseCoreInternal
|
||||
- GoogleMaps
|
||||
- GoogleSignIn
|
||||
- GoogleUtilities
|
||||
- GTMAppAuth
|
||||
- GTMSessionFetcher
|
||||
- PromisesObjC
|
||||
- RecaptchaInterop
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- Toast
|
||||
@@ -106,14 +214,22 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||
file_picker:
|
||||
:path: ".symlinks/plugins/file_picker/ios"
|
||||
firebase_auth:
|
||||
:path: ".symlinks/plugins/firebase_auth/ios"
|
||||
firebase_core:
|
||||
:path: ".symlinks/plugins/firebase_core/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_facebook_auth:
|
||||
:path: ".symlinks/plugins/flutter_facebook_auth/ios"
|
||||
fluttertoast:
|
||||
:path: ".symlinks/plugins/fluttertoast/ios"
|
||||
geolocator_apple:
|
||||
:path: ".symlinks/plugins/geolocator_apple/ios"
|
||||
google_maps_flutter_ios:
|
||||
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
||||
google_sign_in_ios:
|
||||
:path: ".symlinks/plugins/google_sign_in_ios/darwin"
|
||||
image_cropper:
|
||||
:path: ".symlinks/plugins/image_cropper/ios"
|
||||
image_gallery_saver:
|
||||
@@ -126,25 +242,48 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sign_in_with_apple:
|
||||
:path: ".symlinks/plugins/sign_in_with_apple/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
|
||||
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
|
||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
|
||||
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
|
||||
FBAEMKit: 6c7b5eb77c96861bb59e040842c6e55bf39512ce
|
||||
FBSDKCoreKit: 5e4dd478947ab1bcc887e8cfadeae0727af1a942
|
||||
FBSDKCoreKit_Basics: cd7b5f5d1e8868c26706917919d058999ca672c3
|
||||
FBSDKLoginKit: 572cca0bc6c90067ef197187697cb3b584310c52
|
||||
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
||||
firebase_auth: 5719ddc9f654b813405899480e84971bd8e61235
|
||||
firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197
|
||||
FirebaseAppCheckInterop: 5315f40293191bfec04b2cfab0215760e441540a
|
||||
FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb
|
||||
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
||||
FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_facebook_auth: c8700ab1770f3d8e5e7456220e4f3bbcdb831454
|
||||
fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db
|
||||
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
|
||||
google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458
|
||||
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
|
||||
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
||||
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
|
||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
|
||||
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
|
||||
image_cropper: 2c150b3d63f4feaad31054d20381ddac0a460e63
|
||||
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
||||
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
|
||||
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
|
||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
||||
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
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 */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -35,6 +36,7 @@
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
@@ -46,6 +48,7 @@
|
||||
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>"; };
|
||||
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; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -90,6 +93,7 @@
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
01448FBCAC46C16EC8BC1181 /* Pods */,
|
||||
DE8E73CF7AB07643531FB23E /* Frameworks */,
|
||||
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -104,6 +108,7 @@
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5210D9302C4006FC0040021E /* Runner.entitlements */,
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
@@ -146,6 +151,8 @@
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
@@ -156,7 +163,7 @@
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1430;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
@@ -174,6 +181,8 @@
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
packageReferences = (
|
||||
);
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
@@ -192,6 +201,7 @@
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
9FD3FE5A0194B5B2D8202DCF /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -375,6 +385,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
DEVELOPMENT_TEAM = A89AY6VY4F;
|
||||
ENABLE_BITCODE = NO;
|
||||
@@ -508,6 +519,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
DEVELOPMENT_TEAM = A89AY6VY4F;
|
||||
ENABLE_BITCODE = NO;
|
||||
@@ -535,6 +547,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
DEVELOPMENT_TEAM = A89AY6VY4F;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"originHash" : "ca3cf5f8f83d297b47d2cb0edff3e06f294951e2e06fa55cfc82831103499b2a",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "facebook-ios-sdk",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/facebook/facebook-ios-sdk",
|
||||
"state" : {
|
||||
"revision" : "c19607d535864533523d1f437c84035e5fb101cf",
|
||||
"version" : "14.1.0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1430"
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 467 KiB |
|
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 1018 B |
|
Before Width: | Height: | Size: 462 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 22 KiB |
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>
|
||||
@@ -51,5 +51,29 @@
|
||||
<string>Regroup get write-only access to the user photo library</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Allow access to photo library</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>To capture profile photo please grant camera access</string>
|
||||
<!-- facebook start -->
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>fb803386025107790</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>FacebookAppID</key>
|
||||
<string>803386025107790</string>
|
||||
<key>FacebookClientToken</key>
|
||||
<string>fa69ee794ff94e50c7ddbfac1e035cb9</string>
|
||||
<key>FacebookDisplayName</key>
|
||||
<string>Regroup</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>fbapi</string>
|
||||
<string>fb-messenger-share-api</string>
|
||||
</array>
|
||||
<!-- facebook end -->
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -4,5 +4,9 @@
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.applesignin</key>
|
||||
<array>
|
||||
<string>Default</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:glassmorphism_ui/glassmorphism_ui.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/controller/MainController.dart';
|
||||
|
||||
GlassContainer bottomnavigationbar(MainController _mainController) {
|
||||
@@ -11,7 +9,7 @@ GlassContainer bottomnavigationbar(MainController _mainController) {
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
blur: 6,
|
||||
blur: 2,
|
||||
opacity: 0.2,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
@@ -202,7 +200,7 @@ GlassContainer bottomnavigationbar(MainController _mainController) {
|
||||
))
|
||||
],
|
||||
),
|
||||
label: 'Calender',
|
||||
label: 'Calendar',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
|
||||
import 'dart:ui';
|
||||
|
||||
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -8,7 +8,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
|
||||
class CommonDropdownBtn extends StatefulWidget {
|
||||
CommonDropdownBtn({
|
||||
@@ -107,7 +106,7 @@ class _CommonDropdownBtnState extends State<CommonDropdownBtn> {
|
||||
Color(0xFFffffff).withOpacity(0.8),
|
||||
Color(0xFFFFFFFF).withOpacity(0.8),
|
||||
],
|
||||
stops: [
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
]),
|
||||
@@ -245,7 +244,7 @@ class _CommonDropdownradioBtnState extends State<CommonDropdownradioBtn> {
|
||||
Color(0xFFffffff).withOpacity(0.8),
|
||||
Color(0xFFFFFFFF).withOpacity(0.8),
|
||||
],
|
||||
stops: [0.1, 1],
|
||||
stops: const [0.1, 1],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(
|
||||
@@ -589,7 +588,7 @@ class _CommonDropdownCheckboxState extends State<CommonDropdownCheckbox> {
|
||||
Color(0xFFffffff).withOpacity(0.8),
|
||||
Color(0xFFFFFFFF).withOpacity(0.8),
|
||||
],
|
||||
stops: [0.1, 1],
|
||||
stops: const [0.1, 1],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
border: Border.all(
|
||||
|
||||
@@ -12,7 +12,10 @@ Widget commonGlassContainer({
|
||||
double opacity2 = 0.05,
|
||||
Color borderColor = const Color(0xff434A53),
|
||||
}) {
|
||||
return GlassmorphicContainer(
|
||||
return
|
||||
|
||||
|
||||
GlassmorphicContainer(
|
||||
width: width,
|
||||
height: height,
|
||||
borderRadius: borderradius,
|
||||
@@ -23,7 +26,7 @@ Widget commonGlassContainer({
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(opacity1),
|
||||
const Color(0xFFFFFFFF).withOpacity(opacity1),
|
||||
const Color(0xFFFFFFFF).withOpacity(opacity2),
|
||||
],
|
||||
stops: const [
|
||||
@@ -61,8 +64,8 @@ Widget commonGlassContainerblue({
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFF009DAB).withOpacity(0.48),
|
||||
Color(0xFF009DAB).withOpacity(0.12),
|
||||
const Color(0xFF009DAB).withOpacity(0.48),
|
||||
const Color(0xFF009DAB).withOpacity(0.12),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
@@ -85,7 +88,7 @@ Widget commonGlassUIBlue({
|
||||
required double height,
|
||||
required Widget customWidget,
|
||||
// required double border,
|
||||
double mainOpacity = 0.05,
|
||||
double mainOpacity = 1,
|
||||
Color borderColor = const Color(0xff434A53),
|
||||
required BorderRadius? borderRadius,
|
||||
}) {
|
||||
@@ -99,8 +102,8 @@ Widget commonGlassUIBlue({
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFF009DAB).withOpacity(0.48),
|
||||
Color(0xFF009DAB).withOpacity(0.12),
|
||||
const Color(0xFF009DAB).withOpacity(0.48),
|
||||
const Color(0xFF009DAB).withOpacity(0.12),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
@@ -127,13 +130,13 @@ Widget commonGlassUI({
|
||||
width: width,
|
||||
height: height,
|
||||
borderRadius: borderRadius,
|
||||
blur: 6,
|
||||
blur: 2,
|
||||
opacity: mainOpacity,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(opacity1),
|
||||
const Color(0xFFFFFFFF).withOpacity(opacity1),
|
||||
const Color(0xFFFFFFFF).withOpacity(opacity2),
|
||||
],
|
||||
stops: const [
|
||||
@@ -144,3 +147,38 @@ Widget commonGlassUI({
|
||||
border: Border.all(color: borderColor, width: borderwidth),
|
||||
child: customWidget);
|
||||
}
|
||||
|
||||
Widget commonContainer({
|
||||
required double width,
|
||||
required double height,
|
||||
// required double border,
|
||||
// double mainOpacity = 1,
|
||||
double opacity1 = 0.04,
|
||||
double opacity2 = 0.05,
|
||||
Color borderColor = const Color(0xff434A53),
|
||||
double borderwidth = 1.0,
|
||||
BorderRadius? borderRadius,
|
||||
required Widget customWidget,
|
||||
BoxShape boxShape = BoxShape.rectangle,
|
||||
}) {
|
||||
return Container(
|
||||
width: width,
|
||||
height: height,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: borderRadius,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFFFFFFF).withOpacity(opacity1),
|
||||
const Color(0xFFFFFFFF).withOpacity(opacity2),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
shape: boxShape,
|
||||
border: Border.all(color: borderColor, width: borderwidth)),
|
||||
child: customWidget);
|
||||
}
|
||||
|
||||
@@ -5,15 +5,16 @@ class CommonTabBar extends StatelessWidget {
|
||||
// Set the desired height
|
||||
|
||||
final List<Tab> tabs;
|
||||
CommonTabBar({required this.tabs,});
|
||||
const CommonTabBar({super.key, required this.tabs,});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TabBar(
|
||||
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
|
||||
|
||||
dividerColor: const Color(0xFFFFFFFF).withOpacity(0.07),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
@@ -21,7 +22,7 @@ class CommonTabBar extends StatelessWidget {
|
||||
// labelColor: Colors.white,
|
||||
indicatorWeight: 2.h,
|
||||
dividerHeight: 2.h,
|
||||
unselectedLabelColor: Color(0xFFFCFCFC),
|
||||
unselectedLabelColor: const Color(0xFFFCFCFC),
|
||||
overlayColor: MaterialStateProperty.all(const Color(0xFFD90B2E)),
|
||||
tabs: tabs);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
@@ -78,13 +77,13 @@ Widget MessageTextInputField(
|
||||
labelStyle: const TextStyle(color: Colors.black),
|
||||
errorStyle: TextStyle(
|
||||
fontSize: 13.sp,
|
||||
color: Color.fromARGB(255, 245, 130, 122),
|
||||
color: const Color.fromARGB(255, 245, 130, 122),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 12.0,
|
||||
horizontal: 16), //<-- Adjust the vertical padding as needed
|
||||
filled: true,
|
||||
fillColor: Color(0xFFFFF3E4),
|
||||
fillColor: const Color(0xFFFFF3E4),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderSide: const BorderSide(color: Color(0xFFE8C69F80), width: 1),
|
||||
@@ -124,7 +123,7 @@ Widget commonDivider() {
|
||||
return Container(
|
||||
height: 1.5.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
@@ -154,7 +153,7 @@ Future<void> datePicker(
|
||||
onSecondary: Colors.white),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Color(0xFFD90B2E),
|
||||
foregroundColor: const Color(0xFFD90B2E),
|
||||
),
|
||||
));
|
||||
final DateTime? picked = await showDatePicker(
|
||||
@@ -171,7 +170,7 @@ Future<void> datePicker(
|
||||
);
|
||||
|
||||
if (picked != null) {
|
||||
controller.text = DateFormat('dd-MM-yyyy').format(picked);
|
||||
controller.text = DateFormat('yyyy-MM-dd').format(picked);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,11 +185,11 @@ Future<TimeOfDay?> showCustomTimePicker(BuildContext context,
|
||||
onSurface: Colors.white,
|
||||
),
|
||||
textTheme: Theme.of(context).textTheme.copyWith(
|
||||
headline6: TextStyle(color: Colors.blue), // Change the title color
|
||||
titleLarge: const TextStyle(color: Colors.blue), // Change the title color
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Color(0xFFD90B2E),
|
||||
foregroundColor: const Color(0xFFD90B2E),
|
||||
),
|
||||
));
|
||||
return showTimePicker(
|
||||
@@ -219,13 +218,13 @@ Widget stackContainers({
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFD90B2E),
|
||||
border: Border.all(color: Color(0xFF2C3742), width: 1),
|
||||
color: const Color(0xFFD90B2E),
|
||||
border: Border.all(color: const Color(0xFF2C3742), width: 1),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
number,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 8,
|
||||
@@ -248,7 +247,7 @@ Widget stackContainers({
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Color(0xFF2C3742), width: 1),
|
||||
border: Border.all(color: const Color(0xFF2C3742), width: 1),
|
||||
),
|
||||
child: CircleAvatar(
|
||||
foregroundImage: AssetImage(containerImages[index]),
|
||||
@@ -265,6 +264,73 @@ Widget stackContainers({
|
||||
);
|
||||
}
|
||||
|
||||
Widget stackContainersGroups({
|
||||
required String number,
|
||||
required List<String> containerImages,
|
||||
}) {
|
||||
// Define the maximum number of images to display
|
||||
const maxImagesToShow = 3;
|
||||
|
||||
// Calculate the number of images to show and the remaining count
|
||||
final remainingCount = containerImages.length - maxImagesToShow;
|
||||
final imagesToShow = containerImages.take(maxImagesToShow).toList();
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Container(
|
||||
height: 30,
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: const Color(0xFFD90B2E),
|
||||
border: Border.all(color: const Color(0xFF2C3742), width: 1),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
remainingCount > 0 ? '+$remainingCount' : '',
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 8,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 22.w,
|
||||
child: SizedBox(
|
||||
height: 30,
|
||||
width: 30 * maxImagesToShow.toDouble(),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: List.generate(imagesToShow.length, (index) {
|
||||
return Positioned(
|
||||
left: index * 22.0,
|
||||
child: Container(
|
||||
height: 30,
|
||||
width: 30,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: const Color(0xFF2C3742), width: 1),
|
||||
),
|
||||
child: CircleAvatar(
|
||||
backgroundImage: NetworkImage(imagesToShow[index]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget stackContainers2({
|
||||
required List<String> containerImages,
|
||||
}) {
|
||||
@@ -284,7 +350,7 @@ Widget stackContainers2({
|
||||
width: 40,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Color(0xFF2C3742), width: 1),
|
||||
border: Border.all(color: const Color(0xFF2C3742), width: 1),
|
||||
),
|
||||
child: CircleAvatar(
|
||||
foregroundImage: AssetImage(containerImages[index]),
|
||||
@@ -312,15 +378,25 @@ Widget stackReaction({
|
||||
return Positioned(
|
||||
top: 6.h,
|
||||
left: index * 23.w,
|
||||
child: commonGlassUI(
|
||||
child: Container(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
mainOpacity: 1,
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
|
||||
customWidget: Center(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFFFFFFF).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.06),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
border: Border.all(color: const Color(0xFF1E3A46), width: 1.71)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
containerImages[index],
|
||||
height: 18.h,
|
||||
|
||||
115
lib/Common/api_urls.dart
Normal file
@@ -0,0 +1,115 @@
|
||||
class ApiUrls {
|
||||
static const baseUrl = "https://regroup.betadelivery.com/api/v1/";
|
||||
|
||||
static const getlogin = "${baseUrl}login";
|
||||
static const forgotpassword = "${baseUrl}forgot-password";
|
||||
static const verifyotp = "${baseUrl}forgot-password/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 verifyregisteration = "${baseUrl}verify_otp";
|
||||
|
||||
static const tellusIndividual = "${baseUrl}add_profile";
|
||||
|
||||
static const getIndividualactivity = "${baseUrl}fetch-interests";
|
||||
|
||||
static const postindividualactivity = "${baseUrl}select-interests";
|
||||
|
||||
static const getgroups = "${baseUrl}fetch-groups";
|
||||
|
||||
static const postgroups = "${baseUrl}select-groups";
|
||||
|
||||
static const getcommunities = "${baseUrl}fetch-communities";
|
||||
|
||||
static const postcommunities = "${baseUrl}select-communities";
|
||||
|
||||
static const googlelogin = "${baseUrl}sign-in-with-google-login";
|
||||
static const applelogin = "${baseUrl}apple-login-or-registration";
|
||||
static const facebooklogin = "${baseUrl}facebook-login";
|
||||
|
||||
static const storeDetailsOfOAuth = "${baseUrl}update-user-account-type";
|
||||
|
||||
static const getuserdetails = "${baseUrl}get-auth-user-data";
|
||||
|
||||
static const getfaqs = "${baseUrl}fetch-faqs";
|
||||
|
||||
static const getprivacypolicy = "${baseUrl}fetch-privacy-policy";
|
||||
|
||||
static const gettermsconditios = "${baseUrl}fetch-terms-and-condition";
|
||||
|
||||
static const postcontactus = "${baseUrl}contact-us";
|
||||
|
||||
static const postreportbug = "${baseUrl}bug-report";
|
||||
|
||||
static const getfollowers = "${baseUrl}fetch-followers";
|
||||
|
||||
static const getfollowing = "${baseUrl}fetch-following";
|
||||
|
||||
static const postblock = "${baseUrl}block-profile";
|
||||
|
||||
static const postunfollow = "${baseUrl}follow-user";
|
||||
|
||||
static const postremoveuser = "${baseUrl}remove-follower";
|
||||
|
||||
static const postchangepassword = "${baseUrl}update-password-send-otp";
|
||||
|
||||
static const postchangepassverify = "${baseUrl}verify-update-password-otp";
|
||||
|
||||
static const gettimelineabilitylist = "${baseUrl}list-of-abilities";
|
||||
|
||||
static const posttimeline = "${baseUrl}create-timeline";
|
||||
|
||||
static const postaccountvisibility = "${baseUrl}account-visibility";
|
||||
|
||||
static const postdeleteaccount = "${baseUrl}delete-my-account";
|
||||
|
||||
static const postlogoutaccount = "${baseUrl}logout";
|
||||
|
||||
static const getedittimeline = "${baseUrl}get-timeline-data";
|
||||
|
||||
static const postedittimeline = "${baseUrl}update-timeline";
|
||||
|
||||
static const postremovetimeline = "${baseUrl}delete-timeline";
|
||||
|
||||
static const postremovecertification = "${baseUrl}delete-certification";
|
||||
|
||||
static const postcertification = "${baseUrl}store-certification";
|
||||
|
||||
static const getaccountsessions = "${baseUrl}get-account-session";
|
||||
|
||||
static const postuserdevice = "${baseUrl}store-account-session";
|
||||
|
||||
static const getmyjoinedgroups = "${baseUrl}my-joined-groups";
|
||||
|
||||
static const getusercertificates = "${baseUrl}my-certificates";
|
||||
|
||||
static const postnotification = "${baseUrl}update-notification-settings";
|
||||
static const getnotification = "${baseUrl}fetch-notification-settings";
|
||||
|
||||
static const getblockuser = "${baseUrl}fetch-blocked-profile";
|
||||
static const postblockuser = "${baseUrl}block-profile";
|
||||
|
||||
// Individual
|
||||
static const posteditprofile = "${baseUrl}update-profile";
|
||||
static const geteditprofile = "${baseUrl}fetch-profile";
|
||||
static const getinterestlist = "${baseUrl}fetch-interests";
|
||||
|
||||
|
||||
|
||||
// Business
|
||||
static const posteditprofilebusiness = "${baseUrl}update-business-profile";
|
||||
static const geteditprofilebusiness = "${baseUrl}fetch-business-profile";
|
||||
|
||||
//Guest
|
||||
|
||||
static const getGuestProfileInd =
|
||||
"${baseUrl}get-guest-view-of-individual-user-profile";
|
||||
static const getGuestProfileBus =
|
||||
"${baseUrl}get-guest-view-of-business-user-profile";
|
||||
|
||||
static const getGuestfollowers = "${baseUrl}get-guest-user-followers";
|
||||
static const getGuestfollowing = "${baseUrl}get-guest-user-following";
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/chatsmainscreen.da
|
||||
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/GroupTab/View/GroupTab.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/ProfileTab.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart';
|
||||
|
||||
class MainController extends GetxController {
|
||||
var selectedIndex = 0.obs;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/controller/MainController.dart';
|
||||
|
||||
@@ -9,11 +10,56 @@ class MainScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: mainController.currentTab[mainController.selectedIndex.value],
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
_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;
|
||||
}
|
||||
}
|
||||
|
||||
4
lib/Common/controller/data/network/BaseApiServices.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
abstract class BaseApiServices {
|
||||
Future<dynamic> getApi(String url);
|
||||
Future<dynamic> postApi(var data, String url);
|
||||
}
|
||||
@@ -5,38 +5,76 @@ import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:get/get.dart' hide Response;
|
||||
import 'package:regroup/Global.dart';
|
||||
import 'package:regroup/Utils/base_manager.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import 'entry_point_controller.dart';
|
||||
import '../../entry_point_controller.dart';
|
||||
|
||||
class NetworkApi {
|
||||
class NetworkApiServices {
|
||||
Dio dio = Dio();
|
||||
final controllerEntryPoint = Get.put(EntryPointController());
|
||||
|
||||
Future<ResponseData> getApi(String url) async {
|
||||
String basicAuth = 'Basic ' +
|
||||
base64.encode(
|
||||
utf8.encode('RegroupUserName:71%@L%es^bUX94`J9XT*@bh,._WWM{\$%^^&&'));
|
||||
|
||||
Future<ResponseData> getApi(String url, {bool optionalpar = false}) async {
|
||||
if (kDebugMode) {
|
||||
print("api url is >>> $url");
|
||||
}
|
||||
Response response;
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
token = prefs.getString('token');
|
||||
token = prefs.getString('access-token');
|
||||
print("url is $url");
|
||||
log(token.toString());
|
||||
|
||||
try {
|
||||
response = await dio.get(url,
|
||||
options: Options(headers: {
|
||||
"authorization": "Bearer $token",
|
||||
'content-Type': 'application/json',
|
||||
}));
|
||||
} on Exception catch (_) {
|
||||
response = await dio.get(
|
||||
url,
|
||||
options:
|
||||
// Options(headers: {
|
||||
// "authorization": "Bearer $token",
|
||||
// 'content-Type': 'application/json',
|
||||
// })
|
||||
optionalpar
|
||||
? Options(
|
||||
headers: {
|
||||
"authorization": basicAuth,
|
||||
},
|
||||
)
|
||||
: Options(
|
||||
headers: {
|
||||
'authorization': basicAuth,
|
||||
'access-token': token
|
||||
},
|
||||
),
|
||||
);
|
||||
} on Exception catch (e) {
|
||||
log(e.toString());
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong', ResponseStatus.FAILED);
|
||||
}
|
||||
// on Exception catch (e) {
|
||||
// if (e is DioException) {
|
||||
// if (e.response!.statusCode == 403) {
|
||||
// return ResponseData<dynamic>(
|
||||
// e.response!.data['message'][0]!, ResponseStatus.FAILED,
|
||||
// data: e.response!.data);
|
||||
// }
|
||||
// }
|
||||
// return ResponseData<dynamic>(
|
||||
// 'Oops something Went Wrong',
|
||||
// ResponseStatus.FAILED,
|
||||
// );
|
||||
// }
|
||||
if (response.statusCode == 200) {
|
||||
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
|
||||
data: response.data);
|
||||
} else if (response.statusCode == 201) {
|
||||
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
|
||||
data: response.data);
|
||||
} else if (response.statusCode == 404) {
|
||||
return ResponseData<dynamic>("error", ResponseStatus.ERROR,
|
||||
data: response.data);
|
||||
@@ -51,45 +89,140 @@ class NetworkApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData> postApi({data, required String url}) async {
|
||||
// Future<ResponseData> postApi(
|
||||
// data,
|
||||
// String url,
|
||||
// {bool optionalpar = false}
|
||||
// ) async {
|
||||
// if (kDebugMode) {
|
||||
// print("data >>> $data");
|
||||
// print("api url is >>> $url");
|
||||
// }
|
||||
// Response response;
|
||||
// SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// // ignore: unused_local_variable
|
||||
// String? token = prefs.getString('token').toString();
|
||||
// print("token is $token");
|
||||
// log(token.toString());
|
||||
// try {
|
||||
// response = await dio.post(url,
|
||||
// data: data,
|
||||
// options: optionalpar
|
||||
// ?
|
||||
// Options(
|
||||
// headers: {
|
||||
// "authorization": basicAuth,
|
||||
// },
|
||||
// )
|
||||
// :
|
||||
// Options(
|
||||
// headers: {'authorization': basicAuth, 'access-token': token},
|
||||
// ),
|
||||
// );
|
||||
// log(response.toString());
|
||||
// } on Exception catch (e) {
|
||||
// if (e is DioException) {
|
||||
// log(e.response.toString());
|
||||
// }
|
||||
// return ResponseData<dynamic>(
|
||||
// 'Opps something went wrong', ResponseStatus.FAILED);
|
||||
// }
|
||||
|
||||
// // if (kDebugMode) {
|
||||
// // print(response);
|
||||
// // }
|
||||
|
||||
// // print("response in post $response");
|
||||
|
||||
// if (response.statusCode == 200) {
|
||||
// // print(response.data);
|
||||
|
||||
// return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
|
||||
// data: response.data);
|
||||
// } else {
|
||||
// try {
|
||||
// return ResponseData<dynamic>(
|
||||
// response.data['message'].toString(), ResponseStatus.FAILED);
|
||||
// } catch (_) {
|
||||
// return ResponseData<dynamic>(
|
||||
// response.statusMessage!, ResponseStatus.FAILED);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//New post api
|
||||
|
||||
@override
|
||||
Future<ResponseData> postApi(data, String url,
|
||||
{bool optionalpar = false}) async {
|
||||
if (kDebugMode) {
|
||||
print("data >>> $data");
|
||||
print("api url is >>> $url");
|
||||
}
|
||||
Response response;
|
||||
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// ignore: unused_local_variable
|
||||
String? token = prefs.getString('token').toString();
|
||||
print("token is $token");
|
||||
String? token = prefs.getString('access-token');
|
||||
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
data: data,
|
||||
options: Options(
|
||||
headers: {
|
||||
"authorization": "Bearer $token",
|
||||
'content-Type': 'application/json',
|
||||
"Accept": 'application/json'
|
||||
},
|
||||
));
|
||||
response = await dio.post(
|
||||
url,
|
||||
data: data,
|
||||
options: optionalpar
|
||||
// (token != null)
|
||||
? Options(
|
||||
headers: {
|
||||
"authorization": basicAuth,
|
||||
},
|
||||
)
|
||||
: Options(
|
||||
headers: {'authorization': basicAuth, 'access-token': token},
|
||||
),
|
||||
);
|
||||
log(response.toString());
|
||||
} on Exception catch (e) {
|
||||
if (e is DioException) {
|
||||
log(e.response.toString());
|
||||
if (e.response == null) {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
if (e.response!.statusCode == 401) {
|
||||
prefs.remove('token');
|
||||
prefs.remove('refreshToken');
|
||||
// Get.toNamed(RouteName.login);
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
if (e.response!.statusCode == 403) {
|
||||
if (e.response!.data['message'] is List) {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'][0]!, ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'], ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ResponseData<dynamic>(
|
||||
'Opps something went wrong', ResponseStatus.FAILED);
|
||||
'Oops something Went Wrong',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
|
||||
// if (kDebugMode) {
|
||||
// print(response);
|
||||
// }
|
||||
|
||||
// print("response in post $response");
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
// print(response.data);
|
||||
|
||||
if (response.statusCode == 200 || response.statusCode == 201) {
|
||||
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
|
||||
data: response.data);
|
||||
} else if (response.statusCode == 203) {
|
||||
print(response.data);
|
||||
return ResponseData<dynamic>("success", ResponseStatus.PRIVATE,
|
||||
data: response.data);
|
||||
} else {
|
||||
try {
|
||||
return ResponseData<dynamic>(
|
||||
@@ -109,7 +242,7 @@ class NetworkApi {
|
||||
Response response;
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// ignore: unused_local_variable
|
||||
String? token = prefs.getString('token').toString();
|
||||
String? token = prefs.getString('access-token').toString();
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
data: data,
|
||||
@@ -196,17 +329,18 @@ class NetworkApi {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
var errorMessage = jsonResp["errors"]["email2"].join(", ") + "\n" +
|
||||
jsonResp["errors"]["contact_number2"].join(", ");
|
||||
var errorMessage = jsonResp["errors"]["email2"].join(", ") +
|
||||
"\n" +
|
||||
jsonResp["errors"]["contact_number2"].join(", ");
|
||||
// return ResponseData<dynamic>(
|
||||
// jsonResp["errors"][0]["email2"] +
|
||||
// jsonResp["errors"][0]["contact_number2"],
|
||||
// ResponseStatus.PRIVATE,
|
||||
// );
|
||||
return ResponseData<String>(
|
||||
errorMessage,
|
||||
ResponseStatus.PRIVATE,
|
||||
);
|
||||
return ResponseData<String>(
|
||||
errorMessage,
|
||||
ResponseStatus.PRIVATE,
|
||||
);
|
||||
} else if (response.statusCode == 500) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
@@ -230,7 +364,7 @@ class NetworkApi {
|
||||
Response response;
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// String? token = prefs.getString('token');
|
||||
String? token = prefs.getString('token').toString();
|
||||
String? token = prefs.getString('access-token').toString();
|
||||
print("token is $token");
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
LatLng? latlong;
|
||||
|
||||
@@ -25,3 +26,16 @@ getLocation() async {
|
||||
print('done');
|
||||
}
|
||||
|
||||
|
||||
setname() async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
String? token = prefs.getString('token');
|
||||
if (token != null) {
|
||||
// await ProfileAPI().getApi();
|
||||
// prefs.setString('email', getProfileObj!.data!.email!);
|
||||
// prefs.setString('profile_img', getProfileObj!.data!.profilePhoto!);
|
||||
// prefs.setString('firstName', getProfileObj!.data!.firstName!);
|
||||
// prefs.setString('phoneNo', getProfileObj!.data!.phoneNo ?? "");
|
||||
// prefs.setInt('complete', getProfileObj!.data!.profileComplete ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,8 @@ import 'package:regroup/Common/CommonDropDown.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.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';
|
||||
@@ -33,8 +31,8 @@ class _AddEventState extends State<AddEvent> {
|
||||
TextEditingController dateController = TextEditingController();
|
||||
TextEditingController dateController2 = TextEditingController();
|
||||
|
||||
TimeOfDay? starttime = TimeOfDay(hour: 15, minute: 0);
|
||||
TimeOfDay? endtime = TimeOfDay(hour: 15, minute: 0);
|
||||
TimeOfDay? starttime = const TimeOfDay(hour: 15, minute: 0);
|
||||
TimeOfDay? endtime = const TimeOfDay(hour: 15, minute: 0);
|
||||
|
||||
String formatTimeOfDay(TimeOfDay time) {
|
||||
final now = DateTime.now();
|
||||
@@ -48,10 +46,10 @@ class _AddEventState extends State<AddEvent> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -69,7 +67,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
text16400white("Event Title"),
|
||||
sizedBoxHeight(14.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -101,10 +99,10 @@ class _AddEventState extends State<AddEvent> {
|
||||
},
|
||||
child: DottedBorder(
|
||||
strokeWidth: 1,
|
||||
dashPattern: [7, 4],
|
||||
dashPattern: const [7, 4],
|
||||
borderType: BorderType.RRect,
|
||||
radius: Radius.circular(14.r),
|
||||
color: Color(0xFF434A53),
|
||||
color: const Color(0xFF434A53),
|
||||
child: commonGlassContainer(
|
||||
border: 0,
|
||||
width: double.infinity,
|
||||
@@ -130,12 +128,12 @@ class _AddEventState extends State<AddEvent> {
|
||||
width: 27,
|
||||
height: 27,
|
||||
decoration: ShapeDecoration(
|
||||
color: Color(0xFF7E7E7E),
|
||||
color: const Color(0xFF7E7E7E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(5)),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
@@ -190,7 +188,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
text12w400_FCFCFC_blur("10 kb")
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
'assets/images/png/cancelicon.png',
|
||||
height: 20.h,
|
||||
@@ -205,8 +203,8 @@ class _AddEventState extends State<AddEvent> {
|
||||
sizedBoxHeight(14.h),
|
||||
CommonDropdownBtn(
|
||||
hint: 'Race',
|
||||
items: [],
|
||||
leadingImage: Container(
|
||||
items: const ['', ''],
|
||||
leadingImage: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -221,8 +219,8 @@ class _AddEventState extends State<AddEvent> {
|
||||
sizedBoxHeight(14.h),
|
||||
CommonDropdownBtn(
|
||||
hint: 'Cycling',
|
||||
items: [],
|
||||
leadingImage: Container(
|
||||
items: const [],
|
||||
leadingImage: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -250,7 +248,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
child: CustomTextFormField(
|
||||
textEditingController: dateController,
|
||||
hintText: "1-4-2024",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -281,7 +279,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
child: CustomTextFormField(
|
||||
textEditingController: dateController2,
|
||||
hintText: "4-4-2024",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -336,7 +334,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -390,7 +388,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
customWidget: Transform.scale(
|
||||
scale: 1.4,
|
||||
child: Checkbox(
|
||||
side: BorderSide(color: Color(0xFF434A53)),
|
||||
side: const BorderSide(color: Color(0xFF434A53)),
|
||||
value: isChecked.value,
|
||||
activeColor: Colors.transparent,
|
||||
checkColor: Colors.white,
|
||||
@@ -410,8 +408,8 @@ class _AddEventState extends State<AddEvent> {
|
||||
sizedBoxHeight(14.h),
|
||||
CommonDropdownBtn(
|
||||
hint: '',
|
||||
items: [],
|
||||
leadingImage: Container(
|
||||
items: const [],
|
||||
leadingImage: SizedBox(
|
||||
height: 22.h,
|
||||
width: 28.w,
|
||||
child: Center(
|
||||
@@ -426,7 +424,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.addUsers);
|
||||
},
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -440,7 +438,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
),
|
||||
hintText: "",
|
||||
suffixIcon:
|
||||
Icon(Icons.arrow_forward, color: Color(0xFFFFFFFF)),
|
||||
const Icon(Icons.arrow_forward, color: Color(0xFFFFFFFF)),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
containerWidget(
|
||||
@@ -458,7 +456,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
text16400white("Location"),
|
||||
sizedBoxHeight(14.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 19.h,
|
||||
width: 15.w,
|
||||
child: Center(
|
||||
@@ -495,7 +493,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
children: [
|
||||
text16400white("Minutes"),
|
||||
sizedBoxWidth(5.w),
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
color: Colors.white,
|
||||
)
|
||||
@@ -532,7 +530,7 @@ class _AddEventState extends State<AddEvent> {
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
text16400white(title),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/cancelicon.png",
|
||||
height: 20.h,
|
||||
|
||||
@@ -64,21 +64,22 @@ class _AddUsersState extends State<AddUsers> {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Add users",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
), SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(10.h),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -102,7 +103,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
length: 3,
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(children: [
|
||||
CommonTabBar(tabs: const [
|
||||
const CommonTabBar(tabs: [
|
||||
Tab(
|
||||
text: 'Group',
|
||||
),
|
||||
@@ -117,9 +118,9 @@ class _AddUsersState extends State<AddUsers> {
|
||||
height: 600.h,
|
||||
child: TabBarView(
|
||||
children: [
|
||||
GroupTab(),
|
||||
SubgroupTab(),
|
||||
FollowersTab(),
|
||||
groupTab(),
|
||||
subgroupTab(),
|
||||
followersTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -128,7 +129,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
]));
|
||||
}
|
||||
|
||||
Widget GroupTab() {
|
||||
Widget groupTab() {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(30.h),
|
||||
@@ -137,7 +138,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
child: Row(
|
||||
children: [
|
||||
text18w700_FCFCFC("Group members"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
@@ -236,7 +237,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
text12w400_FCFCFC_blur(subtitle),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 1,
|
||||
borderradius: 2,
|
||||
@@ -247,7 +248,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
customWidget: Transform.scale(
|
||||
scale: 1.4,
|
||||
child: Checkbox(
|
||||
side: BorderSide(color: Color(0xFF434A53)),
|
||||
side: const BorderSide(color: Color(0xFF434A53)),
|
||||
value: isChecked,
|
||||
activeColor: Colors.transparent,
|
||||
checkColor: Colors.white,
|
||||
@@ -270,7 +271,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
color: Color(0xFF222935)),
|
||||
color: const Color(0xFF222935)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||
child: Column(
|
||||
@@ -306,7 +307,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
opacity2: 0.24,
|
||||
customWidget: Center(child: text16w400_FCFCFC("W")),
|
||||
border: 0.5),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
@@ -351,7 +352,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
opacity2: 0.24,
|
||||
customWidget: Center(child: text16w400_FCFCFC("Sa")),
|
||||
border: 0.5),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
@@ -379,7 +380,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFD90B2E).withOpacity(0.18),
|
||||
const Color(0xFFD90B2E).withOpacity(0.18),
|
||||
const Color(0xFFD90B2E).withOpacity(0.4),
|
||||
],
|
||||
stops: const [
|
||||
@@ -387,7 +388,7 @@ class _AddUsersState extends State<AddUsers> {
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
@@ -411,14 +412,14 @@ class _AddUsersState extends State<AddUsers> {
|
||||
));
|
||||
}
|
||||
|
||||
Widget SubgroupTab() {
|
||||
return Column(
|
||||
Widget subgroupTab() {
|
||||
return const Column(
|
||||
children: [],
|
||||
);
|
||||
}
|
||||
|
||||
Widget FollowersTab() {
|
||||
return Column(
|
||||
Widget followersTab() {
|
||||
return const Column(
|
||||
children: [],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:syncfusion_flutter_calendar/calendar.dart';
|
||||
|
||||
class Availability extends StatefulWidget {
|
||||
@@ -29,13 +28,13 @@ class _AvailabilityState extends State<Availability> {
|
||||
endTime: DateTime(2024, 6, 26, 10, 30),
|
||||
subject: 'Development Meeting',
|
||||
resourceIds: [4],
|
||||
color: Color(0XFFFC571D)),
|
||||
color: const Color(0XFFFC571D)),
|
||||
Appointment(
|
||||
startTime: DateTime(2024, 6, 26, 18, 0),
|
||||
endTime: DateTime(2024, 6, 26, 18, 30),
|
||||
subject: 'GeneralMeeting',
|
||||
resourceIds: [2],
|
||||
color: Color(0xFF8B1FA9)),
|
||||
color: const Color(0xFF8B1FA9)),
|
||||
Appointment(
|
||||
startTime: DateTime(2024, 6, 28, 9, 0),
|
||||
endTime: DateTime(2024, 6, 28, 10, 30),
|
||||
@@ -50,13 +49,13 @@ class _AvailabilityState extends State<Availability> {
|
||||
),
|
||||
Appointment(
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now().add(Duration(hours: 3)),
|
||||
endTime: DateTime.now().add(const Duration(hours: 3)),
|
||||
subject: 'Match day',
|
||||
resourceIds: [3],
|
||||
),
|
||||
Appointment(
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now().add(Duration(hours: 3)),
|
||||
endTime: DateTime.now().add(const Duration(hours: 3)),
|
||||
subject: 'Muharram/Ashura',
|
||||
resourceIds: [3],
|
||||
),
|
||||
@@ -64,37 +63,37 @@ class _AvailabilityState extends State<Availability> {
|
||||
_employeeCollection = <CalendarResource>[
|
||||
CalendarResource(
|
||||
id: 1,
|
||||
image: AssetImage("assets/images/png/cimg1.png"),
|
||||
image: const AssetImage("assets/images/png/cimg1.png"),
|
||||
displayName: 'Kaylly Vaccaro',
|
||||
color: Colors.transparent,
|
||||
),
|
||||
CalendarResource(
|
||||
id: 2,
|
||||
image: AssetImage("assets/images/png/cimg2.png"),
|
||||
image: const AssetImage("assets/images/png/cimg2.png"),
|
||||
displayName: 'Ryan Dorwart',
|
||||
color: Colors.transparent,
|
||||
),
|
||||
CalendarResource(
|
||||
id: 3,
|
||||
image: AssetImage("assets/images/png/cimg3.png"),
|
||||
image: const AssetImage("assets/images/png/cimg3.png"),
|
||||
displayName: 'Ahmad Rhiel',
|
||||
color: Colors.transparent,
|
||||
),
|
||||
CalendarResource(
|
||||
id: 4,
|
||||
image: AssetImage("assets/images/png/cimg3.png"),
|
||||
image: const AssetImage("assets/images/png/cimg3.png"),
|
||||
displayName: 'Ahmad Rhiel',
|
||||
color: Colors.transparent,
|
||||
),
|
||||
CalendarResource(
|
||||
id: 5,
|
||||
image: AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
image: const AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
displayName: 'Ahmad Rhiel',
|
||||
color: Colors.transparent,
|
||||
),
|
||||
CalendarResource(
|
||||
id: 6,
|
||||
image: AssetImage("assets/images/png/Ellipse 48.png"),
|
||||
image: const AssetImage("assets/images/png/Ellipse 48.png"),
|
||||
displayName: 'Ahmad Rhiel',
|
||||
color: Colors.transparent,
|
||||
),
|
||||
@@ -105,10 +104,10 @@ class _AvailabilityState extends State<Availability> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Availability",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -129,16 +128,16 @@ class _AvailabilityState extends State<Availability> {
|
||||
border: 0,
|
||||
customWidget: SfCalendar(
|
||||
view: CalendarView.timelineMonth,
|
||||
appointmentTextStyle: TextStyle(color: Colors.white),
|
||||
headerStyle: CalendarHeaderStyle(
|
||||
appointmentTextStyle: const TextStyle(color: Colors.white),
|
||||
headerStyle: const CalendarHeaderStyle(
|
||||
textStyle: TextStyle(
|
||||
color: Colors.blue,
|
||||
)),
|
||||
// blackoutDatesTextStyle: TextStyle(color: Colors.white),
|
||||
|
||||
weekNumberStyle: WeekNumberStyle(
|
||||
weekNumberStyle: const WeekNumberStyle(
|
||||
textStyle: TextStyle(color: Colors.white)),
|
||||
viewHeaderStyle: ViewHeaderStyle(
|
||||
viewHeaderStyle: const ViewHeaderStyle(
|
||||
// backgroundColor: Colors.amber,
|
||||
dateTextStyle: TextStyle(color: Colors.white),
|
||||
dayTextStyle: TextStyle(
|
||||
@@ -150,18 +149,18 @@ class _AvailabilityState extends State<Availability> {
|
||||
backgroundColor: Colors.transparent,
|
||||
// firstDayOfWeek: 3,
|
||||
cellBorderColor: Colors.white,
|
||||
todayHighlightColor: Color(0xFFD90B2E),
|
||||
todayHighlightColor: const Color(0xFFD90B2E),
|
||||
todayTextStyle: const TextStyle(color: Colors.white),
|
||||
controller: _calendarController,
|
||||
showNavigationArrow: true,
|
||||
allowViewNavigation: true,
|
||||
showDatePickerButton: true,
|
||||
monthViewSettings: MonthViewSettings(
|
||||
monthViewSettings: const MonthViewSettings(
|
||||
navigationDirection:
|
||||
MonthNavigationDirection.horizontal,
|
||||
),
|
||||
allowDragAndDrop: true,
|
||||
allowedViews: [
|
||||
allowedViews: const [
|
||||
// CalendarView.month,
|
||||
// CalendarView.day,
|
||||
// CalendarView.schedule,
|
||||
@@ -175,7 +174,7 @@ class _AvailabilityState extends State<Availability> {
|
||||
onTap: calendarTapped,
|
||||
timeSlotViewSettings: TimeSlotViewSettings(
|
||||
// minimumAppointmentDuration: Duration(hours: 5),
|
||||
timeTextStyle: TextStyle(
|
||||
timeTextStyle: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
timelineAppointmentHeight: 60.h,
|
||||
@@ -186,20 +185,20 @@ class _AvailabilityState extends State<Availability> {
|
||||
),
|
||||
monthCellBuilder: (context, details) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
details.date.day.toString(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color:
|
||||
Colors.white), // Set text color to white
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
resourceViewSettings: ResourceViewSettings(
|
||||
resourceViewSettings: const ResourceViewSettings(
|
||||
displayNameTextStyle:
|
||||
TextStyle(color: Colors.white, fontSize: 10),
|
||||
showAvatar: true,
|
||||
@@ -244,7 +243,7 @@ class _AvailabilityState extends State<Availability> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('Event Details'),
|
||||
title: const Text('Event Details'),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
@@ -255,7 +254,7 @@ class _AvailabilityState extends State<Availability> {
|
||||
),
|
||||
actions: <Widget>[
|
||||
ElevatedButton(
|
||||
child: Text('Close'),
|
||||
child: const Text('Close'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
||||
@@ -7,8 +7,6 @@ import 'package:regroup/Common/CommonBottomNavigationBar.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/controller/MainScreen.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/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
@@ -58,9 +56,9 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
List<Appointment>? _appointments;
|
||||
// final List<String> _nameCollection = <String>[];
|
||||
// final List<String> _userImages = <String>[];
|
||||
DateTime? _startDate;
|
||||
DateTime? _endDate;
|
||||
bool _isRangeSelection = false;
|
||||
// DateTime? _startDate;
|
||||
// DateTime? _endDate;
|
||||
// bool _isRangeSelection = false;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -72,12 +70,12 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
startTime: DateTime(2024, 6, 26, 9, 0),
|
||||
endTime: DateTime(2024, 6, 26, 10, 30),
|
||||
subject: 'Development Meeting',
|
||||
color: Color(0XFFFC571D)),
|
||||
color: const Color(0XFFFC571D)),
|
||||
Appointment(
|
||||
startTime: DateTime(2024, 6, 26, 18, 0),
|
||||
endTime: DateTime(2024, 6, 26, 18, 30),
|
||||
subject: 'GeneralMeeting',
|
||||
color: Color(0xFF8B1FA9)),
|
||||
color: const Color(0xFF8B1FA9)),
|
||||
Appointment(
|
||||
startTime: DateTime(2024, 6, 28, 9, 0),
|
||||
endTime: DateTime(2024, 6, 28, 10, 30),
|
||||
@@ -90,12 +88,12 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
),
|
||||
Appointment(
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now().add(Duration(hours: 3)),
|
||||
endTime: DateTime.now().add(const Duration(hours: 3)),
|
||||
subject: 'Match day',
|
||||
),
|
||||
Appointment(
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now().add(Duration(hours: 3)),
|
||||
endTime: DateTime.now().add(const Duration(hours: 3)),
|
||||
subject: 'Muharram/Ashura',
|
||||
),
|
||||
];
|
||||
@@ -107,11 +105,11 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
backgroundColor: Color(0xff222935),
|
||||
backgroundColor: const Color(0xff222935),
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
title: text20700white("Sessions"),
|
||||
@@ -123,7 +121,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
@@ -135,7 +133,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(Icons.add, color: Colors.white, weight: 2),
|
||||
child: const Icon(Icons.add, color: Colors.white, weight: 2),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(14.w),
|
||||
@@ -179,7 +177,10 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonTabBar(tabs: const [
|
||||
const CommonTabBar(
|
||||
|
||||
|
||||
tabs: [
|
||||
Tab(
|
||||
text: 'My sessions',
|
||||
),
|
||||
@@ -189,9 +190,10 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
]),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
|
||||
children: [
|
||||
MySessionsTab(),
|
||||
ComSessionTab(),
|
||||
mySessionsTab(),
|
||||
comSessionTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -206,7 +208,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget MySessionsTab() {
|
||||
Widget mySessionsTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -239,7 +241,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset("assets/images/png/Rectangle 45.png")
|
||||
],
|
||||
),
|
||||
@@ -254,16 +256,16 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
border: 0,
|
||||
customWidget: SfCalendar(
|
||||
view: CalendarView.month,
|
||||
appointmentTextStyle: TextStyle(color: Colors.white),
|
||||
headerStyle: CalendarHeaderStyle(
|
||||
appointmentTextStyle: const TextStyle(color: Colors.white),
|
||||
headerStyle: const CalendarHeaderStyle(
|
||||
textStyle: TextStyle(
|
||||
color: Colors.blue,
|
||||
color: Color(0xFFD90B2E),
|
||||
)),
|
||||
// blackoutDatesTextStyle: TextStyle(color: Colors.white),
|
||||
|
||||
weekNumberStyle: WeekNumberStyle(
|
||||
weekNumberStyle: const WeekNumberStyle(
|
||||
textStyle: TextStyle(color: Colors.white)),
|
||||
viewHeaderStyle: ViewHeaderStyle(
|
||||
viewHeaderStyle: const ViewHeaderStyle(
|
||||
// backgroundColor: Colors.amber,
|
||||
dateTextStyle: TextStyle(color: Colors.white),
|
||||
dayTextStyle: TextStyle(
|
||||
@@ -275,18 +277,17 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
backgroundColor: Colors.transparent,
|
||||
// firstDayOfWeek: 3,
|
||||
cellBorderColor: Colors.white,
|
||||
todayHighlightColor: Color(0xFFD90B2E),
|
||||
todayHighlightColor: const Color(0xFFD90B2E),
|
||||
todayTextStyle: const TextStyle(color: Colors.white),
|
||||
controller: _sessionCalController,
|
||||
showNavigationArrow: true,
|
||||
allowViewNavigation: true,
|
||||
allowDragAndDrop: true,
|
||||
showDatePickerButton: true,
|
||||
|
||||
monthViewSettings: MonthViewSettings(
|
||||
monthViewSettings: const MonthViewSettings(
|
||||
navigationDirection: MonthNavigationDirection.horizontal,
|
||||
),
|
||||
allowedViews: [
|
||||
allowedViews: const [
|
||||
CalendarView.month,
|
||||
// CalendarView.day,
|
||||
CalendarView.schedule,
|
||||
@@ -297,7 +298,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
onTap: calendarTapped,
|
||||
timeSlotViewSettings: TimeSlotViewSettings(
|
||||
// minimumAppointmentDuration: Duration(hours: 5),
|
||||
timeTextStyle: TextStyle(
|
||||
timeTextStyle: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
timelineAppointmentHeight: 60.h,
|
||||
@@ -308,19 +309,19 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
),
|
||||
monthCellBuilder: (context, details) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
details.date.day.toString(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white), // Set text color to white
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
resourceViewSettings: ResourceViewSettings(
|
||||
resourceViewSettings: const ResourceViewSettings(
|
||||
displayNameTextStyle:
|
||||
TextStyle(color: Colors.white, fontSize: 10),
|
||||
showAvatar: true,
|
||||
@@ -328,7 +329,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
// scheduleViewSettings: ScheduleViewSettings(
|
||||
// appointmentTextStyle: TextStyle(color: Colors.red)),
|
||||
|
||||
scheduleViewSettings: ScheduleViewSettings(
|
||||
scheduleViewSettings: const ScheduleViewSettings(
|
||||
placeholderTextStyle: TextStyle(color: Colors.white),
|
||||
dayHeaderSettings: DayHeaderSettings(
|
||||
dateTextStyle: TextStyle(color: Colors.white),
|
||||
@@ -360,20 +361,25 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
),
|
||||
Positioned(
|
||||
top: 6.h,
|
||||
left: 190.w,
|
||||
left: 100.w,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.availability);
|
||||
},
|
||||
child: Container(
|
||||
height: 25.h,
|
||||
width: 50.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.blue,
|
||||
color: const Color(0xFFD90B2E),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(15.r)),
|
||||
child: Center(child: text10400white("view")),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10.w,
|
||||
),
|
||||
child:
|
||||
Center(child: text10400white("view availability")),
|
||||
),
|
||||
)
|
||||
|
||||
// Image.asset(
|
||||
@@ -524,7 +530,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
CircleAvatar(
|
||||
radius: 12.r,
|
||||
backgroundImage:
|
||||
AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
const AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
text14w400_FCFCFC("Ryan dorwat"),
|
||||
@@ -538,7 +544,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget ComSessionTab() {
|
||||
Widget comSessionTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -552,16 +558,16 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
border: 0,
|
||||
customWidget: SfCalendar(
|
||||
view: CalendarView.month,
|
||||
appointmentTextStyle: TextStyle(color: Colors.white),
|
||||
headerStyle: CalendarHeaderStyle(
|
||||
appointmentTextStyle: const TextStyle(color: Colors.white),
|
||||
headerStyle: const CalendarHeaderStyle(
|
||||
textStyle: TextStyle(
|
||||
color: Colors.blue,
|
||||
color: Color(0xFFD90B2E),
|
||||
)),
|
||||
// blackoutDatesTextStyle: TextStyle(color: Colors.white),
|
||||
|
||||
weekNumberStyle: WeekNumberStyle(
|
||||
weekNumberStyle: const WeekNumberStyle(
|
||||
textStyle: TextStyle(color: Colors.white)),
|
||||
viewHeaderStyle: ViewHeaderStyle(
|
||||
viewHeaderStyle: const ViewHeaderStyle(
|
||||
// backgroundColor: Colors.amber,
|
||||
dateTextStyle: TextStyle(color: Colors.white),
|
||||
dayTextStyle: TextStyle(
|
||||
@@ -573,17 +579,17 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
backgroundColor: Colors.transparent,
|
||||
// firstDayOfWeek: 3,
|
||||
cellBorderColor: Colors.white,
|
||||
todayHighlightColor: Color(0xFFD90B2E),
|
||||
todayHighlightColor: const Color(0xFFD90B2E),
|
||||
todayTextStyle: const TextStyle(color: Colors.white),
|
||||
controller: _comCalController,
|
||||
showNavigationArrow: true,
|
||||
allowViewNavigation: true,
|
||||
allowDragAndDrop: true,
|
||||
// showDatePickerButton: true,
|
||||
monthViewSettings: MonthViewSettings(
|
||||
showDatePickerButton: true,
|
||||
monthViewSettings: const MonthViewSettings(
|
||||
navigationDirection: MonthNavigationDirection.horizontal,
|
||||
),
|
||||
allowedViews: [
|
||||
allowedViews: const [
|
||||
CalendarView.month,
|
||||
// CalendarView.day,
|
||||
CalendarView.schedule,
|
||||
@@ -594,7 +600,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
onTap: calendarTapped,
|
||||
timeSlotViewSettings: TimeSlotViewSettings(
|
||||
// minimumAppointmentDuration: Duration(hours: 5),
|
||||
timeTextStyle: TextStyle(
|
||||
timeTextStyle: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
timelineAppointmentHeight: 60.h,
|
||||
@@ -605,19 +611,19 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
),
|
||||
monthCellBuilder: (context, details) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
details.date.day.toString(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white), // Set text color to white
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
resourceViewSettings: ResourceViewSettings(
|
||||
resourceViewSettings: const ResourceViewSettings(
|
||||
displayNameTextStyle:
|
||||
TextStyle(color: Colors.white, fontSize: 10),
|
||||
showAvatar: true,
|
||||
@@ -646,20 +652,6 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
);
|
||||
}),
|
||||
),
|
||||
Positioned(
|
||||
top: 8.h,
|
||||
right: 110.w,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.availability);
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/png/calender.png",
|
||||
color: Colors.blue,
|
||||
height: 18.h,
|
||||
width: 18.w,
|
||||
),
|
||||
))
|
||||
]),
|
||||
|
||||
// SfCalendar(
|
||||
@@ -786,7 +778,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
sizedBoxWidth(16.w),
|
||||
CircleAvatar(
|
||||
radius: 12.r,
|
||||
backgroundImage: AssetImage(
|
||||
backgroundImage: const AssetImage(
|
||||
"assets/images/png/Ellipse 52.png"),
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
@@ -794,12 +786,12 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
],
|
||||
),
|
||||
]),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Container(
|
||||
height: 138.h,
|
||||
width: 143.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
color: const Color(0xFFD90B2E),
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomRight: Radius.circular(10.r),
|
||||
),
|
||||
@@ -831,7 +823,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('Event Details'),
|
||||
title: const Text('Event Details'),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
@@ -842,7 +834,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
),
|
||||
actions: <Widget>[
|
||||
ElevatedButton(
|
||||
child: Text('Close'),
|
||||
child: const Text('Close'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
||||
@@ -26,7 +26,7 @@ class _EventDetailsState extends State<EventDetails> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
@@ -306,7 +306,7 @@ class _EventDetailsState extends State<EventDetails> {
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
text16w400_white("Send message to invites"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
width: 98.w,
|
||||
height: 30.h,
|
||||
@@ -327,7 +327,7 @@ class _EventDetailsState extends State<EventDetails> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
const CircleAvatar(
|
||||
radius: 33.5,
|
||||
backgroundImage:
|
||||
AssetImage("assets/images/png/cimg1.png"),
|
||||
@@ -345,7 +345,7 @@ class _EventDetailsState extends State<EventDetails> {
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 12.5.r,
|
||||
backgroundImage: AssetImage(
|
||||
backgroundImage: const AssetImage(
|
||||
"assets/images/png/img322.png"),
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
@@ -374,7 +374,7 @@ class _EventDetailsState extends State<EventDetails> {
|
||||
Image.asset("assets/images/png/Red.png", height: 22.h, width: 16.w),
|
||||
sizedBoxWidth(10.w),
|
||||
SizedBox(width: 250.w, child: text16w400_white(text)),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
text16400white(count),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
@@ -60,7 +59,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
@@ -72,7 +71,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
@@ -84,7 +83,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(Icons.add, color: Colors.white, weight: 2),
|
||||
child: const Icon(Icons.add, color: Colors.white, weight: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -180,13 +179,13 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
text12w400_FCFCFC_blur(subtitle),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Container(
|
||||
height: 25.h,
|
||||
width: 72.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
border: Border.all(color: Color(0xFFFF002B), width: 1.w)),
|
||||
border: Border.all(color: const Color(0xFFFF002B), width: 1.w)),
|
||||
child: Center(child: text10400white("Attending")),
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
@@ -235,7 +234,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
color: Color(0xFF222935)),
|
||||
color: const Color(0xFF222935)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||
child: Column(
|
||||
@@ -271,7 +270,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
opacity2: 0.24,
|
||||
customWidget: Center(child: text16w400_FCFCFC("W")),
|
||||
border: 0.5),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
@@ -316,7 +315,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
opacity2: 0.24,
|
||||
customWidget: Center(child: text16w400_FCFCFC("Sa")),
|
||||
border: 0.5),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
@@ -344,7 +343,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFD90B2E).withOpacity(0.18),
|
||||
const Color(0xFFD90B2E).withOpacity(0.18),
|
||||
const Color(0xFFD90B2E).withOpacity(0.4),
|
||||
],
|
||||
stops: const [
|
||||
@@ -352,7 +351,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
borderGradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
|
||||
@@ -5,10 +5,8 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
|
||||
class ResourcePool extends StatefulWidget {
|
||||
const ResourcePool({super.key});
|
||||
@@ -42,9 +40,9 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Resource pool",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
@@ -103,7 +101,7 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundImage:
|
||||
AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
const AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
@@ -115,7 +113,7 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
text12w400_FCFCFC_blur("Row row row your boat")
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
inviteBottomSheet();
|
||||
@@ -124,7 +122,7 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
height: 30.h,
|
||||
width: 95.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
color: const Color(0xFFD90B2E),
|
||||
borderRadius: BorderRadius.circular(30.r)),
|
||||
child: Center(child: text14400white("Invite")),
|
||||
),
|
||||
@@ -192,7 +190,7 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
topLeft: Radius.circular(30.r),
|
||||
topRight: Radius.circular(30.r),
|
||||
),
|
||||
color: Color(0xFF222935),
|
||||
color: const Color(0xFF222935),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
@@ -259,7 +257,7 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
text16w400_FCFCFC(title),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 1,
|
||||
borderradius: 2,
|
||||
@@ -270,7 +268,7 @@ class _ResourcePoolState extends State<ResourcePool> {
|
||||
customWidget: Transform.scale(
|
||||
scale: 1.4,
|
||||
child: Checkbox(
|
||||
side: BorderSide(color: Color(0xFF434A53)),
|
||||
side: const BorderSide(color: Color(0xFF434A53)),
|
||||
value: isChecked,
|
||||
activeColor: Colors.transparent,
|
||||
checkColor: Colors.white,
|
||||
|
||||
@@ -2,12 +2,10 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
import 'package:regroup/Common/CommonDropDown.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
|
||||
@@ -35,10 +33,10 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Set availability",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -57,30 +55,30 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white("Select event type"),
|
||||
sizedBoxHeight(15.h),
|
||||
CommonDropdownBtn(hint: "", items: []),
|
||||
CommonDropdownBtn(hint: "", items: const ['']),
|
||||
sizedBoxHeight(18.h),
|
||||
text16400white("Select sport"),
|
||||
sizedBoxHeight(15.h),
|
||||
CommonDropdownBtn(hint: "", items: []),
|
||||
CommonDropdownBtn(hint: "", items: const ['']),
|
||||
sizedBoxHeight(18.h),
|
||||
text16400white("Select role "),
|
||||
sizedBoxHeight(15.h),
|
||||
CommonDropdownBtn(hint: "", items: []),
|
||||
CommonDropdownBtn(hint: "", items: const ['']),
|
||||
sizedBoxHeight(18.h),
|
||||
text16400white("Space selection"),
|
||||
sizedBoxHeight(15.h),
|
||||
CommonDropdownBtn(hint: "", items: []),
|
||||
CommonDropdownBtn(hint: "", items: const ['']),
|
||||
sizedBoxHeight(18.h),
|
||||
Row(
|
||||
children: [
|
||||
text16w400_white("Availability"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Transform.scale(
|
||||
scaleY: 1,
|
||||
child: CupertinoSwitch(
|
||||
value: swichvalue,
|
||||
trackColor: Colors.white.withOpacity(0.4),
|
||||
activeColor: Color(0xFF3192D8),
|
||||
activeColor: const Color(0xFF3192D8),
|
||||
onChanged: (bool? value) {
|
||||
setState(() {
|
||||
swichvalue = value ?? false;
|
||||
@@ -159,7 +157,7 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
|
||||
border: 1)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -208,10 +206,10 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: selectedContainerIndices.contains(index)
|
||||
? Color(0xFFD90B2E).withOpacity(0.4)
|
||||
: Color(0xFFFFFFFF).withOpacity(0.2),
|
||||
? const Color(0xFFD90B2E).withOpacity(0.4)
|
||||
: const Color(0xFFFFFFFF).withOpacity(0.2),
|
||||
border: selectedContainerIndices.contains(index)
|
||||
? Border.all(color: Color(0xFFD90B2E), width: 1)
|
||||
? Border.all(color: const Color(0xFFD90B2E), width: 1)
|
||||
: null),
|
||||
child: Center(child: text16w400_FCFCFC(text)),
|
||||
),
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonBottomNavigationBar.dart';
|
||||
import 'package:regroup/Common/controller/MainScreen.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/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
@@ -19,7 +18,7 @@ class ChatsMainScreen extends StatefulWidget {
|
||||
|
||||
class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
TextEditingController searchcontroller = TextEditingController();
|
||||
GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
|
||||
|
||||
List chatcontents = [
|
||||
{
|
||||
@@ -121,10 +120,10 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
appBar: AppBar(
|
||||
scrolledUnderElevation: 0.0,
|
||||
backgroundColor: Color(0xff222935),
|
||||
backgroundColor: const Color(0xff222935),
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
@@ -174,7 +173,7 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
hintText: "Search chats",
|
||||
leadingIcon: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
@@ -196,7 +195,7 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
MyTabBar(),
|
||||
const MyTabBar(),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: [feedTab(), clubsTab(), teamsTab()],
|
||||
@@ -223,7 +222,7 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
);
|
||||
},
|
||||
itemCount: chatcontents.length,
|
||||
@@ -263,7 +262,7 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
);
|
||||
},
|
||||
itemCount: clubcontents.length,
|
||||
@@ -298,7 +297,7 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
);
|
||||
},
|
||||
itemCount: teamcontents.length,
|
||||
@@ -326,15 +325,17 @@ class _ChatsMainScreenState extends State<ChatsMainScreen> {
|
||||
}
|
||||
|
||||
class MyTabBar extends StatelessWidget {
|
||||
const MyTabBar({super.key});
|
||||
|
||||
// Set the desired height
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TabBar(
|
||||
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
|
||||
dividerColor: const Color(0xFFFFFFFF).withOpacity(0.07),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
@@ -342,7 +343,7 @@ class MyTabBar extends StatelessWidget {
|
||||
// labelColor: Colors.white,
|
||||
indicatorWeight: 2.h,
|
||||
dividerHeight: 2.h,
|
||||
unselectedLabelColor: Color(0xFFFCFCFC),
|
||||
unselectedLabelColor: const Color(0xFFFCFCFC),
|
||||
overlayColor: MaterialStateProperty.all(const Color(0xFFD90B2E)),
|
||||
tabs: const [
|
||||
Tab(
|
||||
@@ -386,7 +387,7 @@ class ChatList extends StatefulWidget {
|
||||
class _ChatListState extends State<ChatList> {
|
||||
void _showContextMenu(BuildContext context, Offset offset) {
|
||||
showMenu(
|
||||
color: Color(0XFf222935),
|
||||
color: const Color(0XFf222935),
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.r)),
|
||||
position:
|
||||
@@ -398,7 +399,7 @@ class _ChatListState extends State<ChatList> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/mute.png',
|
||||
width: 19.w,
|
||||
@@ -408,7 +409,7 @@ class _ChatListState extends State<ChatList> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
]),
|
||||
),
|
||||
@@ -419,7 +420,7 @@ class _ChatListState extends State<ChatList> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/pin.png',
|
||||
width: 19.w,
|
||||
@@ -429,7 +430,7 @@ class _ChatListState extends State<ChatList> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -439,7 +440,7 @@ class _ChatListState extends State<ChatList> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
const Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
// Icon(Icons.delete, color: Colors.red),
|
||||
Image.asset(
|
||||
'assets/images/png/deletetred.png',
|
||||
@@ -503,7 +504,7 @@ class _ChatListState extends State<ChatList> {
|
||||
? Container(
|
||||
width: 10.w,
|
||||
height: 10.h,
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
color: Color(0xFF32D74B),
|
||||
shape: OvalBorder(),
|
||||
),
|
||||
@@ -511,7 +512,7 @@ class _ChatListState extends State<ChatList> {
|
||||
: Container(
|
||||
width: 10.w,
|
||||
height: 10.h,
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
color: Color(0xFFFF453A),
|
||||
shape: OvalBorder(),
|
||||
)),
|
||||
@@ -535,7 +536,7 @@ class _ChatListState extends State<ChatList> {
|
||||
child: Text(
|
||||
widget.message,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFCFCFC),
|
||||
color: const Color(0xCCFCFCFC),
|
||||
fontSize: 12.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -546,7 +547,7 @@ class _ChatListState extends State<ChatList> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@@ -557,7 +558,7 @@ class _ChatListState extends State<ChatList> {
|
||||
children: [
|
||||
widget.ispinned == true
|
||||
? Image.asset('assets/images/png/pin.png')
|
||||
: SizedBox(
|
||||
: const SizedBox(
|
||||
width: 25,
|
||||
),
|
||||
sizedBoxWidth(3.w),
|
||||
@@ -565,7 +566,7 @@ class _ChatListState extends State<ChatList> {
|
||||
? Container(
|
||||
width: 18,
|
||||
height: 18,
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
shape: OvalBorder(),
|
||||
),
|
||||
@@ -573,14 +574,14 @@ class _ChatListState extends State<ChatList> {
|
||||
'1',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
fontSize: 12.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
)
|
||||
: SizedBox()
|
||||
: const SizedBox()
|
||||
],
|
||||
)
|
||||
],
|
||||
@@ -598,7 +599,7 @@ class SecondChatList extends StatefulWidget {
|
||||
final String message;
|
||||
final bool isMessageRead;
|
||||
|
||||
SecondChatList({
|
||||
const SecondChatList({
|
||||
Key? key,
|
||||
required this.name,
|
||||
required this.imageurl,
|
||||
@@ -613,7 +614,7 @@ class SecondChatList extends StatefulWidget {
|
||||
class _SecondChatListState extends State<SecondChatList> {
|
||||
void _showContextMenu(BuildContext context, Offset offset) {
|
||||
showMenu(
|
||||
color: Color(0XFf222935),
|
||||
color: const Color(0XFf222935),
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.r)),
|
||||
position:
|
||||
@@ -625,7 +626,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/mute.png',
|
||||
width: 19.w,
|
||||
@@ -635,7 +636,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
]),
|
||||
),
|
||||
@@ -646,7 +647,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/pin.png',
|
||||
width: 19.w,
|
||||
@@ -656,7 +657,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -666,7 +667,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
const Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
// Icon(Icons.delete, color: Colors.red),
|
||||
Image.asset(
|
||||
'assets/images/png/deletetred.png',
|
||||
@@ -750,7 +751,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
Text(
|
||||
widget.message,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFCFCFC),
|
||||
color: const Color(0xCCFCFCFC),
|
||||
fontSize: 12.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.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:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
|
||||
@@ -54,7 +53,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
|
||||
void _showContextMenu(BuildContext context, Offset offset) {
|
||||
showMenu(
|
||||
color: Color(0XFf222935),
|
||||
color: const Color(0XFf222935),
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.r)),
|
||||
position:
|
||||
@@ -67,7 +66,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/mute.png',
|
||||
width: 19.w,
|
||||
@@ -77,7 +76,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
]),
|
||||
),
|
||||
@@ -88,7 +87,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/pin.png',
|
||||
width: 19.w,
|
||||
@@ -98,7 +97,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -107,7 +106,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
value: 1,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Search", style: TextStyle(color: Colors.white)),
|
||||
@@ -120,7 +119,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -132,7 +131,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Profile", style: TextStyle(color: Colors.white)),
|
||||
const Text("Profile", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/profile.png',
|
||||
width: 19.w,
|
||||
@@ -142,7 +141,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -154,7 +153,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Block chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Block chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/blockchat.png',
|
||||
width: 19.w,
|
||||
@@ -164,7 +163,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -176,7 +175,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
const Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
// Icon(Icons.delete, color: Colors.red),
|
||||
Image.asset(
|
||||
'assets/images/png/deletetred.png',
|
||||
@@ -246,11 +245,11 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Get.focusScope?.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Color(0xFF222935).withOpacity(0.50),
|
||||
backgroundColor: const Color(0xFF222935).withOpacity(0.50),
|
||||
flexibleSpace: SafeArea(
|
||||
child: Container(
|
||||
// height: 90.h,
|
||||
@@ -292,7 +291,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
height: 40.h,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(25.h),
|
||||
image: DecorationImage(
|
||||
image: const DecorationImage(
|
||||
image:
|
||||
AssetImage("assets/images/png/groupchat.png"),
|
||||
fit: BoxFit.cover)),
|
||||
@@ -325,7 +324,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Text(
|
||||
"Ryan, Jaxson, Dulce, Nolan ",
|
||||
style: TextStyle(
|
||||
color: Color(0xffFCFCFC).withOpacity(0.80),
|
||||
color: const Color(0xffFCFCFC).withOpacity(0.80),
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
@@ -369,18 +368,18 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
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),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child: Stack(
|
||||
@@ -415,7 +414,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
shape: OvalBorder(),
|
||||
shape: const OvalBorder(),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(2.w),
|
||||
@@ -423,8 +422,8 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(1.00, -0.03),
|
||||
end: Alignment(-1, 0.03),
|
||||
begin: const Alignment(1.00, -0.03),
|
||||
end: const Alignment(-1, 0.03),
|
||||
colors: [
|
||||
Colors.white.withOpacity(
|
||||
0.05999999865889549),
|
||||
@@ -432,7 +431,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
0.07999999821186066)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
@@ -489,7 +488,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
children: [
|
||||
Flexible(
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(1.00, 0.05),
|
||||
end: Alignment(-1, -0.05),
|
||||
@@ -545,7 +544,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
shape: OvalBorder(),
|
||||
shape: const OvalBorder(),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -559,7 +558,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
sizedBoxWidth(16.w),
|
||||
@@ -578,6 +577,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
const Color(0xFFffffff).withOpacity(0.24),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.24),
|
||||
],
|
||||
// ignore: prefer_const_literals_to_create_immutables
|
||||
stops: [
|
||||
0.1,
|
||||
1,
|
||||
@@ -611,7 +611,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
border: InputBorder.none,
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0XFFFCFCFC)
|
||||
color: const Color(0XFFFCFCFC)
|
||||
.withOpacity(0.80),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
@@ -640,12 +640,12 @@ class _GroupChatPageState extends State<GroupChatPage> {
|
||||
height: 30.h,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
Color(0xFFD90B2E),
|
||||
const Color(0xFFD90B2E),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
30.r)),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.send_outlined,
|
||||
color: Colors.white,
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
@@ -74,9 +72,9 @@ class _NewChatPageState extends State<NewChatPage> {
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
// backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
||||
|
||||
appBar: CommonAppbar(titleTxt: 'New chat'),
|
||||
appBar: const CommonAppbar(titleTxt: 'New chat'),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
@@ -96,7 +94,7 @@ class _NewChatPageState extends State<NewChatPage> {
|
||||
hintText: "Search people",
|
||||
leadingIcon: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
@@ -127,13 +125,13 @@ class _NewChatPageState extends State<NewChatPage> {
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: ShapeDecoration(
|
||||
image: DecorationImage(
|
||||
image: const DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/chatgroup.png'),
|
||||
),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.71, -0.70),
|
||||
end: Alignment(-0.71, 0.7),
|
||||
begin: const Alignment(0.71, -0.70),
|
||||
end: const Alignment(-0.71, 0.7),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.30000001192092896),
|
||||
@@ -141,7 +139,7 @@ class _NewChatPageState extends State<NewChatPage> {
|
||||
.withOpacity(0.30000001192092896)
|
||||
],
|
||||
),
|
||||
shape: OvalBorder(
|
||||
shape: const OvalBorder(
|
||||
side: BorderSide(
|
||||
width: 0.50, color: Color(0xFF434A53)),
|
||||
),
|
||||
@@ -166,7 +164,7 @@ class _NewChatPageState extends State<NewChatPage> {
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
);
|
||||
},
|
||||
itemCount: chatcontents.length,
|
||||
@@ -199,7 +197,7 @@ class SecondChatList extends StatefulWidget {
|
||||
final String imageurl;
|
||||
final String message;
|
||||
|
||||
SecondChatList({
|
||||
const SecondChatList({
|
||||
Key? key,
|
||||
required this.name,
|
||||
required this.imageurl,
|
||||
@@ -250,7 +248,7 @@ class _SecondChatListState extends State<SecondChatList> {
|
||||
Text(
|
||||
widget.message,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFCFCFC),
|
||||
color: const Color(0xCCFCFCFC),
|
||||
fontSize: 12.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
|
||||
@@ -3,13 +3,13 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
|
||||
import 'package:regroup/Common/controller/MainScreen.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.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:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
@@ -80,8 +80,8 @@ class _NewGroupPageState extends State<NewGroupPage> {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
appBar: CommonAppbar(titleTxt: 'New group'),
|
||||
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
||||
appBar: const CommonAppbar(titleTxt: 'New group'),
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
@@ -121,14 +121,14 @@ class _NewGroupPageState extends State<NewGroupPage> {
|
||||
// image: AssetImage('assets/images/png/camera1.png'),
|
||||
// ),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.71, -0.70),
|
||||
end: Alignment(-0.71, 0.7),
|
||||
begin: const Alignment(0.71, -0.70),
|
||||
end: const Alignment(-0.71, 0.7),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.30000001192092896),
|
||||
Colors.white.withOpacity(0.30000001192092896)
|
||||
],
|
||||
),
|
||||
shape: OvalBorder(
|
||||
shape: const OvalBorder(
|
||||
side: BorderSide(
|
||||
width: 0.50, color: Color(0xFF434A53)),
|
||||
),
|
||||
@@ -189,7 +189,7 @@ class _NewGroupPageState extends State<NewGroupPage> {
|
||||
hintText: "Search people",
|
||||
leadingIcon: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
@@ -207,7 +207,7 @@ class _NewGroupPageState extends State<NewGroupPage> {
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
);
|
||||
},
|
||||
itemCount: chatcontents.length,
|
||||
@@ -234,7 +234,7 @@ class _NewGroupPageState extends State<NewGroupPage> {
|
||||
// Get.toNamed(RouteName.mainscreen);
|
||||
Get.offUntil(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => MainScreen()),
|
||||
builder: (context) => const MainScreen()),
|
||||
(Route<dynamic> route) => false);
|
||||
}),
|
||||
),
|
||||
@@ -254,7 +254,7 @@ class GroupsList extends StatefulWidget {
|
||||
final String imageurl;
|
||||
final String message;
|
||||
|
||||
GroupsList({
|
||||
const GroupsList({
|
||||
Key? key,
|
||||
required this.name,
|
||||
required this.imageurl,
|
||||
@@ -308,7 +308,7 @@ class _GroupsListState extends State<GroupsList> {
|
||||
Text(
|
||||
widget.message,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFCFCFC),
|
||||
color: const Color(0xCCFCFCFC),
|
||||
fontSize: 12.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -323,8 +323,8 @@ class _GroupsListState extends State<GroupsList> {
|
||||
Checkbox(
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
side: BorderSide(
|
||||
color: Color(0xFF434A53).withOpacity(0.72), width: 1.5.w),
|
||||
activeColor: Color(0xFF434A53).withOpacity(0.72),
|
||||
color: const Color(0xFF434A53).withOpacity(0.72), width: 1.5.w),
|
||||
activeColor: const Color(0xFF434A53).withOpacity(0.72),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(0.0)),
|
||||
),
|
||||
|
||||
@@ -55,7 +55,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
|
||||
void _showContextMenu(BuildContext context, Offset offset) {
|
||||
showMenu(
|
||||
color: Color(0XFf222935),
|
||||
color: const Color(0XFf222935),
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.r)),
|
||||
position:
|
||||
@@ -68,7 +68,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Mute chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/mute.png',
|
||||
width: 19.w,
|
||||
@@ -78,7 +78,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
]),
|
||||
),
|
||||
@@ -89,7 +89,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Pin chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/pin.png',
|
||||
width: 19.w,
|
||||
@@ -99,7 +99,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -108,7 +108,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
value: 1,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Search", style: TextStyle(color: Colors.white)),
|
||||
@@ -121,7 +121,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -133,7 +133,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Profile", style: TextStyle(color: Colors.white)),
|
||||
const Text("Profile", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/profile.png',
|
||||
width: 19.w,
|
||||
@@ -143,7 +143,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -155,7 +155,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Block chat", style: TextStyle(color: Colors.white)),
|
||||
const Text("Block chat", style: TextStyle(color: Colors.white)),
|
||||
Image.asset(
|
||||
'assets/images/png/blockchat.png',
|
||||
width: 19.w,
|
||||
@@ -165,7 +165,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
),
|
||||
Divider(
|
||||
thickness: 0.6.h,
|
||||
color: Color(0xffFFFFFF).withOpacity(0.72),
|
||||
color: const Color(0xffFFFFFF).withOpacity(0.72),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -177,7 +177,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
const Text("Delete chat", style: TextStyle(color: Colors.red)),
|
||||
// Icon(Icons.delete, color: Colors.red),
|
||||
Image.asset(
|
||||
'assets/images/png/deletetred.png',
|
||||
@@ -247,11 +247,11 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Get.focusScope?.unfocus();
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Color(0xFF222935).withOpacity(0.50),
|
||||
backgroundColor: const Color(0xFF222935).withOpacity(0.50),
|
||||
flexibleSpace: SafeArea(
|
||||
child: Container(
|
||||
// height: 90.h,
|
||||
@@ -293,7 +293,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
height: 40.h,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(25.h),
|
||||
image: DecorationImage(
|
||||
image: const DecorationImage(
|
||||
image:
|
||||
AssetImage("assets/images/png/Ellipse 52.png"),
|
||||
fit: BoxFit.fill)),
|
||||
@@ -319,7 +319,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Text(
|
||||
"Ryan_01",
|
||||
style: TextStyle(
|
||||
color: Color(0xffFCFCFC).withOpacity(0.80),
|
||||
color: const Color(0xffFCFCFC).withOpacity(0.80),
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
@@ -371,8 +371,8 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(1.00, -0.03),
|
||||
end: Alignment(-1, 0.03),
|
||||
begin: const Alignment(1.00, -0.03),
|
||||
end: const Alignment(-1, 0.03),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.05999999865889549),
|
||||
@@ -380,7 +380,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
.withOpacity(0.07999999821186066)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
@@ -428,7 +428,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
children: [
|
||||
Flexible(
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(1.00, 0.05),
|
||||
end: Alignment(-1, -0.05),
|
||||
@@ -476,7 +476,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
sizedBoxWidth(16.w),
|
||||
@@ -524,7 +524,7 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
border: InputBorder.none,
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0XFFFCFCFC).withOpacity(0.80),
|
||||
color: const Color(0XFFFCFCFC).withOpacity(0.80),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
hintText: "Type your message",
|
||||
@@ -548,10 +548,10 @@ class _UserChatPageState extends State<UserChatPage> {
|
||||
width: 45.w,
|
||||
height: 30.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
color: const Color(0xFFD90B2E),
|
||||
borderRadius:
|
||||
BorderRadius.circular(30.r)),
|
||||
child: Center(
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.send_outlined,
|
||||
color: Colors.white,
|
||||
|
||||
@@ -23,7 +23,7 @@ class _CycleScreenState extends State<CycleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
@@ -46,7 +46,7 @@ class _CycleScreenState extends State<CycleScreen> {
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonTabBar(tabs: const [
|
||||
const CommonTabBar(tabs: [
|
||||
Tab(
|
||||
text: 'Popular',
|
||||
),
|
||||
@@ -58,8 +58,8 @@ class _CycleScreenState extends State<CycleScreen> {
|
||||
height: 670.h,
|
||||
child: TabBarView(
|
||||
children: [
|
||||
CyclepopularTab(),
|
||||
CyclelatestTab(),
|
||||
cyclepopularTab(),
|
||||
cyclelatestTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -70,7 +70,7 @@ class _CycleScreenState extends State<CycleScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
Widget CyclepopularTab() {
|
||||
Widget cyclepopularTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
@@ -101,7 +101,7 @@ Widget CyclepopularTab() {
|
||||
);
|
||||
}
|
||||
|
||||
Widget CyclelatestTab() {
|
||||
Widget cyclelatestTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
@@ -172,7 +172,7 @@ Widget normalcardtile({
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
@@ -181,12 +181,12 @@ Widget normalcardtile({
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 50),
|
||||
color: Color(0xFF222935),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
@@ -204,7 +204,7 @@ Widget normalcardtile({
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
@@ -214,7 +214,7 @@ Widget normalcardtile({
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -230,7 +230,7 @@ Widget normalcardtile({
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
@@ -240,7 +240,7 @@ Widget normalcardtile({
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -256,7 +256,7 @@ Widget normalcardtile({
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
@@ -282,7 +282,7 @@ Widget normalcardtile({
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
@@ -326,7 +326,7 @@ Widget normalcardtile({
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 0.43,
|
||||
width: 30.w,
|
||||
@@ -411,11 +411,11 @@ Widget normalcardtile({
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 8,
|
||||
itemScale: 0.4,
|
||||
itemSize: Size(45, 45),
|
||||
boxPadding: EdgeInsets.all(8),
|
||||
boxAnimationDuration: Duration(milliseconds: 200),
|
||||
itemAnimationDuration: Duration(milliseconds: 500),
|
||||
hoverDuration: Duration(milliseconds: 700),
|
||||
itemSize: const Size(45, 45),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration: const Duration(milliseconds: 200),
|
||||
itemAnimationDuration: const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
@@ -23,9 +22,9 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Post",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -59,7 +58,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 20.r,
|
||||
foregroundImage: AssetImage(
|
||||
foregroundImage: const AssetImage(
|
||||
"assets/images/png/Ellipse 48.png",
|
||||
),
|
||||
),
|
||||
@@ -81,13 +80,13 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: CustomTextFormField(
|
||||
hintText: "Add comment",
|
||||
suffixIcon: Container(
|
||||
suffixIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 25.w,
|
||||
child: Center(
|
||||
@@ -151,22 +150,22 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
width: 72.w,
|
||||
height: 26.h,
|
||||
borderradius: 5.r,
|
||||
borderColor: Color(0xFFD90B2E),
|
||||
borderColor: const Color(0xFFD90B2E),
|
||||
customWidget:
|
||||
Center(child: text14400white("Follow")),
|
||||
border: 1),
|
||||
sizedBoxWidth(6.w),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 50),
|
||||
color: Color(0xFF222935),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) =>
|
||||
<PopupMenuEntry>[
|
||||
@@ -186,7 +185,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
@@ -196,7 +195,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -213,7 +212,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
@@ -223,7 +222,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -240,7 +239,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
@@ -272,7 +271,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
@@ -290,7 +289,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
@@ -329,7 +328,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 0.9,
|
||||
width: 30.w,
|
||||
@@ -414,13 +413,13 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 8,
|
||||
itemScale: 0.4,
|
||||
itemSize: Size(45, 45),
|
||||
boxPadding: EdgeInsets.all(8),
|
||||
itemSize: const Size(45, 45),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
Duration(milliseconds: 200),
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
Duration(milliseconds: 500),
|
||||
hoverDuration: Duration(milliseconds: 700),
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
@@ -458,7 +457,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
width: 100.w,
|
||||
height: 30.h,
|
||||
borderradius: 30.r,
|
||||
borderColor: Color(0xFFD90B2E),
|
||||
borderColor: const Color(0xFFD90B2E),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
|
||||
@@ -67,9 +67,9 @@ class _ReactionViewState extends State<ReactionView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Post",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
@@ -89,13 +89,13 @@ class _ReactionViewState extends State<ReactionView> {
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(children: [
|
||||
CommonTabBar(tabs: [
|
||||
Tab(
|
||||
const Tab(
|
||||
text: 'All',
|
||||
),
|
||||
Tab(
|
||||
child: Row(children: [
|
||||
commonGlassContainer(
|
||||
borderColor: Color(0xFF1E3A46),
|
||||
borderColor: const Color(0xFF1E3A46),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
width: 30.w,
|
||||
@@ -109,14 +109,14 @@ class _ReactionViewState extends State<ReactionView> {
|
||||
),
|
||||
),
|
||||
border: 1.71),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
text14400white("110K"),
|
||||
]),
|
||||
),
|
||||
Tab(
|
||||
child: Row(children: [
|
||||
commonGlassContainer(
|
||||
borderColor: Color(0xFF1E3A46),
|
||||
borderColor: const Color(0xFF1E3A46),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
width: 30.w,
|
||||
@@ -130,14 +130,14 @@ class _ReactionViewState extends State<ReactionView> {
|
||||
),
|
||||
),
|
||||
border: 1.71),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
text14400white("9.7K"),
|
||||
]),
|
||||
),
|
||||
Tab(
|
||||
child: Row(children: [
|
||||
commonGlassContainer(
|
||||
borderColor: Color(0xFF1E3A46),
|
||||
borderColor: const Color(0xFF1E3A46),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
width: 30.w,
|
||||
@@ -151,7 +151,7 @@ class _ReactionViewState extends State<ReactionView> {
|
||||
),
|
||||
),
|
||||
border: 1.71),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
text14400white("7.4K"),
|
||||
]),
|
||||
),
|
||||
@@ -294,9 +294,9 @@ class _ReactionViewState extends State<ReactionView> {
|
||||
width: 22.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFF1E3A46),
|
||||
color: const Color(0xFF1E3A46),
|
||||
border: Border.all(
|
||||
color: Color(0xFFFCFCFC).withOpacity(0.18),
|
||||
color: const Color(0xFFFCFCFC).withOpacity(0.18),
|
||||
width: 0.6)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
|
||||
@@ -3,17 +3,16 @@ import 'dart:io';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
import 'package:regroup/Common/CommonDropDown.dart';
|
||||
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.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';
|
||||
@@ -42,10 +41,10 @@ class _PostScreenState extends State<PostScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Create a post",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -88,15 +87,15 @@ class _PostScreenState extends State<PostScreen> {
|
||||
},
|
||||
child: DottedBorder(
|
||||
strokeWidth: 1,
|
||||
dashPattern: [7, 4],
|
||||
dashPattern: const [7, 4],
|
||||
borderType: BorderType.RRect,
|
||||
radius: Radius.circular(14.r),
|
||||
color: Color(0xFF434A53),
|
||||
child: commonGlassContainer(
|
||||
border: 0,
|
||||
color: const Color(0xFF434A53),
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 130.h,
|
||||
borderradius: 10.r,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
borderColor: Colors.transparent,
|
||||
customWidget: bannerPath.isNotEmpty && isbannerAdded
|
||||
? Stack(children: [
|
||||
Image.file(
|
||||
@@ -117,13 +116,13 @@ class _PostScreenState extends State<PostScreen> {
|
||||
width: 27,
|
||||
height: 27,
|
||||
decoration: ShapeDecoration(
|
||||
color: Color(0xFF7E7E7E),
|
||||
color: const Color(0xFF7E7E7E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5)),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
@@ -155,14 +154,14 @@ class _PostScreenState extends State<PostScreen> {
|
||||
CustomDropDownTag1(
|
||||
header: "Enter tags",
|
||||
title: "Enter tags",
|
||||
listData: [
|
||||
listData: const [
|
||||
"#Race",
|
||||
"#Swimming",
|
||||
"#Cycle",
|
||||
"#Swimming",
|
||||
"#Race"
|
||||
],
|
||||
rowData: [
|
||||
rowData: const [
|
||||
"23,233 Recently use tags",
|
||||
"15,123 Recently use tags",
|
||||
"15,123 Recently use tags",
|
||||
@@ -170,7 +169,7 @@ class _PostScreenState extends State<PostScreen> {
|
||||
"15,123 Available tags"
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: SizedBox()),
|
||||
leadingImage: const SizedBox()),
|
||||
// CustomTextFormField(
|
||||
// suffixIcon: Container(
|
||||
// height: 20.h,
|
||||
@@ -224,9 +223,9 @@ class _PostScreenState extends State<PostScreen> {
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: ['Individual', 'Anonymous'],
|
||||
listData: const ['Individual', 'Anonymous'],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: SizedBox()),
|
||||
leadingImage: const SizedBox()),
|
||||
// CommonDropdownradioBtn(
|
||||
// hint: '', items: ['Individual', 'Anonymous']),
|
||||
|
||||
@@ -236,20 +235,20 @@ class _PostScreenState extends State<PostScreen> {
|
||||
CustomDropDownCheckBox(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: [
|
||||
listData: const [
|
||||
'Active alliance network',
|
||||
'Fitfam federation',
|
||||
'The athletic town',
|
||||
'Football fever'
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
images: [
|
||||
images: const [
|
||||
'assets/images/png/Rectangle 65.png',
|
||||
'assets/images/png/Rectangle 66.png',
|
||||
'assets/images/png/Rectangle 60.png',
|
||||
'assets/images/png/Rectangle 68.png'
|
||||
],
|
||||
leadingImage: SizedBox()),
|
||||
leadingImage: const SizedBox()),
|
||||
// CommonDropdownCheckbox(
|
||||
// hint: '',
|
||||
// items: [
|
||||
@@ -284,7 +283,7 @@ class _PostScreenState extends State<PostScreen> {
|
||||
Get.bottomSheet(Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(14.r),
|
||||
color: Color(0xFF222935)),
|
||||
color: const Color(0xFF222935)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.w),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
@@ -306,7 +305,7 @@ class _PostScreenState extends State<PostScreen> {
|
||||
height: 35.h,
|
||||
width: 216.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Color(0xFF434A53), width: 1),
|
||||
border: Border.all(color: const Color(0xFF434A53), width: 1),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
@@ -341,12 +340,12 @@ class _PostScreenState extends State<PostScreen> {
|
||||
height: 35,
|
||||
decoration: BoxDecoration(
|
||||
color: selectedContainerIndices.contains(index)
|
||||
? Color(0xFFD90B2E).withOpacity(0.4)
|
||||
: Color(0xFFFFFFFF).withOpacity(0.2),
|
||||
? const Color(0xFFD90B2E).withOpacity(0.4)
|
||||
: const Color(0xFFFFFFFF).withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Color(0xFFD90B2E), width: 1)),
|
||||
border: Border.all(color: const Color(0xFFD90B2E), width: 1)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/controller/CommonTextFormField.dart';
|
||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
|
||||
@@ -20,7 +19,7 @@ class _DetailExploreState extends State<DetailExplore> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: SafeArea(
|
||||
@@ -46,13 +45,13 @@ class _DetailExploreState extends State<DetailExplore> {
|
||||
width: 40.w,
|
||||
height: 40.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
customWidget: const Center(
|
||||
child: Icon(
|
||||
Icons.arrow_back,
|
||||
color: Colors.white,
|
||||
)),
|
||||
border: 1,
|
||||
borderColor: Color(0xFF55434F)),
|
||||
borderColor: const Color(0xFF55434F)),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Expanded(
|
||||
@@ -80,7 +79,7 @@ class _DetailExploreState extends State<DetailExplore> {
|
||||
length: 4,
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(children: [
|
||||
CommonTabBar(tabs: const [
|
||||
const CommonTabBar(tabs: [
|
||||
Tab(
|
||||
text: 'All',
|
||||
),
|
||||
@@ -164,7 +163,7 @@ class _DetailExploreState extends State<DetailExplore> {
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Color(0xFF434A53), width: 0.5.w),
|
||||
border: Border.all(color: const Color(0xFF434A53), width: 0.5.w),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Center(child: Image.asset(imagePath, fit: BoxFit.fill)),
|
||||
@@ -177,19 +176,19 @@ class _DetailExploreState extends State<DetailExplore> {
|
||||
}
|
||||
|
||||
Widget eventsTab() {
|
||||
return Column(
|
||||
return const Column(
|
||||
children: [],
|
||||
);
|
||||
}
|
||||
|
||||
Widget groupsTab() {
|
||||
return Column(
|
||||
return const Column(
|
||||
children: [],
|
||||
);
|
||||
}
|
||||
|
||||
Widget communitiesTab() {
|
||||
return Column(
|
||||
return const Column(
|
||||
children: [],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.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/texts.dart';
|
||||
import 'package:regroup/Common/global.dart' as global;
|
||||
@@ -20,7 +19,7 @@ class ExploreScreen extends StatefulWidget {
|
||||
|
||||
class _ExploreScreenState extends State<ExploreScreen> {
|
||||
GoogleMapController? _mapController;
|
||||
double _zoomLevel = 18.0;
|
||||
final double _zoomLevel = 18.0;
|
||||
|
||||
// BitmapDescriptor? _customIcon1;
|
||||
// BitmapDescriptor? _customIcon2;
|
||||
@@ -46,14 +45,14 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
// }
|
||||
|
||||
Future<void> _showInitialBottomSheet() async {
|
||||
await Future.delayed(Duration(milliseconds: 400));
|
||||
await Future.delayed(const Duration(milliseconds: 400));
|
||||
exploreBottomSheet();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
// appBar: CommonAppbar(
|
||||
// titleTxt: "",
|
||||
@@ -87,7 +86,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
),
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('currentP'),
|
||||
markerId: const MarkerId('currentP'),
|
||||
icon: BitmapDescriptor.defaultMarker,
|
||||
position: global.latlong!,
|
||||
onTap: () {
|
||||
@@ -95,9 +94,9 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
},
|
||||
),
|
||||
Marker(
|
||||
markerId: MarkerId('currentP'),
|
||||
markerId: const MarkerId('currentP'),
|
||||
icon: BitmapDescriptor.defaultMarker,
|
||||
position: LatLng(19.155001, 72.84998),
|
||||
position: const LatLng(19.155001, 72.84998),
|
||||
onTap: () {
|
||||
exploreBottomSheet2();
|
||||
},
|
||||
@@ -114,7 +113,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
},
|
||||
child: AbsorbPointer(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
@@ -144,7 +143,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
topLeft: Radius.circular(10.r),
|
||||
topRight: Radius.circular(10.r),
|
||||
),
|
||||
color: Color(0xFF222935),
|
||||
color: const Color(0xFF222935),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
@@ -173,7 +172,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
child: Container(
|
||||
height: 85.h,
|
||||
width: 85.w,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Image.asset("assets/images/png/Ellipse 37.png",
|
||||
@@ -206,7 +205,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
border: 0.5),
|
||||
sizedBoxWidth(10.w),
|
||||
text16400white("10 subgroups "),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
commonGlassContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
@@ -233,12 +232,12 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
borderradius: 30.r,
|
||||
customWidget: Center(child: text14w400_FCFCFC("Message")),
|
||||
border: 1),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Container(
|
||||
width: 170.w,
|
||||
height: 35.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD90B2E),
|
||||
color: const Color(0xFFD90B2E),
|
||||
borderRadius: BorderRadius.circular(30.r)),
|
||||
child: Center(child: text14400white("Visit group")),
|
||||
),
|
||||
@@ -277,7 +276,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
|
||||
topLeft: Radius.circular(10.r),
|
||||
topRight: Radius.circular(10.r),
|
||||
),
|
||||
color: Color(0xFF222935),
|
||||
color: const Color(0xFF222935),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
|
||||
@@ -4,8 +4,8 @@ import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/controller/CommonTextFormField.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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';
|
||||
@@ -21,7 +21,7 @@ class _SearchGroupState extends State<SearchGroup> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
@@ -64,7 +64,7 @@ class _SearchGroupState extends State<SearchGroup> {
|
||||
Row(
|
||||
children: [
|
||||
text18w700white("Recent"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
text16w400_FCFCFCblur("See all"),
|
||||
],
|
||||
),
|
||||
@@ -85,12 +85,12 @@ class _SearchGroupState extends State<SearchGroup> {
|
||||
CircleAvatar(
|
||||
radius: 15.r,
|
||||
backgroundImage:
|
||||
AssetImage("assets/images/png/cimg3.png"),
|
||||
const AssetImage("assets/images/png/cimg3.png"),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text16400white("Kartikey gautam"),
|
||||
Spacer(),
|
||||
Icon(
|
||||
const Spacer(),
|
||||
const Icon(
|
||||
Icons.clear,
|
||||
color: Colors.white,
|
||||
)
|
||||
@@ -139,8 +139,8 @@ class _SearchGroupState extends State<SearchGroup> {
|
||||
border: 0.5),
|
||||
sizedBoxWidth(12.w),
|
||||
text16400white(title),
|
||||
Spacer(),
|
||||
Icon(
|
||||
const Spacer(),
|
||||
const Icon(
|
||||
Icons.clear,
|
||||
color: Colors.white,
|
||||
)
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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';
|
||||
|
||||
class ConnectCommunity extends StatefulWidget {
|
||||
const ConnectCommunity({super.key});
|
||||
@@ -34,10 +32,10 @@ class _ConnectCommunityState extends State<ConnectCommunity> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Connect with communities",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -54,7 +52,7 @@ class _ConnectCommunityState extends State<ConnectCommunity> {
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: BouncingScrollPhysics(),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
itemCount: communityData.length,
|
||||
itemBuilder: (context, index) {
|
||||
return communityCard(
|
||||
@@ -95,7 +93,7 @@ class _ConnectCommunityState extends State<ConnectCommunity> {
|
||||
Container(
|
||||
height: 65.h,
|
||||
width: 65.h,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
// color: Colors.amber,
|
||||
),
|
||||
@@ -128,7 +126,7 @@ class _ConnectCommunityState extends State<ConnectCommunity> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
@@ -148,13 +146,13 @@ class _ConnectCommunityState extends State<ConnectCommunity> {
|
||||
),
|
||||
sizedBoxWidth(95.w),
|
||||
text12w400_FCFCFC_blur(members),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Container(
|
||||
height: 30.h,
|
||||
width: 123.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
color: Color(0xFFD90B2E)),
|
||||
color: const Color(0xFFD90B2E)),
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC("Request to join")),
|
||||
)
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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';
|
||||
@@ -35,10 +33,10 @@ class _GroupSettingsState extends State<GroupSettings> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Group settings",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -60,7 +58,7 @@ class _GroupSettingsState extends State<GroupSettings> {
|
||||
child: Row(
|
||||
children: [
|
||||
text18w400_FCFCFC("Group type"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_outlined,
|
||||
color: Colors.white,
|
||||
@@ -82,7 +80,7 @@ class _GroupSettingsState extends State<GroupSettings> {
|
||||
child: Row(
|
||||
children: [
|
||||
text18w400_FCFCFC("Manage members"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios_outlined,
|
||||
color: Colors.white,
|
||||
@@ -106,7 +104,7 @@ class _GroupSettingsState extends State<GroupSettings> {
|
||||
topLeft: Radius.circular(30.r),
|
||||
topRight: Radius.circular(30.r),
|
||||
),
|
||||
color: Color(0xFF222935),
|
||||
color: const Color(0xFF222935),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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';
|
||||
@@ -60,13 +60,13 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
Appointment(
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now().add(Duration(hours: 3)),
|
||||
endTime: DateTime.now().add(const Duration(hours: 3)),
|
||||
subject: 'Match day',
|
||||
// color: Colors.red,
|
||||
),
|
||||
Appointment(
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now().add(Duration(hours: 3)),
|
||||
endTime: DateTime.now().add(const Duration(hours: 3)),
|
||||
subject: 'Muharram/Ashura',
|
||||
// color: Colors.red,
|
||||
),
|
||||
@@ -77,18 +77,18 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "",
|
||||
customActionWidget: Row(children: [
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(
|
||||
width: 150.w,
|
||||
),
|
||||
offset: Offset(0, 40),
|
||||
color: Color(0xFF222935),
|
||||
offset: const Offset(0, 40),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
@@ -100,7 +100,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: text14w400white("Create post"),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.sessions);
|
||||
@@ -128,12 +128,12 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
sizedBoxWidth(16.w),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(
|
||||
width: 210.w,
|
||||
),
|
||||
offset: Offset(0, 40),
|
||||
color: Color(0xFF222935),
|
||||
offset: const Offset(0, 40),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
@@ -143,7 +143,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: Row(
|
||||
children: [
|
||||
text14w400white("Add members"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/uiw_user-add.png",
|
||||
height: 15.h,
|
||||
@@ -153,7 +153,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -161,7 +161,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: Row(
|
||||
children: [
|
||||
text14w400white("Share"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
@@ -171,7 +171,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.groupinfo);
|
||||
@@ -181,7 +181,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: Row(
|
||||
children: [
|
||||
text14w400white("Group info"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector1a.png",
|
||||
height: 20.h,
|
||||
@@ -191,7 +191,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -199,7 +199,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: Row(
|
||||
children: [
|
||||
text14w400white("Search"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Frame 58575.png",
|
||||
height: 18.h,
|
||||
@@ -209,7 +209,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -217,7 +217,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: Row(
|
||||
children: [
|
||||
text14w400white("Mute Notification"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Black1233.png",
|
||||
height: 16.h,
|
||||
@@ -227,7 +227,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.groupsettings);
|
||||
@@ -237,7 +237,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: Row(
|
||||
children: [
|
||||
text14w400white("Edit group settings"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/setting2.png",
|
||||
height: 18.h,
|
||||
@@ -290,7 +290,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
color: Colors.white,
|
||||
width: 2,
|
||||
),
|
||||
boxShadow: [
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color.fromRGBO(0, 0, 0, 0.25),
|
||||
blurRadius: 12,
|
||||
@@ -301,7 +301,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
child: CircleAvatar(
|
||||
radius: 42.5.r,
|
||||
foregroundImage:
|
||||
AssetImage("assets/images/png/group111.png"),
|
||||
const AssetImage("assets/images/png/group111.png"),
|
||||
),
|
||||
))
|
||||
]),
|
||||
@@ -315,33 +315,35 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
sizedBoxHeight(16.h),
|
||||
Row(
|
||||
children: [
|
||||
commonGlassContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
borderradius: 100,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/community 1 (traced).png",
|
||||
height: 20.h,
|
||||
width: 20.w),
|
||||
),
|
||||
border: 0.5),
|
||||
commonContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
boxShape: BoxShape.circle,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderwidth: 0.5,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/community 1 (traced).png",
|
||||
height: 20.h,
|
||||
width: 20.w),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text16w400_FCFCFCblur("The athlectic town"),
|
||||
sizedBoxWidth(20.w),
|
||||
commonGlassContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset("assets/images/png/img12.png",
|
||||
height: 20.h, width: 20.w),
|
||||
),
|
||||
border: 0.5),
|
||||
commonContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
boxShape: BoxShape.circle,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderwidth: 0.5,
|
||||
customWidget: Center(
|
||||
child: Image.asset("assets/images/png/img12.png",
|
||||
height: 20.h, width: 20.w),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text16w400_FCFCFCblur("Public"),
|
||||
],
|
||||
@@ -349,19 +351,20 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
commonGlassContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
height: 20.h,
|
||||
width: 20.w),
|
||||
),
|
||||
border: 0.5),
|
||||
commonContainer(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
boxShape: BoxShape.circle,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderwidth: 0.5,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
height: 20.h,
|
||||
width: 20.w),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text16w400_FCFCFCblur("Rowing, Football, Swimming"),
|
||||
],
|
||||
@@ -379,7 +382,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
Row(
|
||||
children: [
|
||||
text16w700white("Badges"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Get.toNamed(RouteName.badges);
|
||||
@@ -436,8 +439,8 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
], number: "+2"),
|
||||
sizedBoxWidth(100.w),
|
||||
text16400white("7 members"),
|
||||
Spacer(),
|
||||
Icon(
|
||||
const Spacer(),
|
||||
const Icon(
|
||||
Icons.arrow_forward,
|
||||
color: Colors.white,
|
||||
)
|
||||
@@ -449,7 +452,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
Row(
|
||||
children: [
|
||||
text18w400white("Subgroups"),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.subgroups);
|
||||
@@ -503,7 +506,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
"11 New Announcements Request"),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Get.toNamed(RouteName.addEvent);
|
||||
@@ -513,7 +516,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
width: 43.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
color: Color(0xFFD90B2E),
|
||||
color: const Color(0xFFD90B2E),
|
||||
),
|
||||
child: Center(child: text12400white("11")),
|
||||
),
|
||||
@@ -530,7 +533,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonTabBar(tabs: const [
|
||||
const CommonTabBar(tabs: [
|
||||
Tab(
|
||||
text: 'Announcement',
|
||||
),
|
||||
@@ -594,11 +597,10 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
}
|
||||
|
||||
// MediaQuery.of(context).size.height
|
||||
return commonGlassContainerblue(
|
||||
return commonGlassUIBlue(
|
||||
width: double.infinity,
|
||||
height: 610.h,
|
||||
border: 0,
|
||||
borderradius: 1,
|
||||
borderRadius: BorderRadius.circular(1),
|
||||
customWidget: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -635,7 +637,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
@@ -644,12 +646,12 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 50),
|
||||
color: Color(0xFF222935),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
@@ -667,7 +669,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
@@ -677,7 +679,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -693,7 +695,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
@@ -703,7 +705,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
@@ -719,7 +721,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
@@ -745,7 +747,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
onTap: () {
|
||||
// Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
@@ -789,14 +791,14 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 0.43,
|
||||
const Spacer(),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
borderradius: 100,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
boxShape: BoxShape.circle,
|
||||
borderwidth: 0.43,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
@@ -808,13 +810,13 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('20'),
|
||||
sizedBoxWidth(20.w),
|
||||
commonGlassContainer(
|
||||
border: 0.43,
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
boxShape: BoxShape.circle,
|
||||
borderwidth: 0.43,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
@@ -874,11 +876,11 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 8,
|
||||
itemScale: 0.4,
|
||||
itemSize: Size(45, 45),
|
||||
boxPadding: EdgeInsets.all(8),
|
||||
boxAnimationDuration: Duration(milliseconds: 200),
|
||||
itemAnimationDuration: Duration(milliseconds: 500),
|
||||
hoverDuration: Duration(milliseconds: 700),
|
||||
itemSize: const Size(45, 45),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration: const Duration(milliseconds: 200),
|
||||
itemAnimationDuration: const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
@@ -950,12 +952,12 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
}
|
||||
|
||||
Widget containertile({required String text}) {
|
||||
return commonGlassContainer(
|
||||
border: 1,
|
||||
return commonContainer(
|
||||
width: 100.w,
|
||||
height: 30.h,
|
||||
borderradius: 30.r,
|
||||
borderColor: Color(0xFFD90B2E),
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
borderwidth: 1,
|
||||
borderColor: const Color(0xFFD90B2E),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
@@ -966,23 +968,22 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(40.h),
|
||||
commonGlassContainer(
|
||||
commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 500.h,
|
||||
borderradius: 1,
|
||||
border: 0,
|
||||
borderRadius: BorderRadius.circular(1),
|
||||
customWidget: SfCalendar(
|
||||
view: CalendarView.day,
|
||||
appointmentTextStyle: TextStyle(color: Colors.white),
|
||||
headerStyle: CalendarHeaderStyle(
|
||||
appointmentTextStyle: const TextStyle(color: Colors.white),
|
||||
headerStyle: const CalendarHeaderStyle(
|
||||
textStyle: TextStyle(
|
||||
color: Colors.blue,
|
||||
color: Color(0xFFD90B2E),
|
||||
)),
|
||||
// blackoutDatesTextStyle: TextStyle(color: Colors.white),
|
||||
|
||||
weekNumberStyle:
|
||||
WeekNumberStyle(textStyle: TextStyle(color: Colors.white)),
|
||||
viewHeaderStyle: ViewHeaderStyle(
|
||||
const WeekNumberStyle(textStyle: TextStyle(color: Colors.white)),
|
||||
viewHeaderStyle: const ViewHeaderStyle(
|
||||
// backgroundColor: Colors.amber,
|
||||
dateTextStyle: TextStyle(color: Colors.white),
|
||||
dayTextStyle: TextStyle(color: Color(0xFFD90B2E)),
|
||||
@@ -992,18 +993,18 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
backgroundColor: Colors.transparent,
|
||||
firstDayOfWeek: 1,
|
||||
cellBorderColor: Colors.white,
|
||||
todayHighlightColor: Color(0xFFD90B2E),
|
||||
todayHighlightColor: const Color(0xFFD90B2E),
|
||||
todayTextStyle: const TextStyle(color: Colors.white),
|
||||
controller: _calendarController,
|
||||
showNavigationArrow: true,
|
||||
allowViewNavigation: true,
|
||||
showDatePickerButton: true,
|
||||
monthViewSettings: MonthViewSettings(
|
||||
monthViewSettings: const MonthViewSettings(
|
||||
// agendaStyle: AgendaStyle(
|
||||
// dateTextStyle: TextStyle(color: Colors.amber),
|
||||
// ),
|
||||
),
|
||||
allowedViews: [
|
||||
allowedViews: const [
|
||||
CalendarView.month,
|
||||
CalendarView.day,
|
||||
CalendarView.schedule,
|
||||
@@ -1012,20 +1013,20 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
showCurrentTimeIndicator: true,
|
||||
dataSource: MeetingDataSource(_appointments!),
|
||||
onTap: calendarTapped,
|
||||
timeSlotViewSettings: TimeSlotViewSettings(
|
||||
timeSlotViewSettings: const TimeSlotViewSettings(
|
||||
timeTextStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
monthCellBuilder: (context, details) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
details.date.day.toString(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white), // Set text color to white
|
||||
),
|
||||
),
|
||||
@@ -1064,7 +1065,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('Event Details'),
|
||||
title: const Text('Event Details'),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
@@ -1075,7 +1076,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
actions: <Widget>[
|
||||
ElevatedButton(
|
||||
child: Text('Close'),
|
||||
child: const Text('Close'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
@@ -1093,7 +1094,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('Event Details'),
|
||||
title: const Text('Event Details'),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
@@ -1104,7 +1105,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
),
|
||||
actions: <Widget>[
|
||||
ElevatedButton(
|
||||
child: Text('Close'),
|
||||
child: const Text('Close'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
||||
@@ -33,8 +33,8 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
TextEditingController dateController = TextEditingController();
|
||||
TextEditingController dateController2 = TextEditingController();
|
||||
|
||||
TimeOfDay? starttime = TimeOfDay(hour: 15, minute: 0);
|
||||
TimeOfDay? endtime = TimeOfDay(hour: 15, minute: 0);
|
||||
TimeOfDay? starttime = const TimeOfDay(hour: 15, minute: 0);
|
||||
TimeOfDay? endtime = const TimeOfDay(hour: 15, minute: 0);
|
||||
|
||||
String formatTimeOfDay(TimeOfDay time) {
|
||||
final now = DateTime.now();
|
||||
@@ -49,9 +49,9 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -69,7 +69,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
text16400white("Event Title"),
|
||||
sizedBoxHeight(14.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -108,10 +108,10 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
},
|
||||
child: DottedBorder(
|
||||
strokeWidth: 1,
|
||||
dashPattern: [7, 4],
|
||||
dashPattern: const [7, 4],
|
||||
borderType: BorderType.RRect,
|
||||
radius: Radius.circular(14.r),
|
||||
color: Color(0xFF434A53),
|
||||
color: const Color(0xFF434A53),
|
||||
child: commonGlassContainer(
|
||||
border: 0,
|
||||
width: double.infinity,
|
||||
@@ -137,12 +137,12 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
width: 27,
|
||||
height: 27,
|
||||
decoration: ShapeDecoration(
|
||||
color: Color(0xFF7E7E7E),
|
||||
color: const Color(0xFF7E7E7E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(5)),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
@@ -197,7 +197,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
text12w400_FCFCFC_blur("10 kb")
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
'assets/images/png/cancelicon.png',
|
||||
height: 20.h,
|
||||
@@ -212,8 +212,8 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
sizedBoxHeight(14.h),
|
||||
CommonDropdownBtn(
|
||||
hint: '',
|
||||
items: [],
|
||||
leadingImage: Container(
|
||||
items: const [],
|
||||
leadingImage: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -228,8 +228,8 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
sizedBoxHeight(14.h),
|
||||
CommonDropdownBtn(
|
||||
hint: '',
|
||||
items: [],
|
||||
leadingImage: Container(
|
||||
items: const [],
|
||||
leadingImage: SizedBox(
|
||||
height: 22.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
@@ -257,7 +257,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
child: CustomTextFormField(
|
||||
textEditingController: dateController,
|
||||
hintText: "",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -288,7 +288,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
child: CustomTextFormField(
|
||||
textEditingController: dateController2,
|
||||
hintText: "",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -343,7 +343,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -397,7 +397,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
customWidget: Transform.scale(
|
||||
scale: 1.4,
|
||||
child: Checkbox(
|
||||
side: BorderSide(color: Color(0xFF434A53)),
|
||||
side: const BorderSide(color: Color(0xFF434A53)),
|
||||
value: isChecked.value,
|
||||
activeColor: Colors.transparent,
|
||||
checkColor: Colors.white,
|
||||
@@ -417,8 +417,8 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
sizedBoxHeight(14.h),
|
||||
CommonDropdownBtn(
|
||||
hint: '',
|
||||
items: [],
|
||||
leadingImage: Container(
|
||||
items: const [],
|
||||
leadingImage: SizedBox(
|
||||
height: 22.h,
|
||||
width: 28.w,
|
||||
child: Center(
|
||||
@@ -447,7 +447,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
),
|
||||
hintText: "",
|
||||
suffixIcon:
|
||||
Icon(Icons.arrow_forward, color: Color(0xFFFFFFFF)),
|
||||
const Icon(Icons.arrow_forward, color: Color(0xFFFFFFFF)),
|
||||
),
|
||||
// sizedBoxHeight(20.h),
|
||||
// containerWidget(
|
||||
@@ -509,7 +509,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
children: [
|
||||
text16400white("Minutes"),
|
||||
sizedBoxWidth(5.w),
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
color: Colors.white,
|
||||
)
|
||||
@@ -546,7 +546,7 @@ class _GroupEventState extends State<GroupEvent> {
|
||||
),
|
||||
sizedBoxWidth(8.w),
|
||||
text16400white(title),
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/cancelicon.png",
|
||||
height: 20.h,
|
||||
|
||||
@@ -168,11 +168,11 @@ class _GroupTabState extends State<GroupTab> {
|
||||
padding: EdgeInsets.only(bottom: 25.h),
|
||||
child: GestureDetector(
|
||||
onTap: ontap,
|
||||
child: commonGlassContainer(
|
||||
border: 0.9,
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 162.h,
|
||||
borderradius: 10.r,
|
||||
borderwidth: 0.9,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
||||
child: Column(
|
||||
|
||||
@@ -152,7 +152,7 @@ class _NewPostState extends State<NewPost> {
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC("Tags"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownTag(
|
||||
CustomDropDownTag1(
|
||||
header: "Enter tags",
|
||||
title: "Enter tags",
|
||||
listData: [
|
||||
@@ -224,11 +224,13 @@ class _NewPostState extends State<NewPost> {
|
||||
CustomDropDownCheckBox(
|
||||
header: "",
|
||||
title: "",
|
||||
|
||||
listData: [
|
||||
'Active alliance network',
|
||||
'Fitfam federation',
|
||||
'The athletic town',
|
||||
'Football fever'
|
||||
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
images: [
|
||||
|
||||
@@ -46,23 +46,28 @@ class _RequestedGroupsState extends State<RequestedGroups> {
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)),
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
sizedBoxHeight(20.h),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: BouncingScrollPhysics(),
|
||||
itemCount: groupData.length,
|
||||
itemBuilder: (context, index) {
|
||||
return groupCard(
|
||||
ontap: () {},
|
||||
imagepath: groupData[index]['imagePath'],
|
||||
title: groupData[index]['text'],
|
||||
members: groupData[index]['members']);
|
||||
},
|
||||
)
|
||||
])
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child:
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
sizedBoxHeight(20.h),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: BouncingScrollPhysics(),
|
||||
itemCount: groupData.length,
|
||||
itemBuilder: (context, index) {
|
||||
return groupCard(
|
||||
ontap: () {},
|
||||
imagepath: groupData[index]['imagePath'],
|
||||
title: groupData[index]['text'],
|
||||
members: groupData[index]['members']);
|
||||
},
|
||||
)
|
||||
]),
|
||||
)
|
||||
]));
|
||||
}
|
||||
|
||||
@@ -76,11 +81,11 @@ class _RequestedGroupsState extends State<RequestedGroups> {
|
||||
padding: EdgeInsets.only(bottom: 25.h),
|
||||
child: GestureDetector(
|
||||
onTap: ontap,
|
||||
child: commonGlassContainer(
|
||||
border: 0.9,
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 162.h,
|
||||
borderradius: 10.r,
|
||||
borderwidth: 0.9,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
|
||||
child: Column(
|
||||
|
||||
@@ -41,11 +41,11 @@ class _SessionsState extends State<Sessions> {
|
||||
onSurface: Colors.white,
|
||||
),
|
||||
textTheme: Theme.of(context).textTheme.copyWith(
|
||||
headline6: TextStyle(color: Colors.blue),
|
||||
titleLarge: const TextStyle(color: Colors.blue),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Color(0xFFD90B2E),
|
||||
foregroundColor: const Color(0xFFD90B2E),
|
||||
),
|
||||
));
|
||||
return showTimePicker(
|
||||
@@ -71,11 +71,11 @@ class _SessionsState extends State<Sessions> {
|
||||
// onSecondary: Colors.red,
|
||||
),
|
||||
textTheme: Theme.of(context).textTheme.copyWith(
|
||||
headline6: TextStyle(color: Colors.blue),
|
||||
titleLarge: const TextStyle(color: Colors.blue),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Color(0xFFD90B2E),
|
||||
foregroundColor: const Color(0xFFD90B2E),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -130,9 +130,9 @@ class _SessionsState extends State<Sessions> {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Sessions",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -153,7 +153,7 @@ class _SessionsState extends State<Sessions> {
|
||||
sizedBoxHeight(25.h),
|
||||
CustomTextFormField(
|
||||
hintText: "",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -195,20 +195,28 @@ class _SessionsState extends State<Sessions> {
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: ["hhh"],
|
||||
listData: const ["hhh"],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector (5)12.png")),
|
||||
"assets/images/png/Vector (5)12.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC('Sport'),
|
||||
sizedBoxHeight(25.h),
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: ["hhh"],
|
||||
listData: const ["hhh"],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector (4).png")),
|
||||
leadingImage: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC('Starts'),
|
||||
sizedBoxHeight(25.h),
|
||||
@@ -218,7 +226,7 @@ class _SessionsState extends State<Sessions> {
|
||||
},
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -247,7 +255,8 @@ class _SessionsState extends State<Sessions> {
|
||||
customWidget: Transform.scale(
|
||||
scale: 1.4,
|
||||
child: Checkbox(
|
||||
side: BorderSide(color: Color(0xFF434A53)),
|
||||
side: const BorderSide(
|
||||
color: Color(0xFF434A53)),
|
||||
value: isChecked.value,
|
||||
activeColor: Colors.transparent,
|
||||
checkColor: Colors.white,
|
||||
@@ -267,7 +276,7 @@ class _SessionsState extends State<Sessions> {
|
||||
sizedBoxHeight(20.h),
|
||||
CustomTextFormField(
|
||||
hintText: "",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -285,16 +294,19 @@ class _SessionsState extends State<Sessions> {
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: ["hryy"],
|
||||
listData: const ["hryy"],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage:
|
||||
Image.asset("assets/images/png/Black.png")),
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Black.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Add Users"),
|
||||
sizedBoxHeight(25.h),
|
||||
CustomTextFormField(
|
||||
hintText: "",
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
@@ -304,7 +316,7 @@ class _SessionsState extends State<Sessions> {
|
||||
width: 20.w,
|
||||
),
|
||||
)),
|
||||
suffixIcon: Container(
|
||||
suffixIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 20.h,
|
||||
child: Center(
|
||||
@@ -342,7 +354,7 @@ class _SessionsState extends State<Sessions> {
|
||||
children: [
|
||||
text16400white("Minutes"),
|
||||
sizedBoxWidth(5.w),
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
color: Colors.white,
|
||||
)
|
||||
@@ -369,10 +381,10 @@ class _SessionsState extends State<Sessions> {
|
||||
},
|
||||
child: DottedBorder(
|
||||
strokeWidth: 1,
|
||||
dashPattern: [7, 4],
|
||||
dashPattern: const [7, 4],
|
||||
borderType: BorderType.RRect,
|
||||
radius: Radius.circular(14.r),
|
||||
color: Color(0xFF434A53),
|
||||
color: const Color(0xFF434A53),
|
||||
child: commonGlassContainer(
|
||||
border: 0,
|
||||
width: double.infinity,
|
||||
@@ -399,7 +411,8 @@ class _SessionsState extends State<Sessions> {
|
||||
width: 27,
|
||||
height: 27,
|
||||
decoration: ShapeDecoration(
|
||||
color: Color(0xFF7E7E7E),
|
||||
color:
|
||||
const Color(0xFF7E7E7E),
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
@@ -407,7 +420,7 @@ class _SessionsState extends State<Sessions> {
|
||||
.circular(
|
||||
5)),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons
|
||||
.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
@@ -439,9 +452,9 @@ class _SessionsState extends State<Sessions> {
|
||||
CustomDropDownRadio(
|
||||
header: "More options",
|
||||
title: "",
|
||||
listData: [""],
|
||||
listData: const [""],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: SizedBox()),
|
||||
leadingImage: const SizedBox()),
|
||||
sizedBoxHeight(30.h),
|
||||
CommonBtn(text: "Create event"),
|
||||
sizedBoxHeight(50.h),
|
||||
|
||||
@@ -0,0 +1,400 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/ImageUpload.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';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
class AddCertificate extends StatefulWidget {
|
||||
const AddCertificate({super.key});
|
||||
|
||||
@override
|
||||
State<AddCertificate> createState() => _AddCertificateState();
|
||||
}
|
||||
|
||||
class _AddCertificateState extends State<AddCertificate> {
|
||||
final GlobalKey<FormState> _formkey = GlobalKey<FormState>();
|
||||
TextEditingController certicationname = TextEditingController();
|
||||
TextEditingController certificationreason = TextEditingController();
|
||||
TextEditingController datecontroller = TextEditingController();
|
||||
|
||||
TextEditingController querycontroller = TextEditingController();
|
||||
|
||||
DateTime? _selectedDate;
|
||||
|
||||
Future<void> _selectDate(BuildContext context) async {
|
||||
DateTime yesterday = DateTime.now().subtract(const Duration(days: 1));
|
||||
DateTime eighteenYearsAgo =
|
||||
DateTime.now().subtract(const Duration(days: 365 * 18));
|
||||
|
||||
final ThemeData customTheme = Theme.of(context).copyWith(
|
||||
colorScheme: const ColorScheme.light(
|
||||
primary: Color(0xFFD90B2E),
|
||||
surfaceTint: Color(0xFF222935),
|
||||
surface: Color(0xFF222935),
|
||||
onPrimary: Colors.white,
|
||||
onSurface: Colors.white,
|
||||
onSecondary: Colors.white),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: const Color(0xFFD90B2E),
|
||||
),
|
||||
));
|
||||
|
||||
final DateTime? pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: yesterday,
|
||||
firstDate: DateTime(1950),
|
||||
lastDate: DateTime(2026),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Theme(
|
||||
data: customTheme,
|
||||
// ThemeData.light().copyWith(
|
||||
// colorScheme: ColorScheme.dark(
|
||||
// primary: Color(0XFF222935).withOpacity(0.60),
|
||||
// onPrimary: Colors.white, // Change text color
|
||||
// ),
|
||||
// textButtonTheme: TextButtonThemeData(
|
||||
// style: TextButton.styleFrom(
|
||||
// foregroundColor: Colors.white, // Change button text color
|
||||
// ),
|
||||
// ),
|
||||
// dialogBackgroundColor: Color(0XFF222935)
|
||||
// .withOpacity(0.60), // Change dialog background color
|
||||
// ),
|
||||
child: child!,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (pickedDate != null) {
|
||||
// if (pickedDate.isBefore(eighteenYearsAgo)) {
|
||||
setState(() {
|
||||
_selectedDate = pickedDate;
|
||||
datecontroller.text =
|
||||
"${_selectedDate!.year.toString().padLeft(2, '0')}-${_selectedDate!.month.toString().padLeft(2, '0')}-${_selectedDate!.day.toString().padLeft(2, '0')}";
|
||||
});
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
List<File?> filePath = [];
|
||||
bool isImageAdded = false;
|
||||
|
||||
UploadData() async {
|
||||
utils.loader();
|
||||
List<MultipartFile> certificatelist = [];
|
||||
|
||||
for (var file in filePath.where((file) => file != null)) {
|
||||
certificatelist.add(
|
||||
await MultipartFile.fromFile(
|
||||
file!.path,
|
||||
filename: path.basename(file.path),
|
||||
),
|
||||
);
|
||||
}
|
||||
FormData formdata = FormData.fromMap({
|
||||
"certification_name": certicationname.text,
|
||||
"certification_reason": certificationreason.text,
|
||||
"certification_date": datecontroller.text,
|
||||
"certification_image": certificatelist[0],
|
||||
});
|
||||
final data = await Profilepostmethod().postCertification(formdata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
// Get.back();
|
||||
Get.toNamed(RouteName.mainscreen, arguments: 4);
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Add certifications",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: SingleChildScrollView(
|
||||
child: Form(
|
||||
key: _formkey,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Certification name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
height: 17.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
height: 17.h,
|
||||
width: 18.w,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your certification name ';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
hintText: "Enter certification name",
|
||||
textEditingController: certicationname,
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white("Certification reason"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
height: 17.h,
|
||||
width: 18.w,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
height: 17.h,
|
||||
width: 18.w,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your certification reason ';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
hintText: "Enter certification reason",
|
||||
textEditingController: certificationreason,
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white("Certification date"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: datecontroller,
|
||||
readonly: true,
|
||||
onTap: () {
|
||||
_selectDate(context);
|
||||
},
|
||||
// texttype: TextInputType.text,
|
||||
hintText: "Enter your certification date",
|
||||
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 certification date';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white("Certification image"),
|
||||
sizedBoxHeight(16.h),
|
||||
filePath.isNotEmpty && isImageAdded
|
||||
? Container(
|
||||
height: 167.h,
|
||||
width: double.infinity,
|
||||
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: 12,
|
||||
bottom: 12,
|
||||
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: Colors.black,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5)),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
),
|
||||
// ),
|
||||
]),
|
||||
)
|
||||
: GestureDetector(
|
||||
// onTap: () {
|
||||
// ImageUploadBottomSheet().showModal(
|
||||
// context,
|
||||
// false,
|
||||
// (result) {
|
||||
// var file = File(result);
|
||||
// filePath.add(file);
|
||||
// // isImageAdded = true;
|
||||
// setState(() {
|
||||
// isImageAdded = true;
|
||||
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
false,
|
||||
(result) {
|
||||
var file = File(result);
|
||||
|
||||
filePath.add(file);
|
||||
isImageAdded = true;
|
||||
setState(() {
|
||||
// Navigator.of(context).pop();
|
||||
Get.back();
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 167,
|
||||
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 certification \nimage',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontFamily: 'Poppins',
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(50.h),
|
||||
CustomButton(
|
||||
onPressed: () {
|
||||
// final isValid =
|
||||
// _formkey.currentState?.validate();
|
||||
if (certicationname.text.isBlank! &&
|
||||
certificationreason.text.isBlank! &&
|
||||
datecontroller.text.isBlank! &&
|
||||
filePath.isEmpty) {
|
||||
utils.showToast("Please fill all fields");
|
||||
} else {
|
||||
UploadData();
|
||||
}
|
||||
},
|
||||
text: "Send")
|
||||
]),
|
||||
),
|
||||
))
|
||||
])),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
|
||||
@@ -42,60 +41,149 @@ class _CertificateState extends State<Certificate> {
|
||||
},
|
||||
];
|
||||
|
||||
late Future myfuture;
|
||||
int id = Get.arguments["id"];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
||||
myfuture = Profilegetmethod().getUserCertificates(id);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Certifications/Qualifications",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
), SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Container(
|
||||
height: 600.h,
|
||||
child: GridView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 20,
|
||||
crossAxisSpacing: 8,
|
||||
childAspectRatio: 0.65,
|
||||
),
|
||||
itemCount: CertificateData.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Certifications/Qualifications",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFFC18948),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occured',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return certificateobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBody(context) {
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Container(
|
||||
height: 600.h,
|
||||
child: GridView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 20,
|
||||
crossAxisSpacing: 8,
|
||||
childAspectRatio: 0.65,
|
||||
),
|
||||
itemCount: certificateobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
certificateobj!.data![index].certificationImage ==
|
||||
null ||
|
||||
certificateobj!.data![index]
|
||||
.certificationImage!.isEmpty
|
||||
? Image.asset(
|
||||
CertificateData[index]["imagePath"],
|
||||
height: 100.h,
|
||||
width: 105.w,
|
||||
)
|
||||
: Image.network(
|
||||
certificateobj!
|
||||
.data![index].certificationImage!,
|
||||
height: 100.h,
|
||||
width: 105.w,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
// Error handling when image fails to load
|
||||
return Image.asset(
|
||||
CertificateData[index]["imagePath"],
|
||||
height: 100.h,
|
||||
width: 105.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
CertificateData[index]["text"],
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
)
|
||||
])))
|
||||
]));
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
}),
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
certificateobj!.data![index]
|
||||
.certificationName ==
|
||||
null ||
|
||||
certificateobj!.data![index]
|
||||
.certificationName!.isEmpty
|
||||
? CertificateData[index]["text"]
|
||||
: certificateobj!
|
||||
.data![index].certificationName,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
)
|
||||
])))
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,276 +0,0 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
import 'package:regroup/Common/CommonDropDown.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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:intl/intl.dart';
|
||||
|
||||
class EditProfile extends StatefulWidget {
|
||||
const EditProfile({super.key});
|
||||
|
||||
@override
|
||||
State<EditProfile> createState() => _EditProfileState();
|
||||
}
|
||||
|
||||
class _EditProfileState extends State<EditProfile> {
|
||||
TextEditingController dateController = TextEditingController();
|
||||
|
||||
List<File?> filePath = [];
|
||||
bool? isImageAdded = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Stack(
|
||||
children: [
|
||||
filePath.isNotEmpty
|
||||
? ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(50.r),
|
||||
child: Image.file(
|
||||
filePath[0]!,
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
),
|
||||
),
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: AssetImage(
|
||||
"assets/images/png/cimg3.png",
|
||||
),
|
||||
radius: 50.r,
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
true,
|
||||
(result) {
|
||||
var file = File(result);
|
||||
|
||||
filePath.add(file);
|
||||
isImageAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFD90B2E)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/cameraicon2.png",
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white("Edit profile picture"),
|
||||
sizedBoxHeight(20.h),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16400white("Full name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Edward Hackett",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("User name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "edward_01",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Date of birth"),
|
||||
sizedBoxHeight(16.h),
|
||||
GestureDetector(
|
||||
onTap: () => datePicker(context, dateController),
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/calender.png",
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "12-04-2024",
|
||||
textEditingController: dateController,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Gender"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownRadio(
|
||||
header: "Male",
|
||||
title: "",
|
||||
showOtherOption: true,
|
||||
listData: ["Male", "Female", "Prefer not to say"],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector ws.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Location"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Elm street london, United Kingdom",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Primary sport"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownRadio(
|
||||
showOtherOption: true,
|
||||
header: "Rowing, Rugby, Swimming",
|
||||
title: "",
|
||||
listData: [
|
||||
"Rowing",
|
||||
"Cycling",
|
||||
"Running",
|
||||
"Swimming",
|
||||
"Triathlon",
|
||||
"Hiking",
|
||||
"Football",
|
||||
"Rugby"
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
// CommonDropdownradioBtn(
|
||||
// hint: "Rowing, Rugby, Swimming",
|
||||
// items: [
|
||||
// "Rowing",
|
||||
// "Cycling",
|
||||
// "Running",
|
||||
// "Swimming",
|
||||
// "Triathlon",
|
||||
// "Hiking",
|
||||
// "Football",
|
||||
// "Rugby"
|
||||
// ],
|
||||
// leadingIcon: Image.asset(
|
||||
// "assets/images/png/Vector (4).png",
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// ),
|
||||
// showOtherOption: true,
|
||||
// ),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Bio"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField2(
|
||||
hintText:
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
|
||||
maxlines: 3,
|
||||
),
|
||||
sizedBoxHeight(60.h),
|
||||
CommonBtn(text: "Save"),
|
||||
sizedBoxHeight(60.h),
|
||||
],
|
||||
)
|
||||
])))
|
||||
]));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
class GetEditProfileBus {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
GetEditProfileBus({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
GetEditProfileBus.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 {
|
||||
int? id;
|
||||
int? iamPrincipalXid;
|
||||
int? businessTypeXid;
|
||||
String? foundedon;
|
||||
String? businessOwnerName;
|
||||
String? businessName;
|
||||
String? businessUsername;
|
||||
String? businessLocation;
|
||||
String? businessContactNumber;
|
||||
String? businessEmail;
|
||||
String? businessHandle;
|
||||
String? websiteLink;
|
||||
String? googleReviewLink;
|
||||
String? businessLogo;
|
||||
String? tags;
|
||||
String? bannerImage;
|
||||
String? businessProfileImage;
|
||||
String? bio;
|
||||
Follows? follows;
|
||||
int? isIamFollowingToGuestUser;
|
||||
BusinessType? businessType;
|
||||
IamPrincipalData? iamPrincipalData;
|
||||
|
||||
Data(
|
||||
{this.id,
|
||||
this.iamPrincipalXid,
|
||||
this.businessTypeXid,
|
||||
this.businessOwnerName,
|
||||
this.businessName,
|
||||
this.businessUsername,
|
||||
this.businessLocation,
|
||||
this.businessContactNumber,
|
||||
this.businessEmail,
|
||||
this.businessHandle,
|
||||
this.websiteLink,
|
||||
this.googleReviewLink,
|
||||
this.businessLogo,
|
||||
this.tags,
|
||||
this.bannerImage,
|
||||
this.businessProfileImage,
|
||||
this.bio,
|
||||
this.follows,
|
||||
this.isIamFollowingToGuestUser,
|
||||
this.businessType,
|
||||
this.iamPrincipalData});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
iamPrincipalXid = json['iam_principal_xid'];
|
||||
businessTypeXid = json['business_type_xid'];
|
||||
foundedon = json['founded_on'];
|
||||
businessOwnerName = json['business_owner_name'];
|
||||
businessName = json['business_name'];
|
||||
businessUsername = json['business_username'];
|
||||
businessLocation = json['business_location'];
|
||||
businessContactNumber = json['business_contact_number'];
|
||||
businessEmail = json['business_email'];
|
||||
businessHandle = json['business_handle'];
|
||||
websiteLink = json['website_link'];
|
||||
googleReviewLink = json['google_review_link'];
|
||||
businessLogo = json['business_logo'];
|
||||
tags = json['tags'];
|
||||
bannerImage = json['banner_image'];
|
||||
businessProfileImage = json['business_profile_image'];
|
||||
bio = json['bio'];
|
||||
follows =
|
||||
json['follows'] != null ? new Follows.fromJson(json['follows']) : null;
|
||||
isIamFollowingToGuestUser = json['is_iam_following_to_guest_user'];
|
||||
businessType = json['business_type'] != null
|
||||
? new BusinessType.fromJson(json['business_type'])
|
||||
: null;
|
||||
iamPrincipalData = json['iam_principal_data'] != null
|
||||
? new IamPrincipalData.fromJson(json['iam_principal_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['business_type_xid'] = this.businessTypeXid;
|
||||
data['founded_on'] = this.foundedon;
|
||||
data['business_owner_name'] = this.businessOwnerName;
|
||||
data['business_name'] = this.businessName;
|
||||
data['business_username'] = this.businessUsername;
|
||||
data['business_location'] = this.businessLocation;
|
||||
data['business_contact_number'] = this.businessContactNumber;
|
||||
data['business_email'] = this.businessEmail;
|
||||
data['business_handle'] = this.businessHandle;
|
||||
data['website_link'] = this.websiteLink;
|
||||
data['google_review_link'] = this.googleReviewLink;
|
||||
data['business_logo'] = this.businessLogo;
|
||||
data['tags'] = this.tags;
|
||||
data['banner_image'] = this.bannerImage;
|
||||
data['business_profile_image'] = this.businessProfileImage;
|
||||
data['bio'] = this.bio;
|
||||
if (this.follows != null) {
|
||||
data['follows'] = this.follows!.toJson();
|
||||
}
|
||||
data['is_iam_following_to_guest_user'] = this.isIamFollowingToGuestUser;
|
||||
if (this.businessType != null) {
|
||||
data['business_type'] = this.businessType!.toJson();
|
||||
}
|
||||
if (this.iamPrincipalData != null) {
|
||||
data['iam_principal_data'] = this.iamPrincipalData!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Follows {
|
||||
int? following;
|
||||
int? followers;
|
||||
|
||||
Follows({this.following, this.followers});
|
||||
|
||||
Follows.fromJson(Map<String, dynamic> json) {
|
||||
following = json['following'];
|
||||
followers = json['followers'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['following'] = this.following;
|
||||
data['followers'] = this.followers;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class BusinessType {
|
||||
int? id;
|
||||
String? name;
|
||||
String? image;
|
||||
String? description;
|
||||
int? isActive;
|
||||
String? createdBy;
|
||||
String? modifiedBy;
|
||||
String? deletedAt;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
BusinessType(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.image,
|
||||
this.description,
|
||||
this.isActive,
|
||||
this.createdBy,
|
||||
this.modifiedBy,
|
||||
this.deletedAt,
|
||||
this.createdAt,
|
||||
this.updatedAt});
|
||||
|
||||
BusinessType.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
image = json['image'];
|
||||
description = json['description'];
|
||||
isActive = json['is_active'];
|
||||
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['name'] = this.name;
|
||||
data['image'] = this.image;
|
||||
data['description'] = this.description;
|
||||
data['is_active'] = this.isActive;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
class IamPrincipalData {
|
||||
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;
|
||||
int? isAccountVisibility;
|
||||
int? isDeleted;
|
||||
String? reason;
|
||||
String? createdBy;
|
||||
String? modifiedBy;
|
||||
String? deletedAt;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
String? profileImage;
|
||||
|
||||
IamPrincipalData(
|
||||
{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.isAccountVisibility,
|
||||
this.isDeleted,
|
||||
this.reason,
|
||||
this.createdBy,
|
||||
this.modifiedBy,
|
||||
this.deletedAt,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.profileImage});
|
||||
|
||||
IamPrincipalData.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'];
|
||||
isAccountVisibility = json['is_account_visibility'];
|
||||
isDeleted = json['is_deleted'];
|
||||
reason = json['reason'];
|
||||
createdBy = json['created_by'];
|
||||
modifiedBy = json['modified_by'];
|
||||
deletedAt = json['deleted_at'];
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
profileImage = json['profile_image'];
|
||||
}
|
||||
|
||||
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['is_account_visibility'] = this.isAccountVisibility;
|
||||
data['is_deleted'] = this.isDeleted;
|
||||
data['reason'] = this.reason;
|
||||
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;
|
||||
data['profile_image'] = this.profileImage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
class GetEditProfileIndi {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
GetEditProfileIndi({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
GetEditProfileIndi.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 {
|
||||
int? id;
|
||||
String? userName;
|
||||
String? location;
|
||||
String? fullName;
|
||||
// String? profileImage;
|
||||
String? profilePhoto;
|
||||
String? gender;
|
||||
String? dateOfBirth;
|
||||
List<Interest>? interest;
|
||||
String? about;
|
||||
String? position;
|
||||
String? trainingScores;
|
||||
String? height;
|
||||
String? weight;
|
||||
String? battingAverage;
|
||||
Follows? follows;
|
||||
List<Timelines>? timelines;
|
||||
int? accountVisibility;
|
||||
List<MyJoinedGroups>? myJoinedGroups;
|
||||
List<Certifications>? certifications;
|
||||
int? daysBeforeJoined;
|
||||
|
||||
Data(
|
||||
{this.id,
|
||||
this.userName,
|
||||
this.fullName,
|
||||
// this.profileImage,
|
||||
this.profilePhoto,
|
||||
this.gender,
|
||||
this.dateOfBirth,
|
||||
this.interest,
|
||||
this.about,
|
||||
this.position,
|
||||
this.trainingScores,
|
||||
this.height,
|
||||
this.weight,
|
||||
this.battingAverage,
|
||||
this.follows,
|
||||
this.timelines,
|
||||
this.accountVisibility,
|
||||
this.myJoinedGroups,
|
||||
this.certifications,
|
||||
this.daysBeforeJoined});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
userName = json['user_name'];
|
||||
location = json['location'];
|
||||
|
||||
fullName = json['full_name'];
|
||||
// profileImage = json['profile_image'];
|
||||
profilePhoto = json['profile_photo'];
|
||||
gender = json['gender'];
|
||||
dateOfBirth = json['date_of_birth'];
|
||||
if (json['interest'] != null) {
|
||||
interest = <Interest>[];
|
||||
json['interest'].forEach((v) {
|
||||
interest!.add(new Interest.fromJson(v));
|
||||
});
|
||||
}
|
||||
about = json['about'];
|
||||
position = json['position'];
|
||||
trainingScores = json['training_scores'];
|
||||
height = json['height'];
|
||||
weight = json['weight'];
|
||||
battingAverage = json['batting_average'];
|
||||
follows =
|
||||
json['follows'] != null ? new Follows.fromJson(json['follows']) : null;
|
||||
if (json['timelines'] != null) {
|
||||
timelines = <Timelines>[];
|
||||
json['timelines'].forEach((v) {
|
||||
timelines!.add(new Timelines.fromJson(v));
|
||||
});
|
||||
}
|
||||
accountVisibility = json['account_visibility'];
|
||||
if (json['my_joined_groups'] != null) {
|
||||
myJoinedGroups = <MyJoinedGroups>[];
|
||||
json['my_joined_groups'].forEach((v) {
|
||||
myJoinedGroups!.add(new MyJoinedGroups.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['certifications'] != null) {
|
||||
certifications = <Certifications>[];
|
||||
json['certifications'].forEach((v) {
|
||||
certifications!.add(new Certifications.fromJson(v));
|
||||
});
|
||||
}
|
||||
daysBeforeJoined = json['days_before_joined'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['user_name'] = this.userName;
|
||||
data['location'] = this.location;
|
||||
|
||||
data['full_name'] = this.fullName;
|
||||
// data['profile_image'] = this.profileImage;
|
||||
data['profile_photo'] = this.profilePhoto;
|
||||
data['gender'] = this.gender;
|
||||
data['date_of_birth'] = this.dateOfBirth;
|
||||
if (this.interest != null) {
|
||||
data['interest'] = this.interest!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
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;
|
||||
if (this.follows != null) {
|
||||
data['follows'] = this.follows!.toJson();
|
||||
}
|
||||
if (this.timelines != null) {
|
||||
data['timelines'] = this.timelines!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['account_visibility'] = this.accountVisibility;
|
||||
if (this.myJoinedGroups != null) {
|
||||
data['my_joined_groups'] =
|
||||
this.myJoinedGroups!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.certifications != null) {
|
||||
data['certifications'] =
|
||||
this.certifications!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['days_before_joined'] = this.daysBeforeJoined;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Interest {
|
||||
int? id;
|
||||
String? name;
|
||||
|
||||
Interest({this.id, this.name});
|
||||
|
||||
Interest.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Timelines {
|
||||
int? id;
|
||||
String? clubName;
|
||||
String? roleName;
|
||||
String? teamName;
|
||||
String? startDate;
|
||||
String? endDate;
|
||||
String? abilitiesXids;
|
||||
List<Abilities>? abilities;
|
||||
|
||||
Timelines(
|
||||
{this.id,
|
||||
this.clubName,
|
||||
this.roleName,
|
||||
this.teamName,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.abilitiesXids,
|
||||
this.abilities});
|
||||
|
||||
Timelines.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
clubName = json['club_name'];
|
||||
roleName = json['role_name'];
|
||||
teamName = json['team_name'];
|
||||
startDate = json['start_date'];
|
||||
endDate = json['end_date'];
|
||||
abilitiesXids = json['abilities_xids'];
|
||||
if (json['abilities'] != null) {
|
||||
abilities = <Abilities>[];
|
||||
json['abilities'].forEach((v) {
|
||||
abilities!.add(new Abilities.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['club_name'] = this.clubName;
|
||||
data['role_name'] = this.roleName;
|
||||
data['team_name'] = this.teamName;
|
||||
data['start_date'] = this.startDate;
|
||||
data['end_date'] = this.endDate;
|
||||
data['abilities_xids'] = this.abilitiesXids;
|
||||
if (this.abilities != null) {
|
||||
data['abilities'] = this.abilities!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Abilities {
|
||||
int? id;
|
||||
String? name;
|
||||
|
||||
Abilities({this.id, this.name});
|
||||
|
||||
Abilities.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Follows {
|
||||
int? following;
|
||||
int? followers;
|
||||
|
||||
Follows({this.following, this.followers});
|
||||
|
||||
Follows.fromJson(Map<String, dynamic> json) {
|
||||
following = json['following'];
|
||||
followers = json['followers'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['following'] = this.following;
|
||||
data['followers'] = this.followers;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Certifications {
|
||||
int? id;
|
||||
String? certificationName;
|
||||
String? certificationImage;
|
||||
String? certificationReason;
|
||||
String? certificationDate;
|
||||
int? iamPrincipalXid;
|
||||
|
||||
Certifications(
|
||||
{this.id,
|
||||
this.certificationName,
|
||||
this.certificationImage,
|
||||
this.certificationReason,
|
||||
this.certificationDate,
|
||||
this.iamPrincipalXid});
|
||||
|
||||
Certifications.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
certificationName = json['certification_name'];
|
||||
certificationImage = json['certification_image'];
|
||||
certificationReason = json['certification_reason'];
|
||||
certificationDate = json['certification_date'];
|
||||
iamPrincipalXid = json['iam_principal_xid'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['certification_name'] = this.certificationName;
|
||||
data['certification_image'] = this.certificationImage;
|
||||
data['certification_reason'] = this.certificationReason;
|
||||
data['certification_date'] = this.certificationDate;
|
||||
data['iam_principal_xid'] = this.iamPrincipalXid;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class MyJoinedGroups {
|
||||
int? id;
|
||||
int? iamPrincipalXid;
|
||||
int? manageGroupXid;
|
||||
GroupData? groupData;
|
||||
|
||||
MyJoinedGroups(
|
||||
{this.id, this.iamPrincipalXid, this.manageGroupXid, this.groupData});
|
||||
|
||||
MyJoinedGroups.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
iamPrincipalXid = json['iam_principal_xid'];
|
||||
manageGroupXid = json['manage_group_xid'];
|
||||
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;
|
||||
if (this.groupData != null) {
|
||||
data['group_data'] = this.groupData!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class GroupData {
|
||||
int? id;
|
||||
String? title;
|
||||
String? groupImage;
|
||||
|
||||
GroupData({this.id, this.title, this.groupImage});
|
||||
|
||||
GroupData.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
title = json['title'];
|
||||
groupImage = json['group_image'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['title'] = this.title;
|
||||
data['group_image'] = this.groupImage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
class InterestModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
InterestModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
InterestModel.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = <Data>[];
|
||||
json['data'].forEach((v) {
|
||||
data!.add(Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['status'] = status;
|
||||
data['status_code'] = statusCode;
|
||||
data['message'] = message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
String? name;
|
||||
String? image;
|
||||
|
||||
Data({this.id, this.name, this.image});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
image = json['image'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['name'] = name;
|
||||
data['image'] = image;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,487 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/View/picturecontroller/profileimagecontoller.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/ImageUpload.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
|
||||
import '../../../../../Utils/Common/CustomTextformfield.dart';
|
||||
|
||||
class BusEditProfile extends StatefulWidget {
|
||||
const BusEditProfile({super.key});
|
||||
|
||||
@override
|
||||
State<BusEditProfile> createState() => _BusEditProfileState();
|
||||
}
|
||||
|
||||
class _BusEditProfileState extends State<BusEditProfile> {
|
||||
TextEditingController busNameController = TextEditingController();
|
||||
TextEditingController busUserNameController = TextEditingController();
|
||||
TextEditingController ownerNameController = TextEditingController();
|
||||
|
||||
TextEditingController foundedonController = TextEditingController();
|
||||
TextEditingController websiteLinkController = TextEditingController();
|
||||
TextEditingController locationController = TextEditingController();
|
||||
TextEditingController bioController = TextEditingController();
|
||||
|
||||
String profilePicture = "";
|
||||
bool isImageAdded = false;
|
||||
|
||||
bool isOnce = true;
|
||||
late Future myfuture;
|
||||
|
||||
convertFileToMultiPart(String? file) async {
|
||||
return await MultipartFile.fromFile(
|
||||
file!,
|
||||
filename: path.basename(file),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
||||
myfuture = EditProfileApi()
|
||||
.getEditProfileBusiness()
|
||||
.then((value) => {setValues()});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
//Founded on & bio , businessUsername data not there
|
||||
|
||||
setValues() {
|
||||
if (isOnce) {
|
||||
busNameController.text = getEditProfileBus!.data!.businessName ?? '';
|
||||
busUserNameController.text =
|
||||
getEditProfileBus!.data!.businessOwnerName ?? 'victorygames _10';
|
||||
ownerNameController.text =
|
||||
getEditProfileBus!.data!.businessOwnerName ?? 'James Bothman';
|
||||
foundedonController.text =
|
||||
getEditProfileBus!.data!.foundedon ?? '12-04-2024';
|
||||
websiteLinkController.text =
|
||||
getEditProfileBus!.data!.websiteLink ?? 'victorygames _10';
|
||||
locationController.text = getEditProfileBus!.data!.businessLocation ??
|
||||
'Elm street london, United Kingdom';
|
||||
|
||||
bioController.text = getEditProfileBus!.data!.bio ?? "";
|
||||
|
||||
// _selectedgenderType = getEditProfileIndi!.data!.gender ?? '';
|
||||
// _selectedsportType = getEditProfileIndi!.data!.interest!.join(', ') ?? '';
|
||||
|
||||
isOnce = false;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
void saveEditProfileBus() async {
|
||||
var imageFile;
|
||||
|
||||
if (editProfileImage.usserprofilePicPath.value.isNotEmpty) {
|
||||
imageFile = await MultipartFile.fromFile(
|
||||
editProfileImage.usserprofilePicPath.value,
|
||||
filename: path.basename(profilePicture),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
FormData? updata;
|
||||
if (busNameController.text.isBlank! ||
|
||||
busUserNameController.text.isBlank! ||
|
||||
ownerNameController.text.isBlank! ||
|
||||
foundedonController.text.isBlank! ||
|
||||
websiteLinkController.text.isBlank! ||
|
||||
locationController.text.isBlank! ||
|
||||
bioController.text.isBlank!) {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Enter your credentials',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
);
|
||||
}
|
||||
// else if (profilePicture == "") {
|
||||
// utils.showToast('Upload edit profile picture!');
|
||||
// }
|
||||
else {
|
||||
utils.loader();
|
||||
updata = FormData.fromMap({
|
||||
"business_name": busNameController.text,
|
||||
"business_username": busUserNameController.text,
|
||||
"business_owner_name": ownerNameController.text,
|
||||
"founded_on": foundedonController.text,
|
||||
"website_link": websiteLinkController.text,
|
||||
"business_location": locationController.text,
|
||||
"bio": bioController.text,
|
||||
"business_profile":
|
||||
editProfileImage.usserprofilePicPath.isNotEmpty ? imageFile : null,
|
||||
// await convertFileToMultiPart(profilePicture),
|
||||
});
|
||||
|
||||
final data = await EditProfileApi().postEditProfileBusiness(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
// 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,
|
||||
// );
|
||||
utils.showToast("Data Saved Successfully");
|
||||
// Get.back();
|
||||
Get.toNamed(RouteName.mainscreen, arguments: 4);
|
||||
// Get.back(result: true);
|
||||
} else {
|
||||
Get.back();
|
||||
// btnController.reset();
|
||||
Get.snackbar(
|
||||
"Error!",
|
||||
data.data['message'],
|
||||
duration: const Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.red,
|
||||
margin: const EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
// _controller.isTextFieldEnabled.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final UserProfileImageController editProfileImage =
|
||||
Get.put(UserProfileImageController());
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return
|
||||
// const ShimmerCommon();
|
||||
|
||||
const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.blue,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
print("Data fetched-->");
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Stack(
|
||||
children: [
|
||||
Obx(
|
||||
() => editProfileImage
|
||||
.usserprofilePicPath.value !=
|
||||
''
|
||||
? ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(50.r),
|
||||
child: editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value !=
|
||||
''
|
||||
? Image(
|
||||
// File(profilePicture),
|
||||
image: FileImage(
|
||||
File(
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
errorBuilder:
|
||||
(BuildContext
|
||||
context,
|
||||
Object
|
||||
exception,
|
||||
StackTrace?
|
||||
stackTrace) {
|
||||
return CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
"assets/images/png/Ellipse 37 (1).png"),
|
||||
radius: 50.r,
|
||||
);
|
||||
},
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/Ellipse 37 (1).png')),
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(60.r),
|
||||
child: getEditProfileBus!.data!
|
||||
.businessProfileImage !=
|
||||
null
|
||||
? ClipOval(
|
||||
child:
|
||||
SizedBox.fromSize(
|
||||
size: Size.fromRadius(
|
||||
25.r),
|
||||
child: CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
getEditProfileBus!
|
||||
.data!
|
||||
.businessProfileImage!),
|
||||
radius: 25.r,
|
||||
),
|
||||
),
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/png/Ellipse 37 (1).png")),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
true,
|
||||
(result) {
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value = result;
|
||||
var filenameresult =
|
||||
extractFileName(result);
|
||||
|
||||
print(
|
||||
"File name is $filenameresult");
|
||||
|
||||
profilePicture = result;
|
||||
isImageAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFD90B2E)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/cameraicon2.png",
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white("Edit profile picture"),
|
||||
sizedBoxHeight(30.h),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16400white("Business name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: busNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Victory gear sports emporium",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Business username"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
busUserNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Owner name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: ownerNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Founded on"),
|
||||
sizedBoxHeight(16.h),
|
||||
GestureDetector(
|
||||
onTap: () => datePicker(
|
||||
context, foundedonController),
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/calender.png",
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "",
|
||||
textEditingController:
|
||||
foundedonController,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Website link"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
websiteLinkController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Vector2a.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "",
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Location"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: locationController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Bio"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField2(
|
||||
textEditingController: bioController,
|
||||
hintText: "",
|
||||
maxlines: 3,
|
||||
),
|
||||
sizedBoxHeight(60.h),
|
||||
CommonBtn(
|
||||
text: "Save",
|
||||
onTap: () {
|
||||
saveEditProfileBus();
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(60.h),
|
||||
],
|
||||
)
|
||||
])))
|
||||
]);
|
||||
}
|
||||
return Container();
|
||||
})),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,940 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/View/picturecontroller/indiprofileimagecontroller.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/InterestApiList.dart';
|
||||
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/ImageUpload.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
|
||||
class EditProfile extends StatefulWidget {
|
||||
const EditProfile({super.key});
|
||||
|
||||
@override
|
||||
State<EditProfile> createState() => _EditProfileState();
|
||||
}
|
||||
|
||||
//location in normal profile individual api
|
||||
|
||||
class _EditProfileState extends State<EditProfile> {
|
||||
TextEditingController fullNameController = TextEditingController();
|
||||
TextEditingController userNameController = TextEditingController();
|
||||
TextEditingController dateController = TextEditingController();
|
||||
TextEditingController locationController = TextEditingController();
|
||||
TextEditingController aboutController = TextEditingController();
|
||||
TextEditingController positionController = TextEditingController();
|
||||
TextEditingController trainingScoresController = TextEditingController();
|
||||
TextEditingController heightController = TextEditingController();
|
||||
TextEditingController weightController = TextEditingController();
|
||||
TextEditingController battingAvgController = TextEditingController();
|
||||
|
||||
String profilePicture = "";
|
||||
bool isImageAdded = false;
|
||||
|
||||
bool isOnce = true;
|
||||
late Future myfuture;
|
||||
|
||||
convertFileToMultiPart1(String? file) async {
|
||||
return await MultipartFile.fromFile(
|
||||
file!,
|
||||
filename: path.basename(file),
|
||||
);
|
||||
}
|
||||
|
||||
String extractFileName1(String filePath) {
|
||||
return path.basename(filePath);
|
||||
}
|
||||
|
||||
String _selectedgenderType = '';
|
||||
|
||||
void _onItemSelected(String value) {
|
||||
setState(() {
|
||||
_selectedgenderType = value;
|
||||
});
|
||||
}
|
||||
|
||||
List<int> selectedinterestid = [];
|
||||
RxBool isloading = true.obs;
|
||||
|
||||
void getCatIdFromName(List<String> selectedInterests) {
|
||||
selectedinterestid.clear();
|
||||
for (var name in selectedInterests) {
|
||||
for (var i = 0; i < interestlistobj!.data!.length; i++) {
|
||||
if (name == interestlistobj!.data![i].name) {
|
||||
selectedinterestid.add(interestlistobj!.data![i].id!);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
myfuture = EditProfileApi()
|
||||
.getEditProfileIndividual()
|
||||
.then((value) => {setValues()});
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
setValues() async {
|
||||
if (isOnce) {
|
||||
fullNameController.text = getEditProfileIndi!.data!.fullName ?? '';
|
||||
userNameController.text = getEditProfileIndi!.data!.userName ?? '';
|
||||
dateController.text = getEditProfileIndi!.data!.dateOfBirth ?? '';
|
||||
|
||||
_selectedgenderType = getEditProfileIndi!.data!.gender ?? '';
|
||||
locationController.text = getEditProfileIndi!.data!.location ?? '';
|
||||
|
||||
locationController.text = getEditProfileIndi!.data!.about ?? '';
|
||||
aboutController.text = getEditProfileIndi!.data!.about ?? '';
|
||||
positionController.text =
|
||||
getEditProfileIndi!.data!.position ?? 'Lorem lpsum';
|
||||
|
||||
trainingScoresController.text =
|
||||
getEditProfileIndi!.data!.trainingScores ?? '50';
|
||||
|
||||
heightController.text = getEditProfileIndi!.data!.height ?? '6 feet';
|
||||
weightController.text = getEditProfileIndi!.data!.weight ?? '70kg';
|
||||
battingAvgController.text =
|
||||
getEditProfileIndi!.data!.battingAverage ?? '372';
|
||||
|
||||
isOnce = false;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
|
||||
void saveEditProfileInd() async {
|
||||
utils.loader();
|
||||
|
||||
FormData? updata;
|
||||
|
||||
var imageFile;
|
||||
|
||||
String abilitiesIds = selectedinterestid.toString();
|
||||
print("Interests String: $abilitiesIds");
|
||||
|
||||
if (editProfileImage.usserprofilePicPath.value.isNotEmpty) {
|
||||
imageFile = await MultipartFile.fromFile(
|
||||
editProfileImage.usserprofilePicPath.value,
|
||||
filename: path.basename(profilePicture),
|
||||
);
|
||||
print(imageFile.toString());
|
||||
}
|
||||
|
||||
|
||||
updata = FormData.fromMap({
|
||||
// "email_address": "priyanka14@yopmail.com",
|
||||
"full_name": fullNameController.text,
|
||||
"profile_image":
|
||||
editProfileImage.usserprofilePicPath.isNotEmpty ? imageFile : null,
|
||||
// profilePicture.isNotEmpty
|
||||
// ? await convertFileToMultiPart1(profilePicture)
|
||||
// : null,
|
||||
// "profile_image": "ghjkk.png",
|
||||
|
||||
"user_name": userNameController.text,
|
||||
"date_of_birth": dateController.text,
|
||||
"gender": _selectedgenderType,
|
||||
// "interest": "selectedSportsIds",
|
||||
"interest":
|
||||
// '[1,2,3,4]',
|
||||
abilitiesIds,
|
||||
"about": aboutController.text,
|
||||
"position": positionController.text,
|
||||
"training_scores": trainingScoresController.text,
|
||||
"height": heightController.text,
|
||||
"weight": weightController.text,
|
||||
"batting_average": battingAvgController.text,
|
||||
"address_line1": battingAvgController.text,
|
||||
});
|
||||
log(updata.toString());
|
||||
print(imageFile.toString());
|
||||
|
||||
final data = await EditProfileApi().postEditProfileIndividual(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
Get.toNamed(RouteName.mainscreen, arguments: 4);
|
||||
} else {
|
||||
Get.back();
|
||||
// btnController.reset();
|
||||
Get.snackbar(
|
||||
"Error!",
|
||||
data.data['message'],
|
||||
duration: const Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.red,
|
||||
margin: const EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
// _controller.isTextFieldEnabled.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
final UserIndiProfileImageController editProfileImage =
|
||||
Get.put(UserIndiProfileImageController());
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.blue,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
print("Data fetched-->");
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Stack(
|
||||
children: [
|
||||
Obx(
|
||||
() => editProfileImage
|
||||
.usserprofilePicPath.value !=
|
||||
''
|
||||
? ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(50.r),
|
||||
child: editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value !=
|
||||
''
|
||||
? Image(
|
||||
// File(profilePicture),
|
||||
image: FileImage(
|
||||
File(
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
errorBuilder:
|
||||
(BuildContext
|
||||
context,
|
||||
Object
|
||||
exception,
|
||||
StackTrace?
|
||||
stackTrace) {
|
||||
return CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
"assets/images/png/cimg3.png"),
|
||||
radius: 50.r,
|
||||
);
|
||||
},
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/cimg3.png')),
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(60.r),
|
||||
child: getEditProfileIndi!.data!
|
||||
.profilePhoto !=
|
||||
null
|
||||
? ClipOval(
|
||||
child:
|
||||
SizedBox.fromSize(
|
||||
size: Size.fromRadius(
|
||||
25.r),
|
||||
child: CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
getEditProfileIndi!
|
||||
.data!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
),
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/blank-profile-picture-973460_1280.png")),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
true,
|
||||
(result) {
|
||||
// var filenameresult =
|
||||
// extractFileName1(result);
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value = result;
|
||||
|
||||
var filenameresult =
|
||||
extractFileName1(result);
|
||||
print(
|
||||
"File name is $filenameresult");
|
||||
|
||||
profilePicture = result;
|
||||
isImageAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFD90B2E)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/cameraicon2.png",
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white("Edit profile picture"),
|
||||
sizedBoxHeight(20.h),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16400white("Full name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: fullNameController,
|
||||
leadingIcon: Container(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Edward Hackett",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("User name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: userNameController,
|
||||
leadingIcon: Container(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "edward_01",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Date of birth"),
|
||||
sizedBoxHeight(16.h),
|
||||
GestureDetector(
|
||||
onTap: () =>
|
||||
datePicker(context, dateController),
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/calender.png",
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "12-04-2024",
|
||||
textEditingController: dateController,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Gender"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownRadio(
|
||||
initialSelectedValue: _selectedgenderType,
|
||||
header: _selectedgenderType ?? "Male",
|
||||
title: "",
|
||||
showOtherOption: true,
|
||||
listData: const [
|
||||
"Male",
|
||||
"Female",
|
||||
"Prefer not to say"
|
||||
],
|
||||
onItemSelected: _onItemSelected,
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector ws.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Location"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: locationController,
|
||||
leadingIcon: Container(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText:
|
||||
"Elm street london, United Kingdom",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Interests"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
|
||||
//Obx(() {
|
||||
//return
|
||||
CustomDropDownChexkBox(
|
||||
header: 'Select interest',
|
||||
title: "",
|
||||
listData: listofInterests,
|
||||
onItemSelected: getCatIdFromName,
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
// showOtherOption: true,
|
||||
initiallySelected: listofUserInterests,
|
||||
),
|
||||
// }),
|
||||
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("About"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField2(
|
||||
textEditingController: aboutController,
|
||||
hintText:
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
|
||||
maxlines: 3,
|
||||
),
|
||||
// sizedBoxHeight(20.h),
|
||||
|
||||
text16400white("Position"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: positionController,
|
||||
hintText: "Lorem Ipsum",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Training Scores"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
trainingScoresController,
|
||||
hintText: "50",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Height"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: heightController,
|
||||
hintText: "6 feet",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Weight"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: weightController,
|
||||
hintText: "70kg",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Batting Average"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: battingAvgController,
|
||||
hintText: "372",
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(60.h),
|
||||
CommonBtn(
|
||||
text: "Save",
|
||||
onTap: () {
|
||||
if (fullNameController.text.isBlank! ||
|
||||
userNameController.text.isBlank! ||
|
||||
dateController.text.isBlank! ||
|
||||
locationController.text.isBlank! ||
|
||||
aboutController.text.isBlank! ||
|
||||
positionController.text.isBlank! ||
|
||||
trainingScoresController
|
||||
.text.isBlank! ||
|
||||
heightController.text.isBlank! ||
|
||||
weightController.text.isBlank! ||
|
||||
battingAvgController.text.isBlank!) {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Please fill missing details',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
);
|
||||
}
|
||||
// else if (profilePicture == "") {
|
||||
// utils.showToast(
|
||||
// 'Upload edit profile picture!');
|
||||
// }
|
||||
else {
|
||||
print(selectedinterestid.toString());
|
||||
saveEditProfileInd();
|
||||
}
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(60.h),
|
||||
],
|
||||
)
|
||||
])))
|
||||
]);
|
||||
}
|
||||
return Container();
|
||||
})),
|
||||
);
|
||||
|
||||
// FutureBuilder(
|
||||
// future: myfuture,
|
||||
// builder: (ctx, snapshot) {
|
||||
// if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
// return const Center(
|
||||
// child: CircularProgressIndicator(
|
||||
// color: Colors.blue,
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
// if (snapshot.hasError) {
|
||||
// return Center(
|
||||
// child: Text(
|
||||
// '${snapshot.error} occurred',
|
||||
// style: TextStyle(fontSize: 18.spMin),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
// if (snapshot.connectionState == ConnectionState.done &&
|
||||
// snapshot.hasData) {
|
||||
// print("Data fetched-->");
|
||||
// return Stack(children: [
|
||||
// Container(
|
||||
// decoration: const BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage(
|
||||
// "assets/images/png/Ellipse 1496.png"),
|
||||
// fit: BoxFit.fill)),
|
||||
// ),
|
||||
// SingleChildScrollView(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
// child: Column(children: [
|
||||
// sizedBoxHeight(25.h),
|
||||
// Stack(
|
||||
// children: [
|
||||
// profilePicture != "" && isImageAdded
|
||||
// ? ClipOval(
|
||||
// child: SizedBox.fromSize(
|
||||
// size: Size.fromRadius(50.r),
|
||||
// child: Image.file(
|
||||
// File(profilePicture),
|
||||
// fit: BoxFit.cover,
|
||||
// width: double.infinity,
|
||||
// errorBuilder: (BuildContext context,
|
||||
// Object exception,
|
||||
// StackTrace? stackTrace) {
|
||||
// return CircleAvatar(
|
||||
// backgroundImage: const AssetImage(
|
||||
// "assets/images/png/cimg3.png"),
|
||||
// radius: 50.r,
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : getEditProfileIndi?.data?.profilePhoto !=
|
||||
// null &&
|
||||
// getEditProfileIndi!
|
||||
// .data!.profilePhoto!.isNotEmpty
|
||||
// ? Container(
|
||||
// width: 100.w,
|
||||
// height: 100.h,
|
||||
// decoration: ShapeDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: NetworkImage(
|
||||
// getEditProfileIndi!
|
||||
// .data!.profilePhoto!,
|
||||
// ),
|
||||
// fit: BoxFit.cover,
|
||||
// // onError: (error, stackTrace) {
|
||||
// // // Fallback to default image in case of error
|
||||
// // return const AssetImage("assets/images/png/cimg3.png");
|
||||
// // },
|
||||
// ),
|
||||
// shape: const OvalBorder(),
|
||||
// ),
|
||||
// )
|
||||
// : CircleAvatar(
|
||||
// backgroundImage: const AssetImage(
|
||||
// "assets/images/png/cimg3.png"),
|
||||
// radius: 50.r,
|
||||
// ),
|
||||
// Positioned(
|
||||
// bottom: 0,
|
||||
// right: 0,
|
||||
// child: InkWell(
|
||||
// onTap: () {
|
||||
// ImageUploadBottomSheet().showModal(
|
||||
// context,
|
||||
// true,
|
||||
// (result) {
|
||||
// var filenameresult =
|
||||
// extractFileName1(result);
|
||||
|
||||
// profilePicture = result;
|
||||
// isImageAdded = true;
|
||||
// setState(() {});
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// child: Container(
|
||||
// height: 35.h,
|
||||
// width: 35.w,
|
||||
// decoration: const BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: Color(0xFFD90B2E)),
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/cameraicon2.png",
|
||||
// height: 19.h,
|
||||
// width: 19.w,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ))
|
||||
// ],
|
||||
// ),
|
||||
// sizedBoxHeight(15.h),
|
||||
// text16400white("Edit profile picture"),
|
||||
// sizedBoxHeight(20.h),
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// text16400white("Full name"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: fullNameController,
|
||||
// leadingIcon: Container(
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/Frame 24.png",
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// hintText: "Edward Hackett",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("User name"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: userNameController,
|
||||
// leadingIcon: Container(
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/Frame 24.png",
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// hintText: "edward_01",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("Date of birth"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// GestureDetector(
|
||||
// onTap: () =>
|
||||
// datePicker(context, dateController),
|
||||
// child: AbsorbPointer(
|
||||
// child: CustomTextFormField(
|
||||
// leadingIcon: Container(
|
||||
// width: 18.0,
|
||||
// height: 17.0,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/calender.png",
|
||||
// width: 18.0,
|
||||
// height: 17.0,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// hintText: "12-04-2024",
|
||||
// textEditingController: dateController,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("Gender"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomDropDownRadio(
|
||||
// initialSelectedValue: _selectedgenderType,
|
||||
// header: _selectedgenderType ?? "Male",
|
||||
// title: "",
|
||||
// showOtherOption: true,
|
||||
// listData: [
|
||||
// "Male",
|
||||
// "Female",
|
||||
// "Prefer not to say"
|
||||
// ],
|
||||
// onItemSelected: _onItemSelected,
|
||||
// leadingImage: Image.asset(
|
||||
// "assets/images/png/Vector ws.png",
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// ),
|
||||
// ),
|
||||
// sizedBoxHeight(25.h),
|
||||
// Row(
|
||||
// children: [
|
||||
// text16400white("Location"),
|
||||
// sizedBoxWidth(6.w),
|
||||
// Image.asset(
|
||||
// "assets/images/png/octicon_question-24.png",
|
||||
// height: 16.h,
|
||||
// width: 16.w,
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: locationController,
|
||||
// leadingIcon: Container(
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/Group 58645.png",
|
||||
// width: 18.w,
|
||||
// height: 17.h,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// hintText: "Elm street london, United Kingdom",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// Row(
|
||||
// children: [
|
||||
// text16400white("Interests"),
|
||||
// sizedBoxWidth(6.w),
|
||||
// Image.asset(
|
||||
// "assets/images/png/octicon_question-24.png",
|
||||
// height: 16.h,
|
||||
// width: 16.w,
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// sizedBoxHeight(16.h),
|
||||
// // CustomDropDownChexkBox(
|
||||
// // header: _selectedsportType ??
|
||||
// // "Rowing, Rugby, Swimming",
|
||||
// // title: "",
|
||||
// // listData: [
|
||||
// // "Rowing",
|
||||
// // "Cycling",
|
||||
// // "Running",
|
||||
// // "Swimming",
|
||||
// // "Triathlon",
|
||||
// // "Hiking",
|
||||
// // "Football",
|
||||
// // "Rugby"
|
||||
// // ],
|
||||
// // onItemSelected: _onSportSelected,
|
||||
// // leadingImage: Image.asset(
|
||||
// // "assets/images/png/Vector (4).png",
|
||||
// // width: 18.w,
|
||||
// // height: 17.h,
|
||||
// // ),
|
||||
// // showOtherOption: true,
|
||||
// // initiallySelected: _selectedSports,
|
||||
// // ),
|
||||
// // CustomDropDownRadio(
|
||||
// // showOtherOption: true,
|
||||
// // header: _selectedsportType ??
|
||||
// // "Rowing, Rugby, Swimming",
|
||||
// // title: "",
|
||||
// // listData: [
|
||||
// // "Rowing",
|
||||
// // "Cycling",
|
||||
// // "Running",
|
||||
// // "Swimming",
|
||||
// // "Triathlon",
|
||||
// // "Hiking",
|
||||
// // "Football",
|
||||
// // "Rugby"
|
||||
// // ],
|
||||
// // onItemSelected: _onSportSelected,
|
||||
// // leadingImage: Image.asset(
|
||||
// // "assets/images/png/Vector (4).png",
|
||||
// // width: 18.w,
|
||||
// // height: 17.h,
|
||||
// // ),
|
||||
// // ),
|
||||
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("About"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField2(
|
||||
// textEditingController: aboutController,
|
||||
// hintText:
|
||||
// "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
|
||||
// maxlines: 3,
|
||||
// ),
|
||||
// // sizedBoxHeight(20.h),
|
||||
|
||||
// text16400white("Position"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: positionController,
|
||||
// hintText: "Lorem Ipsum",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("Training Scores"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController:
|
||||
// trainingScoresController,
|
||||
// hintText: "50",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("Height"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: heightController,
|
||||
// hintText: "6 feet",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("Weight"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: weightController,
|
||||
// hintText: "70kg",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// text16400white("Batting Average"),
|
||||
// sizedBoxHeight(16.h),
|
||||
// CustomTextFormField(
|
||||
// textEditingController: battingAvgController,
|
||||
// hintText: "372",
|
||||
// ),
|
||||
// sizedBoxHeight(20.h),
|
||||
// sizedBoxHeight(60.h),
|
||||
// CommonBtn(
|
||||
// text: "Save",
|
||||
// onTap: () {
|
||||
// saveEditProfileInd();
|
||||
// },
|
||||
// ),
|
||||
// sizedBoxHeight(60.h),
|
||||
// ],
|
||||
// )
|
||||
// ])))
|
||||
// ]);
|
||||
// }
|
||||
// return Container();
|
||||
// }));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:image_cropper/image_cropper.dart';
|
||||
|
||||
class UserIndiProfileImageController extends GetxController {
|
||||
RxString usserprofilePicPath = "".obs;
|
||||
|
||||
void getImage(ImageSource imgSource) async {
|
||||
final ImagePicker picker = ImagePicker();
|
||||
print('profilePicPath $usserprofilePicPath');
|
||||
final XFile? pickedImg = await picker.pickImage(source: imgSource);
|
||||
if (pickedImg != null) {
|
||||
final CroppedFile? croppedImg = await ImageCropper().cropImage(
|
||||
sourcePath: pickedImg.path,
|
||||
aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
|
||||
compressFormat: ImageCompressFormat.jpg,
|
||||
maxHeight: 512,
|
||||
maxWidth: 512,
|
||||
compressQuality: 100,
|
||||
cropStyle: CropStyle.circle,
|
||||
aspectRatioPresets: [
|
||||
CropAspectRatioPreset.square,
|
||||
],
|
||||
uiSettings: [
|
||||
AndroidUiSettings(
|
||||
toolbarTitle: "Crop Image",
|
||||
toolbarColor: Get.theme.appBarTheme.backgroundColor,
|
||||
backgroundColor: Colors.black,
|
||||
activeControlsWidgetColor: Colors.red,
|
||||
cropFrameColor: Colors.white,
|
||||
cropGridColor: Colors.white, // Ensure this matches the theme
|
||||
cropGridColumnCount: 2, // Add to make the grid lines prominent
|
||||
cropGridRowCount: 2, // Add to make the grid lines prominent
|
||||
lockAspectRatio: true, // Ensure the aspect ratio is locked
|
||||
),
|
||||
IOSUiSettings(
|
||||
title: 'Crop Image',
|
||||
),
|
||||
],
|
||||
);
|
||||
if (croppedImg != null) {
|
||||
usserprofilePicPath.value = croppedImg.path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:image_cropper/image_cropper.dart';
|
||||
|
||||
class UserProfileImageController extends GetxController {
|
||||
RxString usserprofilePicPath = "".obs;
|
||||
|
||||
void getImage(ImageSource imgSource) async {
|
||||
final ImagePicker picker = ImagePicker();
|
||||
print('profilePicPath $usserprofilePicPath');
|
||||
final XFile? pickedImg = await picker.pickImage(source: imgSource);
|
||||
if (pickedImg != null) {
|
||||
final CroppedFile? croppedImg = await ImageCropper().cropImage(
|
||||
sourcePath: pickedImg.path,
|
||||
aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
|
||||
compressFormat: ImageCompressFormat.jpg,
|
||||
maxHeight: 512,
|
||||
maxWidth: 512,
|
||||
compressQuality: 100,
|
||||
cropStyle: CropStyle.circle,
|
||||
aspectRatioPresets: [
|
||||
CropAspectRatioPreset.square,
|
||||
],
|
||||
uiSettings: [
|
||||
AndroidUiSettings(
|
||||
toolbarTitle: "Crop Image",
|
||||
toolbarColor: Get.theme.appBarTheme.backgroundColor,
|
||||
backgroundColor: Colors.black,
|
||||
activeControlsWidgetColor: Colors.red,
|
||||
cropFrameColor: Colors.white,
|
||||
cropGridColor: Colors.white, // Ensure this matches the theme
|
||||
cropGridColumnCount: 2, // Add to make the grid lines prominent
|
||||
cropGridRowCount: 2, // Add to make the grid lines prominent
|
||||
lockAspectRatio: true, // Ensure the aspect ratio is locked
|
||||
),
|
||||
IOSUiSettings(
|
||||
title: 'Crop Image',
|
||||
),
|
||||
],
|
||||
);
|
||||
if (croppedImg != null) {
|
||||
usserprofilePicPath.value = croppedImg.path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
|
||||
|
||||
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/Feed%20Module/Main_Screens/ProfileTab/EditProfile/Model/GetEditProfileBus.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/Model/GetEditProfileIndi.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
GetEditProfileIndi? getEditProfileIndi;
|
||||
GetEditProfileBus? getEditProfileBus;
|
||||
List<String> listofUserInterests = [];
|
||||
|
||||
bool accountvisibility = true;
|
||||
|
||||
class EditProfileApi {
|
||||
EditProfileApi();
|
||||
|
||||
Future<ResponseData<dynamic>> postEditProfileIndividual(var data) async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
final response =
|
||||
await NetworkApiServices().postApi(data, ApiUrls.posteditprofile);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
if (response.data['status'] == 'success') {
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getEditProfileIndividual() async {
|
||||
final response = await NetworkApiServices().getApi(ApiUrls.geteditprofile);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
if (response.data["status"] == "success") {
|
||||
getEditProfileIndi = GetEditProfileIndi.fromJson(response.data);
|
||||
accountvisibility = getEditProfileIndi!.data!.accountVisibility == 1;
|
||||
getUserIntersetFromResponse();
|
||||
}
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.SUCCESS,
|
||||
data: response.data);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
getUserIntersetFromResponse() {
|
||||
for (var interests in getEditProfileIndi!.data!.interest!) {
|
||||
String interestName = interests.name ?? "null";
|
||||
int index = listofUserInterests.indexOf(interestName);
|
||||
if (index != -1) {
|
||||
listofUserInterests[index] = interestName;
|
||||
} else {
|
||||
listofUserInterests.add(interestName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> postEditProfileBusiness(var data) async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
final response = await NetworkApiServices()
|
||||
.postApi(data, ApiUrls.posteditprofilebusiness);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
if (response.data['status'] == 'success') {
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getEditProfileBusiness() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.geteditprofilebusiness,
|
||||
);
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
getEditProfileBus = GetEditProfileBus.fromJson(response.data);
|
||||
|
||||
if (response.data["status"] == "success") {
|
||||
print("Success---->");
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.SUCCESS,
|
||||
data: response.data);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
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/Feed%20Module/Main_Screens/ProfileTab/EditProfile/Model/InterestModel.dart';
|
||||
|
||||
InterestModel? interestlistobj;
|
||||
List<String> listofInterests = [];
|
||||
|
||||
class InterestListApi {
|
||||
InterestListApi();
|
||||
var data = "";
|
||||
Future<ResponseData<dynamic>> getinterestlistApi() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.getinterestlist,
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
interestlistobj = InterestModel.fromJson(responseData);
|
||||
getIntersetFromResponse();
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
getIntersetFromResponse() {
|
||||
for (var interests in interestlistobj!.data!) {
|
||||
listofInterests.add(interests.name ?? "null");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,22 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowers.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Model/followersModel.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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 Followers extends StatefulWidget {
|
||||
const Followers({super.key});
|
||||
@@ -15,196 +26,757 @@ class Followers extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _FollowersState extends State<Followers> {
|
||||
List followersData = [
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 52.png",
|
||||
"title": "Ryan Dorwart",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 48.png",
|
||||
"title": "Ahmad Rhiel Madsen",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 43.png",
|
||||
"title": "Kaylynn Vaccaro",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/img2.png",
|
||||
"title": "Kianna Donin",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/img2.png",
|
||||
"title": "Maria Herwitz",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 43.png",
|
||||
"title": "Ahmad Rhiel Madsen",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 48.png",
|
||||
"title": "Kaylynn Vaccaro",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
];
|
||||
StreamController<FollowersModel> searchcontroller = StreamController();
|
||||
StreamController<GetGuestFollowers> guestsearchcontroller =
|
||||
StreamController();
|
||||
var guestUserid = Get.arguments['UpdataGuestIdfollowers'] ?? '';
|
||||
|
||||
var fromBusFollower = Get.arguments['From'] ?? '';
|
||||
var guestUserBusid = Get.arguments['UpdataGuestBusIdfollowers'] ?? '';
|
||||
var fromMainBusProfile = Get.arguments['From'] ?? '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
var updata = "";
|
||||
if (fromMainBusProfile == 'MainBusProfile') {
|
||||
Profilegetmethod()
|
||||
.getFollowers(updata, streamController: searchcontroller);
|
||||
}
|
||||
|
||||
var guestupdata = "";
|
||||
|
||||
if (fromBusFollower == 'GuestBusFollowers') {
|
||||
GuestProfileApi().getGuestfollowers(guestUserBusid, guestupdata,
|
||||
streamController: guestsearchcontroller);
|
||||
} else {
|
||||
GuestProfileApi().getGuestfollowers(guestUserid, guestupdata,
|
||||
streamController: guestsearchcontroller);
|
||||
}
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
searchcontroller.close();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
int? blockid;
|
||||
int? removeid;
|
||||
|
||||
RemoveUploadata() async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"iam_principal_xid": removeid,
|
||||
};
|
||||
final data = await Profilepostmethod().postRemoveuser(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
print("block done");
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
print("block not done");
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
BlockUploadata() async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"blocked_iam_principal_xid": blockid,
|
||||
};
|
||||
final data = await Profilepostmethod().postBlockuser(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
print("block done");
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
print("block not done");
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Followers",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
), SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
height: 23,
|
||||
width: 23,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Search people",
|
||||
body: fromMainBusProfile == 'MainBusProfile'
|
||||
? Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image:
|
||||
AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: followersData.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
followerWidget(
|
||||
imagePath: followersData[index]["imagePath"],
|
||||
title: followersData[index]["title"],
|
||||
subtitle: followersData[index]["subtitle"]),
|
||||
if (index != followersData.length - 1) commonDivider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
)
|
||||
])
|
||||
]))
|
||||
]));
|
||||
Column(children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
height: 23,
|
||||
width: 23,
|
||||
),
|
||||
),
|
||||
),
|
||||
texttype: TextInputType.text,
|
||||
inputFormatters: [
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
Profilegetmethod().getFollowers(value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
hintText: "Search people",
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
StreamBuilder<FollowersModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return const Center(
|
||||
child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return followersobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
:
|
||||
// ListView.builder(
|
||||
// shrinkWrap: true,
|
||||
// itemCount: followersobj!.data!.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// return Column(
|
||||
// children: [
|
||||
// followerWidget(
|
||||
// imagePath: followersobj?.data?[index]
|
||||
// .follower?.profilePhoto ??
|
||||
// "",
|
||||
// // followersData[index]["imagePath"],
|
||||
// title: followersobj?.data?[index].follower
|
||||
// ?.fullName ??
|
||||
// "",
|
||||
// // followersData[index]["title"],
|
||||
// subtitle: followersobj?.data?[index]
|
||||
// .follower?.userName ??
|
||||
// "",
|
||||
// blockonTap: () {
|
||||
// BlockUploadata(followersobj!
|
||||
// .data![index].follower!.id);
|
||||
// }
|
||||
// // followersData[index]["subtitle"]
|
||||
// ),
|
||||
// if (index != followersobj!.data!.length - 1)
|
||||
// commonDivider(),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
|
||||
ListView.separated(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: followersobj!.data!.length,
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return commonDivider();
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var mainFollowersData =
|
||||
followersobj!.data![index];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
mainFollowersData.follower!
|
||||
.principleTypeXid ==
|
||||
1
|
||||
? Get.toNamed(
|
||||
RouteName
|
||||
.profiletabindguest,
|
||||
arguments: {
|
||||
"FolloweridIndex":
|
||||
mainFollowersData
|
||||
.iamPrincipalXid!,
|
||||
})
|
||||
: Get.toNamed(
|
||||
RouteName
|
||||
.profiletabbusguest,
|
||||
arguments: {
|
||||
"FolloweridIndex":
|
||||
mainFollowersData
|
||||
.iamPrincipalXid!,
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.h,
|
||||
horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
mainFollowersData.follower!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
'assets/images/png/Ellipse 43.png'),
|
||||
radius: 25.r,
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.fullName ==
|
||||
null ||
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.fullName!
|
||||
.isEmpty ==
|
||||
true
|
||||
? text16w400_FCFCFC(
|
||||
"Regroup")
|
||||
: text16w400_FCFCFC(
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.fullName!),
|
||||
sizedBoxHeight(4.h),
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.userName ==
|
||||
null ||
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.userName!
|
||||
.isEmpty ==
|
||||
true
|
||||
? text12w400_FCFCFC_blur(
|
||||
"regroup")
|
||||
: text12w400_FCFCFC_blur(
|
||||
mainFollowersData
|
||||
.follower!
|
||||
.userName!)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor:
|
||||
const Color(
|
||||
0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints
|
||||
.tightFor(
|
||||
width:
|
||||
176.w),
|
||||
offset:
|
||||
const Offset(0, 20),
|
||||
color: const Color(
|
||||
0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder:
|
||||
(BuildContext
|
||||
context) =>
|
||||
<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
// onTap: () {},
|
||||
onTap:
|
||||
() async {
|
||||
setState(
|
||||
() {
|
||||
removeid =
|
||||
followersobj!.data![index].follower!.id ??
|
||||
0;
|
||||
followersobj!.data!.removeWhere((item) =>
|
||||
item.follower!.id ==
|
||||
removeid);
|
||||
RemoveUploadata();
|
||||
});
|
||||
},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Remove user"),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/fluent_delete-28-regular.png",
|
||||
height:
|
||||
15.h,
|
||||
width:
|
||||
15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap:
|
||||
() {},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Message user"),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/fluent_chat-20-regular.png",
|
||||
height:
|
||||
20.h,
|
||||
width:
|
||||
20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap:
|
||||
() async {
|
||||
setState(
|
||||
() {
|
||||
blockid =
|
||||
followersobj!.data![index].follower!.id ??
|
||||
0;
|
||||
followersobj!.data!.removeWhere((item) =>
|
||||
item.follower!.id ==
|
||||
blockid);
|
||||
BlockUploadata();
|
||||
});
|
||||
},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Block user"),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/blockchat.png",
|
||||
height:
|
||||
25.h,
|
||||
width:
|
||||
25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 1000004071.png",
|
||||
height: 22.h,
|
||||
width: 4.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
])
|
||||
])
|
||||
])
|
||||
: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image:
|
||||
AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
height: 23,
|
||||
width: 23,
|
||||
),
|
||||
),
|
||||
),
|
||||
texttype: TextInputType.text,
|
||||
inputFormatters: [
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
if (fromBusFollower == 'GuestBusFollowers') {
|
||||
GuestProfileApi().getGuestfollowers(
|
||||
guestUserBusid, value,
|
||||
streamController: guestsearchcontroller);
|
||||
}
|
||||
GuestProfileApi().getGuestfollowers(
|
||||
guestUserid, value,
|
||||
streamController: guestsearchcontroller);
|
||||
},
|
||||
hintText: "Search people",
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
StreamBuilder<GetGuestFollowers>(
|
||||
stream: guestsearchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return Expanded(
|
||||
child: const Center(
|
||||
child: CircularProgressIndicator()),
|
||||
);
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return getguestfollowersobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: ListView.separated(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount:
|
||||
getguestfollowersobj!.data!.length,
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return commonDivider();
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var guestFollowerData =
|
||||
getguestfollowersobj!.data![index];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
guestFollowerData.follower!
|
||||
.principleTypeXid ==
|
||||
1
|
||||
? Get.toNamed(
|
||||
RouteName
|
||||
.profiletabindguest,
|
||||
arguments: {
|
||||
"FolloweridIndex":
|
||||
guestFollowerData
|
||||
.iamPrincipalXid,
|
||||
})
|
||||
: Get.toNamed(
|
||||
RouteName
|
||||
.profiletabbusguest,
|
||||
arguments: {
|
||||
"FolloweridIndex":
|
||||
guestFollowerData
|
||||
.iamPrincipalXid,
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.h,
|
||||
horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
guestFollowerData.follower!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
'assets/images/png/Ellipse 43.png'),
|
||||
radius: 25.r,
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.fullName ==
|
||||
null ||
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.fullName!
|
||||
.isEmpty ==
|
||||
true
|
||||
? text16w400_FCFCFC(
|
||||
"Regroup")
|
||||
: text16w400_FCFCFC(
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.fullName!),
|
||||
sizedBoxHeight(4.h),
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.userName ==
|
||||
null ||
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.userName!
|
||||
.isEmpty ==
|
||||
true
|
||||
? text12w400_FCFCFC_blur(
|
||||
"regroup")
|
||||
: text12w400_FCFCFC_blur(
|
||||
guestFollowerData
|
||||
.follower!
|
||||
.userName!)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor:
|
||||
const Color(
|
||||
0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints
|
||||
.tightFor(
|
||||
width:
|
||||
176.w),
|
||||
offset:
|
||||
const Offset(0, 20),
|
||||
color: const Color(
|
||||
0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder:
|
||||
(BuildContext
|
||||
context) =>
|
||||
<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
// onTap: () {},
|
||||
onTap:
|
||||
() async {
|
||||
// setState(
|
||||
// () {
|
||||
// removeid =
|
||||
// getguestfollowersobj!.data![index].follower!.id ??
|
||||
// 0;
|
||||
// getguestfollowersobj!.data!.removeWhere((item) =>
|
||||
// item.follower!.id ==
|
||||
// removeid);
|
||||
// RemoveUploadata();
|
||||
// });
|
||||
},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
""),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/fluent_delete-28-regular.png",
|
||||
height:
|
||||
15.h,
|
||||
width:
|
||||
15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap:
|
||||
() {},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Message user"),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/fluent_chat-20-regular.png",
|
||||
height:
|
||||
20.h,
|
||||
width:
|
||||
20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap:
|
||||
() async {
|
||||
// setState(
|
||||
// () {
|
||||
// blockid =
|
||||
// getguestfollowersobj!.data![index].follower!.id ??
|
||||
// 0;
|
||||
// getguestfollowersobj!.data!.removeWhere((item) =>
|
||||
// item.follower!.id ==
|
||||
// blockid);
|
||||
// BlockUploadata();
|
||||
// });
|
||||
},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Block user"),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/blockchat.png",
|
||||
height:
|
||||
25.h,
|
||||
width:
|
||||
25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 1000004071.png",
|
||||
height: 22.h,
|
||||
width: 4.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
])
|
||||
])
|
||||
]));
|
||||
}
|
||||
|
||||
Widget followerWidget({
|
||||
required String imagePath,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
|
||||
child: Row(
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundImage: AssetImage(imagePath),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
sizedBoxHeight(4.h),
|
||||
text12w400_FCFCFC_blur(subtitle)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 20),
|
||||
color: Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white("Remove user"),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/fluent_delete-28-regular.png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white("Message user"),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white("Block user"),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 1000004071.png",
|
||||
height: 22.h,
|
||||
width: 4.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowers.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowing.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Model/followingModel.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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 Following extends StatefulWidget {
|
||||
const Following({super.key});
|
||||
@@ -15,178 +27,642 @@ class Following extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _FollowingState extends State<Following> {
|
||||
List followingData = [
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 52.png",
|
||||
"title": "Ryan Dorwart",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 48.png",
|
||||
"title": "Ahmad Rhiel Madsen",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 43.png",
|
||||
"title": "Kaylynn Vaccaro",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/img2.png",
|
||||
"title": "Kianna Donin",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/img2.png",
|
||||
"title": "Maria Herwitz",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 43.png",
|
||||
"title": "Ahmad Rhiel Madsen",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 48.png",
|
||||
"title": "Kaylynn Vaccaro",
|
||||
"subtitle": "Lorem ipsum dummy text",
|
||||
},
|
||||
];
|
||||
StreamController<FollowingModel> searchcontroller = StreamController();
|
||||
StreamController<GetGuestFollowing> guestsearchcontroller =
|
||||
StreamController();
|
||||
|
||||
var guestUserid = Get.arguments['UpdataGuestIdfollowing'] ?? '';
|
||||
|
||||
var fromBusFollowing = Get.arguments['From'] ?? '';
|
||||
|
||||
var guestBusUserid = Get.arguments['UpdataGuestBusIdfollowing'] ?? '';
|
||||
|
||||
var fromMainBusProfile = Get.arguments['From'] ?? '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
var updata = "";
|
||||
if (fromMainBusProfile == 'MainBusProfile') {
|
||||
Profilegetmethod()
|
||||
.getFollowing(updata, streamController: searchcontroller);
|
||||
}
|
||||
|
||||
var guestupdata = "";
|
||||
if (fromBusFollowing == 'GuestBusFollowing') {
|
||||
GuestProfileApi().getGuestfollowing(guestBusUserid, guestupdata,
|
||||
streamController: guestsearchcontroller);
|
||||
} else {
|
||||
GuestProfileApi().getGuestfollowing(guestUserid, guestupdata,
|
||||
streamController: guestsearchcontroller);
|
||||
}
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
searchcontroller.close();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
Uploadata() async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"following_iam_principal_xid": unfollowid,
|
||||
};
|
||||
final data = await Profilepostmethod().postunfollowuser(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
print("unfollow done");
|
||||
// setState(() {
|
||||
// // Assuming followingobj is a list of items, remove the item with matching user ID
|
||||
// followingobj!.data!.removeWhere((item) => item.following!.id == userid);
|
||||
// });
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
print("unfollow not done");
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
int? unfollowid;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Following",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
), SingleChildScrollView(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Following",
|
||||
),
|
||||
body: fromMainBusProfile == 'MainBusProfile'
|
||||
? Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
height: 23,
|
||||
width: 23,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Search people",
|
||||
texttype: TextInputType.text,
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
// Onboard().postGroupsearch({"search": value},
|
||||
// streamController: searchcontroller);
|
||||
// searchGroups(value!);
|
||||
Profilegetmethod().getFollowing(value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
),
|
||||
),
|
||||
hintText: "Search people",
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: followingData.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
followingWidget(
|
||||
imagePath: followingData[index]["imagePath"],
|
||||
title: followingData[index]["title"],
|
||||
subtitle: followingData[index]["subtitle"]),
|
||||
if (index != followingData.length - 1) commonDivider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
)
|
||||
sizedBoxHeight(25.h),
|
||||
StreamBuilder<FollowingModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return followingobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: ListView.separated(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: followingobj!.data!.length,
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return commonDivider();
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var mainFollowing =
|
||||
followingobj!.data![index];
|
||||
return
|
||||
// Column(
|
||||
// children: [
|
||||
// Followinglist(
|
||||
// imagePath: followingobj?.data?[index]
|
||||
// .following?.profilePhoto ??
|
||||
// '',
|
||||
// title: followingobj!
|
||||
// .data?[index].following?.fullName ??
|
||||
// '',
|
||||
// subtitle: followingobj!
|
||||
// .data?[index].following?.userName ??
|
||||
// '',
|
||||
// unfollowontap: (id) => Uploadata(id),
|
||||
// unfollowindex: followingobj!
|
||||
// .data![index].following!.id!,
|
||||
// ),
|
||||
// if (index != followingobj!.data!.length - 1)
|
||||
// commonDivider(),
|
||||
// ],
|
||||
// );
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
mainFollowing.following!
|
||||
.principleTypeXid ==
|
||||
1
|
||||
? Get.toNamed(
|
||||
RouteName.profiletabindguest,
|
||||
arguments: {
|
||||
"FollowingidIndex": mainFollowing
|
||||
.followingIamPrincipalXid!,
|
||||
})
|
||||
: Get.toNamed(
|
||||
RouteName.profiletabbusguest,
|
||||
arguments: {
|
||||
"FollowingidIndex": mainFollowing
|
||||
.followingIamPrincipalXid!,
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.h, horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
mainFollowing.following!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
mainFollowing.following!
|
||||
.profilePhoto!.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
'assets/images/png/Ellipse 43.png'),
|
||||
radius: 25.r,
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
mainFollowing
|
||||
.following!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
mainFollowing.following!
|
||||
.fullName ==
|
||||
null ||
|
||||
mainFollowing
|
||||
.following!
|
||||
.fullName!
|
||||
.isEmpty
|
||||
? text16w400_FCFCFC(
|
||||
"Regroup")
|
||||
: text16w400_FCFCFC(
|
||||
mainFollowing
|
||||
.following!
|
||||
.fullName!),
|
||||
sizedBoxHeight(4.h),
|
||||
mainFollowing.following!
|
||||
.userName ==
|
||||
null ||
|
||||
mainFollowing
|
||||
.following!
|
||||
.userName!
|
||||
.isEmpty
|
||||
? text12w400_FCFCFC_blur(
|
||||
"regroup")
|
||||
: text12w400_FCFCFC_blur(
|
||||
mainFollowing
|
||||
.following!
|
||||
.userName!)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor:
|
||||
const Color(0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints.tightFor(
|
||||
width: 176.w),
|
||||
offset: const Offset(0, 20),
|
||||
color:
|
||||
const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext
|
||||
context) =>
|
||||
<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
unfollowid =
|
||||
mainFollowing
|
||||
.following!
|
||||
.id ??
|
||||
0;
|
||||
// followingobj!.data!.removeAt(index);
|
||||
followingobj!
|
||||
.data!
|
||||
.removeWhere((item) =>
|
||||
item.following!
|
||||
.id ==
|
||||
unfollowid);
|
||||
Uploadata();
|
||||
});
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Unfollow user"),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Black1323e.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets
|
||||
.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Message user"),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/fluent_chat-20-22.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 1000004071.png",
|
||||
height: 22.h,
|
||||
width: 4.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
])
|
||||
]))
|
||||
])
|
||||
]))
|
||||
]));
|
||||
: Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image:
|
||||
AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
height: 23,
|
||||
width: 23,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Search people",
|
||||
texttype: TextInputType.text,
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
// GuestProfileApi().getGuestfollowing(guestUserid, value,
|
||||
// streamController: guestsearchcontroller);
|
||||
if (fromBusFollowing == 'GuestBusFollowing') {
|
||||
GuestProfileApi().getGuestfollowing(
|
||||
guestBusUserid, value,
|
||||
streamController: guestsearchcontroller);
|
||||
} else {
|
||||
GuestProfileApi().getGuestfollowing(
|
||||
guestUserid, value,
|
||||
streamController: guestsearchcontroller);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
StreamBuilder<GetGuestFollowing>(
|
||||
stream: guestsearchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return const Center(
|
||||
child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return getguestfollowingobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: ListView.separated(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount:
|
||||
getguestfollowingobj!.data!.length,
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return commonDivider();
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var guestFollowing =
|
||||
getguestfollowingobj!.data![index];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
guestFollowing.following!
|
||||
.principleTypeXid ==
|
||||
1
|
||||
? Get.toNamed(
|
||||
RouteName
|
||||
.profiletabindguest,
|
||||
arguments: {
|
||||
"FollowingidIndex":
|
||||
guestFollowing
|
||||
.followingIamPrincipalXid!,
|
||||
})
|
||||
: Get.toNamed(
|
||||
RouteName
|
||||
.profiletabbusguest,
|
||||
arguments: {
|
||||
"FollowingidIndex":
|
||||
guestFollowing
|
||||
.followingIamPrincipalXid!,
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.h,
|
||||
horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
guestFollowing.following!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
guestFollowing
|
||||
.following!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
'assets/images/png/Ellipse 43.png'),
|
||||
radius: 25.r,
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
guestFollowing
|
||||
.following!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
guestFollowing.following!
|
||||
.fullName ==
|
||||
null ||
|
||||
guestFollowing
|
||||
.following!
|
||||
.fullName!
|
||||
.isEmpty
|
||||
? text16w400_FCFCFC(
|
||||
"Regroup")
|
||||
: text16w400_FCFCFC(
|
||||
guestFollowing
|
||||
.following!
|
||||
.fullName!),
|
||||
sizedBoxHeight(4.h),
|
||||
guestFollowing.following!
|
||||
.userName ==
|
||||
null ||
|
||||
guestFollowing
|
||||
.following!
|
||||
.userName!
|
||||
.isEmpty
|
||||
? text12w400_FCFCFC_blur(
|
||||
"regroup")
|
||||
: text12w400_FCFCFC_blur(
|
||||
guestFollowing
|
||||
.following!
|
||||
.userName!)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor:
|
||||
const Color(
|
||||
0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints
|
||||
.tightFor(
|
||||
width:
|
||||
176.w),
|
||||
offset:
|
||||
const Offset(0, 20),
|
||||
color: const Color(
|
||||
0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder:
|
||||
(BuildContext
|
||||
context) =>
|
||||
<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap:
|
||||
() async {
|
||||
// setState(
|
||||
// () {
|
||||
// unfollowid =
|
||||
// getguestfollowingobj!.data![index].following!.id ??
|
||||
// 0;
|
||||
// // followingobj!.data!.removeAt(index);
|
||||
// getguestfollowingobj!.data!.removeWhere((item) =>
|
||||
// item.following!.id ==
|
||||
// unfollowid);
|
||||
// Uploadata();
|
||||
// });
|
||||
},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
""),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/Black1323e.png",
|
||||
height:
|
||||
20.h,
|
||||
width:
|
||||
20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap:
|
||||
() {},
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal:
|
||||
12.w),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
text14400white(
|
||||
"Message user"),
|
||||
const Spacer(),
|
||||
Image
|
||||
.asset(
|
||||
"assets/images/png/fluent_chat-20-22.png",
|
||||
height:
|
||||
20.h,
|
||||
width:
|
||||
20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 1000004071.png",
|
||||
height: 22.h,
|
||||
width: 4.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
])
|
||||
]))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget followingWidget({
|
||||
required String imagePath,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
|
||||
child: Row(
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundImage: AssetImage(imagePath),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
sizedBoxHeight(4.h),
|
||||
text12w400_FCFCFC_blur(subtitle)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 20),
|
||||
color: Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white("Unfollow user"),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Black1323e.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text14400white("Message user"),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/fluent_chat-20-22.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 1000004071.png",
|
||||
height: 22.h,
|
||||
width: 4.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||