Compare commits
306 Commits
bfeddd6bc7
...
bugs26aug
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb271e64c4 | ||
|
|
6eba901db1 | ||
|
|
333a8df39a | ||
|
|
ee8c37a4dc | ||
|
|
d39c4ad5d8 | ||
|
|
42069126a3 | ||
|
|
0efd230d10 | ||
|
|
4f9d5b9abf | ||
|
|
d0468bc718 | ||
|
|
32bce97bed | ||
|
|
f250c6d039 | ||
|
|
91de373f35 | ||
|
|
f81db0d848 | ||
|
|
1166d97dbc | ||
|
|
e5472c7414 | ||
|
|
ea458d58b2 | ||
|
|
01eec8a1c5 | ||
|
|
51f601d982 | ||
|
|
87428c51f1 | ||
|
|
ba2c222c70 | ||
|
|
65a87af3e3 | ||
|
|
bd9c8b9d0d | ||
|
|
ce25bd9de7 | ||
|
|
dff6fae483 | ||
|
|
0f3b80ce1d | ||
|
|
e62f92da75 | ||
|
|
bf81504b8b | ||
|
|
111bce4390 | ||
|
|
1dab461497 | ||
|
|
c53ddbc357 | ||
|
|
8b05256bad | ||
|
|
175d366c35 | ||
|
|
c2b9a0872a | ||
|
|
bde57c0bcc | ||
|
|
2c9ce5ea44 | ||
|
|
e84bd1b5da | ||
|
|
3c99a41234 | ||
|
|
8936ea2bcf | ||
|
|
208f000a26 | ||
|
|
4a923fb7a7 | ||
|
|
4e49d433af | ||
|
|
2ffa30de18 | ||
|
|
25a7e5f060 | ||
|
|
474a3c5e14 | ||
|
|
77b61d229a | ||
|
|
3977b3df53 | ||
|
|
0be6eda607 | ||
|
|
5c6e48e372 | ||
|
|
2d0ca49d1b | ||
|
|
c07af14fed | ||
|
|
13ea470b0d | ||
|
|
7e01ed10ef | ||
|
|
ef0c761b95 | ||
|
|
c52246f3b9 | ||
|
|
f161c8115c | ||
|
|
f3512a4f28 | ||
|
|
37f36f2e6b | ||
|
|
688d006382 | ||
|
|
3f0423edef | ||
|
|
d5baaa0e70 | ||
|
|
d297bcde84 | ||
|
|
049fd76734 | ||
|
|
9d98c57bbd | ||
|
|
6765f8db88 | ||
|
|
67486b2d2e | ||
|
|
e295051a6e | ||
|
|
533a908441 | ||
|
|
0d3b3b2fb0 | ||
|
|
ace7d84b29 | ||
|
|
34209c85d4 | ||
|
|
f402b65210 | ||
|
|
16d536307b | ||
|
|
73188fa3da | ||
|
|
e910046501 | ||
|
|
d365d73931 | ||
|
|
6108ab0d65 | ||
|
|
01a8e0d908 | ||
|
|
1128714847 | ||
|
|
fd48696453 | ||
|
|
1828337698 | ||
|
|
c3d9ea58bd | ||
|
|
3428ac17f7 | ||
|
|
f57bb8aecb | ||
|
|
8ec55f95e1 | ||
|
|
1a21624d72 | ||
|
|
3d68e0a4ed | ||
|
|
a84b1b72a5 | ||
|
|
07e48c9edd | ||
|
|
0ea40850e8 | ||
|
|
65725e0271 | ||
|
|
bbb7fafaf5 | ||
|
|
f19a19f19f | ||
|
|
dde275ecdc | ||
|
|
ea567d8670 | ||
|
|
39cbcb4845 | ||
|
|
c8a8a73070 | ||
|
|
8e076269e0 | ||
|
|
28423220c5 | ||
|
|
b97ee0c77c | ||
|
|
77e2d5abbb | ||
|
|
0fcbff1c52 | ||
|
|
0c3c1d1449 | ||
|
|
ea5c5d1b72 | ||
|
|
e176553b71 | ||
|
|
51d3aa44ec | ||
|
|
d6f70f34d0 | ||
|
|
ce2f658196 | ||
|
|
083a6a0ff3 | ||
|
|
a338f3f972 | ||
|
|
a1b2021b77 | ||
|
|
89e98279ac | ||
|
|
bda76db16f | ||
|
|
96269b8a36 | ||
|
|
ef5472cf64 | ||
|
|
f6cdfcd051 | ||
|
|
a94680b572 | ||
|
|
13d1b06449 | ||
|
|
1f41b5ab3a | ||
|
|
0a2ffa53df | ||
|
|
6aea13e959 | ||
|
|
f260eaaad0 | ||
|
|
c94a405623 | ||
|
|
255faca290 | ||
|
|
8f6682f969 | ||
|
|
b2f48c3ea8 | ||
|
|
bd9aedb5de | ||
|
|
81dc824c49 | ||
|
|
574b7c22b8 | ||
|
|
ff08056369 | ||
|
|
d9a21f280f | ||
|
|
5b47ae3105 | ||
|
|
7db4700353 | ||
|
|
3e5e8a472d | ||
|
|
27acf919db | ||
|
|
48a15229eb | ||
|
|
b81fcb6b75 | ||
|
|
3e30fd545a | ||
|
|
eda3416d4b | ||
|
|
9d436c2a74 | ||
|
|
c03cfe1dbc | ||
|
|
2863f827a6 | ||
|
|
63bcd725e8 | ||
|
|
044f216900 | ||
|
|
1a03b61b6f | ||
|
|
838142308d | ||
|
|
2a7c866639 | ||
|
|
b2b2b1d6eb | ||
|
|
18886dc6c0 | ||
|
|
0ce1719179 | ||
|
|
ac60eaecff | ||
|
|
857721abf9 | ||
|
|
a5e52eae4f | ||
|
|
01cb284b43 | ||
|
|
dad5d8d9cf | ||
|
|
93e07b3cc0 | ||
|
|
053048de06 | ||
|
|
dd47ae3508 | ||
|
|
a556d104c7 | ||
|
|
2b9755c4b9 | ||
|
|
716c2c219b | ||
|
|
b9c929c7f0 | ||
|
|
e77c766fa0 | ||
|
|
30f05268e5 | ||
|
|
1fd6475a9d | ||
|
|
8f045d0d22 | ||
|
|
5a08469415 | ||
|
|
67bd9b0a6a | ||
|
|
26e997447c | ||
|
|
2dcae88e7e | ||
|
|
00c9683f10 | ||
|
|
1f33ab55bc | ||
|
|
9bd0f3affc | ||
|
|
84239f52ba | ||
|
|
d9d04996b5 | ||
|
|
76c29fafcd | ||
|
|
55f2b4673a | ||
|
|
e62c3dc8c1 | ||
|
|
15a991687d | ||
|
|
b470d63819 | ||
|
|
5d16e5b8b8 | ||
|
|
3c4c2fce6c | ||
|
|
a58f91ba99 | ||
|
|
e0759e5df7 | ||
|
|
6ecc937d09 | ||
|
|
728d8676f7 | ||
|
|
8714ffeb6d | ||
|
|
5b92d23bcb | ||
|
|
97e3928963 | ||
|
|
f45aeebfd8 | ||
|
|
875fa240fb | ||
|
|
9eaf857dcf | ||
|
|
092e8b77ed | ||
|
|
0e21f2d37a | ||
|
|
295b74b6e2 | ||
|
|
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/5e8479cea3a89ec07bf1089a2b0efeec.png
Normal file
|
After Width: | Height: | Size: 10 MiB |
BIN
assets/images/png/Black33.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/images/png/Connected world-amico 1.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
assets/images/png/Ellipse 37 (1).png
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
assets/images/png/Group 1000004149.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/images/png/Group 1000004385.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
assets/images/png/Group 1000004420.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
assets/images/png/LightGray.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/png/LightGray22.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/png/Organizing projects-pana 1.png
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
assets/images/png/PinnedIcon.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/images/png/Rectangle 49 (1).png
Normal file
|
After Width: | Height: | Size: 3.8 MiB |
BIN
assets/images/png/Vector 8.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
assets/images/png/add 1.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
assets/images/png/background.png
Normal file
|
After Width: | Height: | Size: 4.0 MiB |
BIN
assets/images/png/correct 1.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/images/png/downarrow.png
Normal file
|
After Width: | Height: | Size: 450 B |
BIN
assets/images/png/edit 1.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/images/png/ion_add.png
Normal file
|
After Width: | Height: | Size: 226 B |
BIN
assets/images/png/leave group.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/images/png/postSaved.png
Normal file
|
After Width: | Height: | Size: 218 B |
BIN
assets/images/png/sidemenu/price-tag 1.png
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
assets/images/png/sidemenu/rightarrow.png
Normal file
|
After Width: | Height: | Size: 215 B |
BIN
assets/images/png/uparrow.png
Normal file
|
After Width: | Height: | Size: 413 B |
BIN
assets/images/png/x-circle.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
9
assets/images/svg/add 1.svg
Normal file
|
After Width: | Height: | Size: 23 KiB |
1
devtools_options.yaml
Normal file
@@ -0,0 +1 @@
|
||||
extensions:
|
||||
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"}}}}}}
|
||||
155
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,49 @@ 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.29.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.29.0):
|
||||
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||
- Flutter (1.0.0)
|
||||
- flutter_facebook_auth (6.0.4):
|
||||
- FBSDKLoginKit (~> 16.3.1)
|
||||
- Flutter
|
||||
- flutter_keyboard_visibility (0.0.1):
|
||||
- Flutter
|
||||
- fluttertoast (0.0.2):
|
||||
- Flutter
|
||||
- Toast
|
||||
@@ -47,11 +92,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.5.0):
|
||||
- GTMSessionFetcher/Full (= 3.5.0)
|
||||
- GTMSessionFetcher/Core (3.5.0)
|
||||
- GTMSessionFetcher/Full (3.5.0):
|
||||
- GTMSessionFetcher/Core
|
||||
- image_cropper (0.0.4):
|
||||
- Flutter
|
||||
- TOCropViewController (~> 2.7.3)
|
||||
@@ -64,12 +149,16 @@ PODS:
|
||||
- FlutterMacOS
|
||||
- permission_handler_apple (9.3.0):
|
||||
- Flutter
|
||||
- SDWebImage (5.19.2):
|
||||
- SDWebImage/Core (= 5.19.2)
|
||||
- SDWebImage/Core (5.19.2)
|
||||
- PromisesObjC (2.4.0)
|
||||
- RecaptchaInterop (100.0.0)
|
||||
- SDWebImage (5.19.4):
|
||||
- SDWebImage/Core (= 5.19.4)
|
||||
- SDWebImage/Core (5.19.4)
|
||||
- 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 +167,44 @@ 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`)
|
||||
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/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 +217,24 @@ 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"
|
||||
flutter_keyboard_visibility:
|
||||
:path: ".symlinks/plugins/flutter_keyboard_visibility/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 +247,49 @@ 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: 6a1757cfd4067d8e00fccd14fcc1b8fd78cfac07
|
||||
FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb
|
||||
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
||||
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_facebook_auth: c8700ab1770f3d8e5e7456220e4f3bbcdb831454
|
||||
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
||||
fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db
|
||||
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
|
||||
google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458
|
||||
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
|
||||
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
|
||||
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
|
||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
|
||||
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
|
||||
image_cropper: 2c150b3d63f4feaad31054d20381ddac0a460e63
|
||||
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
|
||||
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
|
||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
|
||||
SDWebImage: 066c47b573f408f18caa467d71deace7c0f8280d
|
||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
||||
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
2105BA461347F33698D3FD7B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC7FC30109CCD5376F6BFA0F /* Pods_Runner.framework */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
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 */; };
|
||||
CA23128F3D22F12344F34510 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E6D63EEFD9353D7ADC2CB4D /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -30,15 +31,17 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
01A8D59FC22474B9D47BC82F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
2E6D63EEFD9353D7ADC2CB4D /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
355191DC29CD1712AAFF95EF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; 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>"; };
|
||||
4145FC1F69369273F821F424 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.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>"; };
|
||||
7A2724068B1177B4942EB08B /* 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>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
8DA153E7FEAC51D97681DB93 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -46,7 +49,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>"; };
|
||||
DC7FC30109CCD5376F6BFA0F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -54,7 +57,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2105BA461347F33698D3FD7B /* Pods_Runner.framework in Frameworks */,
|
||||
CA23128F3D22F12344F34510 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -64,9 +67,9 @@
|
||||
01448FBCAC46C16EC8BC1181 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8DA153E7FEAC51D97681DB93 /* Pods-Runner.debug.xcconfig */,
|
||||
3E093EFD052120EBB5EFE242 /* Pods-Runner.release.xcconfig */,
|
||||
01A8D59FC22474B9D47BC82F /* Pods-Runner.profile.xcconfig */,
|
||||
355191DC29CD1712AAFF95EF /* Pods-Runner.debug.xcconfig */,
|
||||
7A2724068B1177B4942EB08B /* Pods-Runner.release.xcconfig */,
|
||||
4145FC1F69369273F821F424 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -89,7 +92,8 @@
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
01448FBCAC46C16EC8BC1181 /* Pods */,
|
||||
DE8E73CF7AB07643531FB23E /* Frameworks */,
|
||||
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */,
|
||||
F4C62E65C792A2B03ABD303E /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -104,6 +108,7 @@
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5210D9302C4006FC0040021E /* Runner.entitlements */,
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
@@ -116,10 +121,10 @@
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DE8E73CF7AB07643531FB23E /* Frameworks */ = {
|
||||
F4C62E65C792A2B03ABD303E /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DC7FC30109CCD5376F6BFA0F /* Pods_Runner.framework */,
|
||||
2E6D63EEFD9353D7ADC2CB4D /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@@ -131,15 +136,15 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
2427B225240D99C3274E4E9F /* [CP] Check Pods Manifest.lock */,
|
||||
30BAD3BCCCA511EDA8157430 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
193E6ECF33FCE0798A403773 /* [CP] Embed Pods Frameworks */,
|
||||
A1A5C179E86574032091061E /* [CP] Copy Pods Resources */,
|
||||
4343791398B77D1A11F261A2 /* [CP] Embed Pods Frameworks */,
|
||||
57523D9CD6B060C3BF6C72B7 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -156,7 +161,7 @@
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1430;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
@@ -192,30 +197,14 @@
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
9FD3FE5A0194B5B2D8202DCF /* GoogleService-Info.plist in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
193E6ECF33FCE0798A403773 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
2427B225240D99C3274E4E9F /* [CP] Check Pods Manifest.lock */ = {
|
||||
30BAD3BCCCA511EDA8157430 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -253,22 +242,24 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
4343791398B77D1A11F261A2 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A1A5C179E86574032091061E /* [CP] Copy Pods Resources */ = {
|
||||
57523D9CD6B060C3BF6C72B7 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -285,6 +276,21 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -375,6 +381,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 +515,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 +543,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>
|
||||
|
||||
18
lib/Common/ApiRepositoy.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
// import 'package:get/get.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:async/async.dart';
|
||||
// import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/ViewModel/CommentsRepository.dart';
|
||||
// class ApiRepository extends GetxController {
|
||||
// Future<List<dynamic>> fetchMultipleAPIs() async {
|
||||
// FutureGroup futureGroup = FutureGroup();
|
||||
// // PostDetail
|
||||
// futureGroup.add(CommentsRepository().getAllComments());
|
||||
|
||||
|
||||
// // Close the group (no more futures can be added)
|
||||
// futureGroup.close();
|
||||
|
||||
// // Wait for all futures to complete
|
||||
// return await futureGroup.future;
|
||||
// }
|
||||
// }
|
||||
@@ -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(
|
||||
|
||||
@@ -23,7 +23,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 +61,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,
|
||||
@@ -82,10 +82,10 @@ Widget commonGlassContainerblue({
|
||||
|
||||
Widget commonGlassUIBlue({
|
||||
required double width,
|
||||
required double height,
|
||||
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 +99,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,
|
||||
@@ -113,7 +113,7 @@ Widget commonGlassUIBlue({
|
||||
|
||||
Widget commonGlassUI({
|
||||
required double width,
|
||||
required double height,
|
||||
required double? height,
|
||||
// required double border,
|
||||
double mainOpacity = 1,
|
||||
double opacity1 = 0.04,
|
||||
@@ -127,13 +127,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 +144,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';
|
||||
@@ -23,7 +22,7 @@ class TextInputField extends StatefulWidget {
|
||||
class _TextInputFieldState extends State<TextInputField> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: 46.h,
|
||||
child: TextFormField(
|
||||
@@ -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,12 @@ 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 +219,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 +248,8 @@ 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 +266,81 @@ 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: [
|
||||
containerImages.length > maxImagesToShow
|
||||
? Container(
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
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' : '',
|
||||
number,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 8,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: SizedBox(
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
Positioned(
|
||||
left: containerImages.length > maxImagesToShow ? 22.w : 0.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 +360,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 +388,26 @@ 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,
|
||||
|
||||
36
lib/Common/ConvertServerDateToUserDate.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
class ConvertServerDateToUserDate {
|
||||
|
||||
convertServerDateToReadableFormate(String? createAtstring) {
|
||||
|
||||
if (createAtstring == null || createAtstring.isEmpty) {
|
||||
createAtstring = DateTime.now().toIso8601String();
|
||||
}
|
||||
String? timeAgo;
|
||||
|
||||
try {
|
||||
DateTime postDateTime = DateTime.parse(createAtstring);
|
||||
DateTime now = DateTime.now();
|
||||
Duration difference = now.difference(postDateTime);
|
||||
if (difference.inDays > 365) {
|
||||
timeAgo = '${(difference.inDays / 365).floor()} years ago';
|
||||
} else if (difference.inDays > 30) {
|
||||
timeAgo = '${(difference.inDays / 30).floor()} months ago';
|
||||
} else if (difference.inDays > 7) {
|
||||
timeAgo = '${(difference.inDays / 7).floor()} weeks ago';
|
||||
} else if (difference.inDays > 0) {
|
||||
timeAgo = '${difference.inDays} days ago';
|
||||
} else if (difference.inHours > 0) {
|
||||
timeAgo = '${difference.inHours} hours ago';
|
||||
} else if (difference.inMinutes > 0) {
|
||||
timeAgo = '${difference.inMinutes} minutes ago';
|
||||
} else {
|
||||
timeAgo = '${difference.inSeconds} seconds ago';
|
||||
}
|
||||
print("Time ago: $timeAgo");
|
||||
return timeAgo;
|
||||
} catch (e) {
|
||||
print("Error parsing date: $e");
|
||||
String timeAgo = 'Unknown';
|
||||
}
|
||||
}
|
||||
}
|
||||
12
lib/Common/ReactionIcons.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ReactionActions extends StatelessWidget {
|
||||
const ReactionActions({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Placeholder();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
201
lib/Common/api_urls.dart
Normal file
@@ -0,0 +1,201 @@
|
||||
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 getmycommunity = "${baseUrl}fetch-my-communities";
|
||||
|
||||
static const getcommunitydetail = "${baseUrl}fetch-community-all-details";
|
||||
|
||||
static const getComPostdetail = "${baseUrl}fetch-community-all-posts";
|
||||
|
||||
static const postleavecommunity = "${baseUrl}leave-community";
|
||||
|
||||
static const postmutenotification = "${baseUrl}mute-unmute-community";
|
||||
|
||||
|
||||
|
||||
|
||||
static const getrequestedcommunity =
|
||||
"${baseUrl}fetch-joining-request-for-community";
|
||||
|
||||
static const getInvitecommunity = "${baseUrl}fetch-all-invite";
|
||||
|
||||
static const postnewinterest = "${baseUrl}store-tags";
|
||||
|
||||
static const postacceptreject = "${baseUrl}accept-reject-tag";
|
||||
|
||||
|
||||
static const getinterests = "${baseUrl}list-of-tags-and-requested-tags";
|
||||
|
||||
|
||||
static const postcancelrequest = "${baseUrl}cancel-request-of-community";
|
||||
|
||||
static const postacceptinvite = "${baseUrl}accept-invite-to-join-community";
|
||||
|
||||
static const postrejectinvite = "${baseUrl}reject-invite-to-join-community";
|
||||
|
||||
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";
|
||||
static const getlatestpost = "${baseUrl}fetch-latest-post";
|
||||
static const getpopularpost = "${baseUrl}fetch-popular-post";
|
||||
|
||||
static const getfeedpost = "${baseUrl}fetch-post";
|
||||
static const tagcommunityuser = "${baseUrl}fetch-communities-tags-to-pin";
|
||||
|
||||
// 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";
|
||||
|
||||
//community
|
||||
static const getpostcommunitylist = "${baseUrl}fetch-communities-with-tags";
|
||||
static const getpopulartagscommunity = "${baseUrl}fetch-popular-tags";
|
||||
|
||||
static const postnewtags = "${baseUrl}store-tags";
|
||||
static const postupload = "${baseUrl}store-post";
|
||||
static const postlike = "${baseUrl}fetch-like-list";
|
||||
|
||||
static const getuserpinlist = "${baseUrl}fetch-pinned-detail";
|
||||
|
||||
static const postusertag = "${baseUrl}pin-unpin";
|
||||
|
||||
//comments
|
||||
static const getComments = "${baseUrl}fetch-comment-with-replied-comment";
|
||||
static const storeComments = "${baseUrl}store-comment";
|
||||
static const storeRepliesOnComments = "${baseUrl}reply-on-comment";
|
||||
static const deleteComments = "${baseUrl}delete-comment";
|
||||
static const deleteRepliesComments = "${baseUrl}delete-reply-on-comment";
|
||||
|
||||
static const getLikeicons = "${baseUrl}fetch-like-icons";
|
||||
|
||||
static const postLike = "${baseUrl}like-post";
|
||||
|
||||
static const getTagsdetails = "${baseUrl}fetch-post-by-tag";
|
||||
|
||||
static const postusersave = "${baseUrl}save-post";
|
||||
static const getpostdetail = "${baseUrl}fetch-single-post";
|
||||
|
||||
static const getpopularTagsdetails = "${baseUrl}fetch-popular-post";
|
||||
|
||||
static const postcreatecommunity = "${baseUrl}create-community";
|
||||
|
||||
static const getcommunityaddgroups = "${baseUrl}fetch-groups-to-add";
|
||||
|
||||
static const getcommunitygroups = "${baseUrl}fetch-community-all-groups";
|
||||
|
||||
static const getcommunitymembers = "${baseUrl}fetch-community-all-members";
|
||||
|
||||
static const geteditcommunity = "${baseUrl}edit-community";
|
||||
|
||||
static const posteditcommunity = "${baseUrl}update-community";
|
||||
|
||||
static const getactivitieslist = "${baseUrl}get_activity";
|
||||
|
||||
static const getcommunitymanagegroups = "${baseUrl}fetch-community-all-groups-list";
|
||||
|
||||
static const postremovegroupscommunity = "${baseUrl}remove-groups-from-community";
|
||||
|
||||
static const postmanageaddgroupscommunity = "${baseUrl}add-groups-in-community";
|
||||
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Main_Screens/CalenderTab/CalenderTab.dart';
|
||||
import 'package:regroup/Main_Screens/Chats/View/chatsmainscreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/Community.dart';
|
||||
import 'package:regroup/Main_Screens/GroupTab/View/GroupTab.dart';
|
||||
import 'package:regroup/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart';
|
||||
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/CalenderTab/CalenderTab.dart';
|
||||
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/Chats/View/chatsmainscreen.dart';
|
||||
|
||||
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';
|
||||
|
||||
class MainController extends GetxController {
|
||||
var selectedIndex = 0.obs;
|
||||
|
||||
@@ -1,19 +1,78 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/controller/MainController.dart';
|
||||
import 'package:regroup/Main_Screens/ProfileTab/EditProfile/ViewModel/InterestApiList.dart';
|
||||
|
||||
final MainController mainController = Get.put(MainController());
|
||||
|
||||
class MainScreen extends StatelessWidget {
|
||||
class MainScreen extends StatefulWidget {
|
||||
const MainScreen({super.key});
|
||||
|
||||
@override
|
||||
State<MainScreen> createState() => _MainScreenState();
|
||||
}
|
||||
|
||||
class _MainScreenState extends State<MainScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
InterestListApi().getinterestlistApi();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
686
lib/Common/controller/NormalPostCard.dart
Normal file
@@ -0,0 +1,686 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.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/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Model/CommonDatumObjModel.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Model/fetchicons.dart';
|
||||
import 'package:regroup/Main_Screens/Community/ViewModel/postmethod.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/view_model/CountersHelper.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/view_model/communitypostmethod.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:regroup/sidemenu/view_model/postmethod.dart';
|
||||
|
||||
class NormalCardTile extends StatefulWidget {
|
||||
List<ManageTagPopular> tags;
|
||||
String? createAt;
|
||||
CommonDatumObjModelData commonObj;
|
||||
String forWhichTab;
|
||||
List<ReactionData> reactions;
|
||||
Map<int, ReactionData?> selectedReactions;
|
||||
bool? coachbool;
|
||||
bool showCommentButton;
|
||||
int currentIndex;
|
||||
NormalCardTile(
|
||||
{Key? key,
|
||||
required this.tags,
|
||||
this.createAt,
|
||||
required this.forWhichTab,
|
||||
required this.commonObj,
|
||||
required this.reactions,
|
||||
required this.selectedReactions,
|
||||
required this.currentIndex,
|
||||
this.showCommentButton = true,
|
||||
this.coachbool})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_NormalCardTileState createState() => _NormalCardTileState();
|
||||
}
|
||||
|
||||
class _NormalCardTileState extends State<NormalCardTile> {
|
||||
RxString mainImage = 'assets/images/png/uiw_like-o.png'.obs;
|
||||
final CountersHelper countersHelper = Get.find<CountersHelper>();
|
||||
int saveCount = 0;
|
||||
_handleReactionChange(Reaction<String>? reaction) async {
|
||||
if (widget.selectedReactions[widget.commonObj.id] != null &&
|
||||
reaction?.value ==
|
||||
widget.selectedReactions[widget.commonObj.id]!.id.toString() ||
|
||||
reaction?.value == null) {
|
||||
// User tapped on the currently selected reaction, so remove it
|
||||
|
||||
//api call for dislike
|
||||
|
||||
await LikeUploaddata(
|
||||
widget.selectedReactions[widget.commonObj.id]?.id,
|
||||
widget.commonObj.id!,
|
||||
);
|
||||
setState(() {
|
||||
widget.selectedReactions[widget.commonObj.id!] = null;
|
||||
//decrement gloally
|
||||
countersHelper.likesCounterPopular[widget.currentIndex]--;
|
||||
log("global value ${countersHelper.likesCounterPopular[widget.currentIndex]}");
|
||||
});
|
||||
} else {
|
||||
// User selected a new reaction
|
||||
var newSelectedReaction = widget.reactions.firstWhere(
|
||||
(r) => r.id.toString() == reaction?.value,
|
||||
orElse: () => widget.reactions.first, // Default reaction if not found
|
||||
);
|
||||
await _handleReactionChangeApiCall(
|
||||
newSelectedReaction, widget.commonObj.id!);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _handleReactionChangeApiCall(
|
||||
ReactionData? reaction, int postId) async {
|
||||
setState(() {
|
||||
widget.selectedReactions[postId] =
|
||||
reaction; // Set the selected reaction for this post
|
||||
|
||||
if (countersHelper.likesCounterPopular[widget.currentIndex] <=
|
||||
widget.commonObj.totalReactionCount!) {
|
||||
countersHelper.likesCounterPopular[widget.currentIndex]++;
|
||||
}
|
||||
});
|
||||
|
||||
await LikeUploaddata(
|
||||
reaction?.id,
|
||||
postId,
|
||||
);
|
||||
}
|
||||
|
||||
LikeUploaddata(int? likeIconId, int? postid) async {
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_posts_xid": postid,
|
||||
"like_icons_xid": likeIconId ?? '',
|
||||
};
|
||||
final data = await CommunitypostMethod().postLikepost(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
// return utils.showToast(data.message);
|
||||
} else {
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
void updateImage(String reaction) {
|
||||
switch (reaction) {
|
||||
case 'like':
|
||||
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
|
||||
break;
|
||||
case 'heart':
|
||||
mainImage.value = 'assets/images/png/heart 2.png';
|
||||
break;
|
||||
case 'party':
|
||||
mainImage.value = 'assets/images/png/party-popper 2.png';
|
||||
break;
|
||||
default:
|
||||
// Handle any other cases or do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
saveunsavepost(int popularpostid) async {
|
||||
// utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_posts_xid": popularpostid,
|
||||
};
|
||||
final data = await Communitypostmethod().postUserSave(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
if (countersHelper.saveButtonPopular[widget.currentIndex] == false) {
|
||||
countersHelper.savePostCounterPopular[widget.currentIndex]++;
|
||||
} else {
|
||||
countersHelper.savePostCounterPopular[widget.currentIndex]--;
|
||||
}
|
||||
countersHelper.saveButtonPopular[widget.currentIndex] =
|
||||
!countersHelper.saveButtonPopular[widget.currentIndex];
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
pinunpinUser(int userid) async {
|
||||
Map<String, dynamic> updata = {
|
||||
"pin_iam_principal_xid": userid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
countersHelper.pinButtonPopular[widget.currentIndex] =
|
||||
!countersHelper.pinButtonPopular[widget.currentIndex];
|
||||
countersHelper.updateFeedsPage.value =
|
||||
!countersHelper.updateFeedsPage.value;
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var imgUrl = widget.commonObj.image!
|
||||
.split(
|
||||
"https://regroup.betadelivery.com/storage/app/public/uploads/post_image/")
|
||||
.last;
|
||||
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(minHeight: Get.width < 400 ? 750 : 770),
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 600.h,
|
||||
mainOpacity: 1,
|
||||
borderRadius: BorderRadius.circular(1),
|
||||
customWidget: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundImage:
|
||||
widget.commonObj.iamPrincipal?.profilePhoto != null
|
||||
? NetworkImage(widget.commonObj.iamPrincipal!
|
||||
.profilePhoto!) as ImageProvider<Object>
|
||||
: const AssetImage(
|
||||
'assets/images/default_profile.png')
|
||||
as ImageProvider<Object>,
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(
|
||||
widget.commonObj.iamPrincipal!.fullName ??
|
||||
"Regroup"),
|
||||
sizedBoxWidth(10.w),
|
||||
widget.coachbool == true
|
||||
? Container(
|
||||
width: 75.w,
|
||||
height: 25.h,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: const Color(0xFFD90B2E),
|
||||
width: 1.w,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
child: Center(
|
||||
child: text12w400_FCFCFC("Coach")),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC(
|
||||
widget.commonObj.community!.communityName ??
|
||||
""),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC(widget.createAt!),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
pinunpinUser(widget.commonObj.iamPrincipal!.id!);
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
countersHelper
|
||||
.pinButtonPopular[widget.currentIndex]
|
||||
? Text(
|
||||
'Unpin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
countersHelper
|
||||
.pinButtonPopular[widget.currentIndex]
|
||||
? Image.asset(
|
||||
"assets/images/png/PinnedIcon.png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
if (widget.showCommentButton) {
|
||||
bool result = await Get.toNamed(RouteName.postdetailsScreen,
|
||||
arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
'tagsList': widget.tags,
|
||||
'created_at': widget.createAt,
|
||||
'commonObj': widget.commonObj,
|
||||
'fromWhichTab': widget.forWhichTab,
|
||||
'reactions': widget.reactions,
|
||||
'selectedReactions': widget.selectedReactions,
|
||||
'currentIndex': widget.currentIndex
|
||||
});
|
||||
if (result) {
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 360,
|
||||
width: double.infinity,
|
||||
child: Image.network(
|
||||
widget.commonObj.image!,
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
return const Center(
|
||||
child: Icon(Icons.error),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
width: double.infinity,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: widget.tags.length,
|
||||
itemBuilder: (context, index) {
|
||||
var manageTag = widget.tags[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.tagdetailscreen,
|
||||
arguments: {
|
||||
'tagid': manageTag.id,
|
||||
'tagname': manageTag.name,
|
||||
'ispinnedtag': manageTag.isPinned,
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
commonContainer(
|
||||
width: 130.w,
|
||||
height: 30.h,
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
borderColor: const Color(0xFFD90B2E),
|
||||
opacity1: 0.04,
|
||||
opacity2: 0.05,
|
||||
customWidget: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
'#${manageTag.name}',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Text(
|
||||
widget.commonObj.caption ?? "",
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
maxLines: 2, // Set the maximum number of lines
|
||||
overflow: TextOverflow
|
||||
.ellipsis, // Truncate the text with an ellipsis
|
||||
),
|
||||
),
|
||||
// sizedBoxHeight(20.h),
|
||||
Row(children: [
|
||||
Obx(
|
||||
() => InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.reactionview, arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
});
|
||||
},
|
||||
child: stackReaction(
|
||||
number: countersHelper
|
||||
.likesCounterPopular[widget.currentIndex]
|
||||
.toString(),
|
||||
containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderColor: const Color(0xFF434A53),
|
||||
borderwidth: 0.43,
|
||||
opacity1: 0.2,
|
||||
opacity2: 0.2,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Obx(
|
||||
() => text14w400_FCFCFC(countersHelper
|
||||
.commentsCounterPopular[widget.currentIndex]
|
||||
.toString()),
|
||||
),
|
||||
sizedBoxWidth(20.w),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderColor: const Color(0xFF434A53),
|
||||
borderwidth: 0.43,
|
||||
opacity1: 0.2,
|
||||
opacity2: 0.2,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Obx(
|
||||
() => text14w400_FCFCFC(countersHelper
|
||||
.savePostCounterPopular[widget.currentIndex]
|
||||
.toString()),
|
||||
),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ReactionButton<String>(
|
||||
onReactionChanged: (reaction) async {
|
||||
_handleReactionChange(reaction);
|
||||
},
|
||||
reactions: widget.reactions
|
||||
.map((reaction) => Reaction<String>(
|
||||
value: reaction.id.toString(),
|
||||
previewIcon: Image.network(reaction.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover),
|
||||
icon: Image.network(reaction.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover),
|
||||
))
|
||||
.toList(),
|
||||
selectedReaction: widget.selectedReactions[
|
||||
widget.commonObj.id] !=
|
||||
null
|
||||
? Reaction<String>(
|
||||
value: widget
|
||||
.selectedReactions[widget.commonObj.id]!
|
||||
.id
|
||||
.toString(),
|
||||
icon: Image.network(
|
||||
widget
|
||||
.selectedReactions[
|
||||
widget.commonObj.id]!
|
||||
.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 9,
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 20,
|
||||
itemScale: 0.3,
|
||||
itemSize: const Size(30, 30),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
child: widget.selectedReactions[
|
||||
widget.commonObj.id] !=
|
||||
null
|
||||
? Image.network(
|
||||
widget
|
||||
.selectedReactions[widget.commonObj.id]!
|
||||
.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/uiw_like-o.png',
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Like'),
|
||||
],
|
||||
),
|
||||
widget.showCommentButton
|
||||
? GestureDetector(
|
||||
onTap: () async {
|
||||
bool result = await Get.toNamed(
|
||||
RouteName.postdetailsScreen,
|
||||
arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
'tagsList': widget.tags,
|
||||
'created_at': widget.createAt,
|
||||
'commonObj': widget.commonObj,
|
||||
'fromWhichTab': widget.forWhichTab,
|
||||
'reactions': widget.reactions,
|
||||
'selectedReactions':
|
||||
widget.selectedReactions,
|
||||
'currentIndex': widget.currentIndex
|
||||
});
|
||||
if (result) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
)
|
||||
: SizedBox(),
|
||||
Obx(
|
||||
() => Column(
|
||||
//here
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async =>
|
||||
await saveunsavepost(widget.commonObj.id!),
|
||||
child: countersHelper
|
||||
.saveButtonPopular[widget.currentIndex]
|
||||
? Image.asset(
|
||||
'assets/images/png/postSaved.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
441
lib/Common/controller/data/network/network_api.dart
Normal file
@@ -0,0 +1,441 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
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/Common/base_manager.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../entry_point_controller.dart';
|
||||
|
||||
class NetworkApiServices {
|
||||
Dio dio = Dio();
|
||||
final controllerEntryPoint = Get.put(EntryPointController());
|
||||
|
||||
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('access-token');
|
||||
log(token.toString());
|
||||
|
||||
try {
|
||||
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());
|
||||
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) {
|
||||
if (e.response!.data['message'] == 'Invalid token') {
|
||||
// prefs.remove('access-token');
|
||||
// await prefs.clear();
|
||||
// Get.offNamed(RouteName.loginScreen);
|
||||
utils.showToast('Please login again');
|
||||
} else {
|
||||
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>(
|
||||
'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);
|
||||
} else {
|
||||
try {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'].toString(), ResponseStatus.FAILED);
|
||||
} catch (_) {
|
||||
return ResponseData<dynamic>(
|
||||
response.statusMessage!, ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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();
|
||||
String? token = prefs.getString('access-token');
|
||||
|
||||
try {
|
||||
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) {
|
||||
if (e.response!.data['message'] == 'Invalid token') {
|
||||
prefs.remove('access-token');
|
||||
await prefs.clear();
|
||||
Get.offNamed(RouteName.loginScreen);
|
||||
utils.showToast('Please login again');
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
// 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 if (e.response!.data['message']
|
||||
// // ['name'] is List
|
||||
// ) {
|
||||
// return ResponseData<dynamic>(
|
||||
// // e.response!.data['message']['name'][0]!, ResponseStatus.FAILED,
|
||||
// e.response!.data['message'], ResponseStatus.FAILED,
|
||||
|
||||
// data: e.response!.data);
|
||||
// }
|
||||
else {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'], ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
|
||||
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>(
|
||||
response.data['message'].toString(), ResponseStatus.FAILED);
|
||||
} catch (_) {
|
||||
return ResponseData<dynamic>(
|
||||
response.statusMessage!, ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData> postFileUploadApi({data, required String url}) 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('access-token').toString();
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
data: data,
|
||||
options: Options(headers: {"authorization": "Bearer $token"}));
|
||||
} on Exception catch (_) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> postApiHttp(
|
||||
String token, String url, Map<String, String> body) async {
|
||||
// var headers = {
|
||||
// 'Authorization': 'Bearer 1867|aBb92qswYsEzQa8LJayiuQw6B3Wofuj6iluUumLx',
|
||||
// 'Authorization': 'Bearer 189|yeRLynwInflhfnVObT7dd7R0Ywv91AIlxIKXoiAv',
|
||||
// 'Cookie': 'laravel_session=eyJpdiI6ImcwS2NYNlJYam4wcU1YUXJsYWZsb2c9PSIsInZhbHVlIjoiK0hvT3c5NmZFQ0NDajYxTUFaaVluWkpYbUkwYk1JbldyTVJwZitMN05zWnliaVdBNWZjTXpyVG5UODM1MTBaMzQwUCtNc3lGak5MQWRZamh2dWIvdzIxQnNVVWQrQi9NUi9YTS9PQWgxMlZHTENUNU0zY0VVazluNEplTFFvbGgiLCJtYWMiOiJkNjA0NjA4YWJhZDkxODA0YmQ2MTViNzc1MTg4OWRiODMzMjI5OGE0ZDI3MDRhMTAzM2E1MGY4ODQyMjI1NGIxIiwidGFnIjoiIn0%3D'
|
||||
// };
|
||||
|
||||
// controllerEntryPoint.logedIn!
|
||||
// ?
|
||||
// headers = {"authorization": "Bearer $token"};
|
||||
// : headers = {
|
||||
// "authorization":
|
||||
// "Bearer 189|yeRLynwInflhfnVObT7dd7R0Ywv91AIlxIKXoiAv"
|
||||
// };
|
||||
var headers = {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': token,
|
||||
// 'Cookie': 'jerichoalternatives_session=eyJpdiI6Ik5KTWVUUnM2elR0b0Z0SWZneWY2Nmc9PSIsInZhbHVlIjoiY0s5WjV5UmJyZ3J2UUY1enY4KzZEblg5RmxWUm1KdXpmVWxQVTRKNUgyMThqRlJPK1lrcVhXMzJLMkhjSW5BdFJhNEgyTWFZQmM3Sll0aG52d1F4RGpSM0l4TlFWWlVPaUhpVFVsQ3lnaW8rSXJSY2Y2aG8ydFhqck8xTmlDaUMiLCJtYWMiOiI2MmNhZWZjYmZkMzBlYzhhZjcxNzRhMmM1OGJhYmRjM2JkOGMzM2Y3ZGFmMWViNWIyOTYyODY5ZDk3MmZmNGI3IiwidGFnIjoiIn0%3D'
|
||||
};
|
||||
var request = http.MultipartRequest('POST', Uri.parse(url));
|
||||
|
||||
request.fields.addAll(body);
|
||||
|
||||
request.headers.addAll(headers);
|
||||
|
||||
http.StreamedResponse response = await request.send();
|
||||
|
||||
print(response.statusCode);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
|
||||
data: jsonResp);
|
||||
// return await response.stream.bytesToString();
|
||||
} else if (response.statusCode == 201) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>(jsonResp["message"], ResponseStatus.PRIVATE,
|
||||
data: jsonResp);
|
||||
} else if (response.statusCode == 400) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>(
|
||||
jsonResp["message"],
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
} else if (response.statusCode == 422) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
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,
|
||||
);
|
||||
} else if (response.statusCode == 500) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>(
|
||||
jsonResp["message"],
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.reasonPhrase!,
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData> postslugApi(String url) async {
|
||||
if (kDebugMode) {
|
||||
print("api url is >>> $url");
|
||||
}
|
||||
Response response;
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// String? token = prefs.getString('token');
|
||||
String? token = prefs.getString('access-token').toString();
|
||||
print("token is $token");
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
options: Options(headers: {"authorization": "Bearer $token"}));
|
||||
} on Exception catch (_) {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong', ResponseStatus.FAILED);
|
||||
}
|
||||
if (response.statusCode == 200) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,255 +0,0 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
|
||||
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:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import 'entry_point_controller.dart';
|
||||
|
||||
class NetworkApi {
|
||||
Dio dio = Dio();
|
||||
final controllerEntryPoint = Get.put(EntryPointController());
|
||||
|
||||
Future<ResponseData> getApi(String url) async {
|
||||
if (kDebugMode) {
|
||||
print("api url is >>> $url");
|
||||
}
|
||||
Response response;
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
token = prefs.getString('token');
|
||||
|
||||
try {
|
||||
response = await dio.get(url,
|
||||
options: Options(headers: {
|
||||
"authorization": "Bearer $token",
|
||||
'content-Type': 'application/json',
|
||||
}));
|
||||
} on Exception catch (_) {
|
||||
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 == 404) {
|
||||
return ResponseData<dynamic>("error", ResponseStatus.ERROR,
|
||||
data: response.data);
|
||||
} else {
|
||||
try {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'].toString(), ResponseStatus.FAILED);
|
||||
} catch (_) {
|
||||
return ResponseData<dynamic>(
|
||||
response.statusMessage!, ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData> postApi({data, required String url}) 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");
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
data: data,
|
||||
options: Options(
|
||||
headers: {
|
||||
"authorization": "Bearer $token",
|
||||
'content-Type': 'application/json',
|
||||
"Accept": 'application/json'
|
||||
},
|
||||
));
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData> postFileUploadApi({data, required String url}) 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();
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
data: data,
|
||||
options: Options(headers: {"authorization": "Bearer $token"}));
|
||||
} on Exception catch (_) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> postApiHttp(
|
||||
String token, String url, Map<String, String> body) async {
|
||||
// var headers = {
|
||||
// 'Authorization': 'Bearer 1867|aBb92qswYsEzQa8LJayiuQw6B3Wofuj6iluUumLx',
|
||||
// 'Authorization': 'Bearer 189|yeRLynwInflhfnVObT7dd7R0Ywv91AIlxIKXoiAv',
|
||||
// 'Cookie': 'laravel_session=eyJpdiI6ImcwS2NYNlJYam4wcU1YUXJsYWZsb2c9PSIsInZhbHVlIjoiK0hvT3c5NmZFQ0NDajYxTUFaaVluWkpYbUkwYk1JbldyTVJwZitMN05zWnliaVdBNWZjTXpyVG5UODM1MTBaMzQwUCtNc3lGak5MQWRZamh2dWIvdzIxQnNVVWQrQi9NUi9YTS9PQWgxMlZHTENUNU0zY0VVazluNEplTFFvbGgiLCJtYWMiOiJkNjA0NjA4YWJhZDkxODA0YmQ2MTViNzc1MTg4OWRiODMzMjI5OGE0ZDI3MDRhMTAzM2E1MGY4ODQyMjI1NGIxIiwidGFnIjoiIn0%3D'
|
||||
// };
|
||||
|
||||
// controllerEntryPoint.logedIn!
|
||||
// ?
|
||||
// headers = {"authorization": "Bearer $token"};
|
||||
// : headers = {
|
||||
// "authorization":
|
||||
// "Bearer 189|yeRLynwInflhfnVObT7dd7R0Ywv91AIlxIKXoiAv"
|
||||
// };
|
||||
var headers = {
|
||||
'Accept': 'application/json',
|
||||
'Authorization': token,
|
||||
// 'Cookie': 'jerichoalternatives_session=eyJpdiI6Ik5KTWVUUnM2elR0b0Z0SWZneWY2Nmc9PSIsInZhbHVlIjoiY0s5WjV5UmJyZ3J2UUY1enY4KzZEblg5RmxWUm1KdXpmVWxQVTRKNUgyMThqRlJPK1lrcVhXMzJLMkhjSW5BdFJhNEgyTWFZQmM3Sll0aG52d1F4RGpSM0l4TlFWWlVPaUhpVFVsQ3lnaW8rSXJSY2Y2aG8ydFhqck8xTmlDaUMiLCJtYWMiOiI2MmNhZWZjYmZkMzBlYzhhZjcxNzRhMmM1OGJhYmRjM2JkOGMzM2Y3ZGFmMWViNWIyOTYyODY5ZDk3MmZmNGI3IiwidGFnIjoiIn0%3D'
|
||||
};
|
||||
var request = http.MultipartRequest('POST', Uri.parse(url));
|
||||
|
||||
request.fields.addAll(body);
|
||||
|
||||
request.headers.addAll(headers);
|
||||
|
||||
http.StreamedResponse response = await request.send();
|
||||
|
||||
print(response.statusCode);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>("success", ResponseStatus.SUCCESS,
|
||||
data: jsonResp);
|
||||
// return await response.stream.bytesToString();
|
||||
} else if (response.statusCode == 201) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>(jsonResp["message"], ResponseStatus.PRIVATE,
|
||||
data: jsonResp);
|
||||
} else if (response.statusCode == 400) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>(
|
||||
jsonResp["message"],
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
} else if (response.statusCode == 422) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
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,
|
||||
);
|
||||
} else if (response.statusCode == 500) {
|
||||
var resp = await response.stream.bytesToString();
|
||||
var jsonResp = jsonDecode(resp);
|
||||
print(jsonResp);
|
||||
return ResponseData<dynamic>(
|
||||
jsonResp["message"],
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.reasonPhrase!,
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<ResponseData> postslugApi(String url) async {
|
||||
if (kDebugMode) {
|
||||
print("api url is >>> $url");
|
||||
}
|
||||
Response response;
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// String? token = prefs.getString('token');
|
||||
String? token = prefs.getString('token').toString();
|
||||
print("token is $token");
|
||||
try {
|
||||
response = await dio.post(url,
|
||||
options: Options(headers: {"authorization": "Bearer $token"}));
|
||||
} on Exception catch (_) {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong', ResponseStatus.FAILED);
|
||||
}
|
||||
if (response.statusCode == 200) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,487 +0,0 @@
|
||||
import 'package:flutter/material.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/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.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 CycleScreen extends StatefulWidget {
|
||||
const CycleScreen({super.key});
|
||||
|
||||
@override
|
||||
State<CycleScreen> createState() => _CycleScreenState();
|
||||
}
|
||||
|
||||
class _CycleScreenState extends State<CycleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Cycle",
|
||||
customActionWidget: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
)),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
), Column(children: [
|
||||
sizedBoxHeight(10.h),
|
||||
DefaultTabController(
|
||||
length: 2,
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
CommonTabBar(tabs: const [
|
||||
Tab(
|
||||
text: 'Popular',
|
||||
),
|
||||
Tab(
|
||||
text: 'Latest',
|
||||
),
|
||||
]),
|
||||
SizedBox(
|
||||
height: 670.h,
|
||||
child: TabBarView(
|
||||
children: [
|
||||
CyclepopularTab(),
|
||||
CyclelatestTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
])
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Widget CyclepopularTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
normalcardtile(
|
||||
profileImg: 'assets/images/png/Ellipse 52.png',
|
||||
title: 'Ryan Dorwat',
|
||||
mainImg: 'assets/images/png/img322.png',
|
||||
containerTitle: [
|
||||
'Football',
|
||||
'Teams player',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
sizedBoxHeight(30.h),
|
||||
normalcardtile(
|
||||
profileImg: 'assets/images/png/Ellipse 43.png',
|
||||
title: 'Edward Hackket',
|
||||
mainImg: 'assets/images/png/Rectangle 24.png',
|
||||
containerTitle: [
|
||||
'Cycle',
|
||||
'Marathon',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget CyclelatestTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
normalcardtile(
|
||||
profileImg: 'assets/images/png/Ellipse 43.png',
|
||||
title: 'Edward Hackket',
|
||||
mainImg: 'assets/images/png/Rectangle 24.png',
|
||||
containerTitle: [
|
||||
'Cycle',
|
||||
'Marathon',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget normalcardtile({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
required String mainImg,
|
||||
required List<String> containerTitle,
|
||||
}) {
|
||||
var mainImage = 'assets/images/png/uiw_like-o.png'.obs;
|
||||
void updateImage(String reaction) {
|
||||
if (reaction == 'like') {
|
||||
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
|
||||
} else if (reaction == 'heart') {
|
||||
mainImage.value = 'assets/images/png/heart 2.png';
|
||||
} else if (reaction == 'party') {
|
||||
mainImage.value = 'assets/images/png/party-popper 2.png';
|
||||
}
|
||||
}
|
||||
|
||||
return commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 570.h,
|
||||
border: 0,
|
||||
borderradius: 1,
|
||||
customWidget: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: AssetImage(profileImg),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC('Active alliance network'),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC('1 Hour ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 50),
|
||||
color: Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
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: [
|
||||
Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
mainImg,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(20.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: containerTitle.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
},
|
||||
child: containertile(text: containerTitle[index])),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
|
||||
Row(children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.reactionview);
|
||||
},
|
||||
child: stackReaction(number: '20', containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 0.43,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('20'),
|
||||
sizedBoxWidth(20.w),
|
||||
commonGlassContainer(
|
||||
border: 0.43,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('10'),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
return ReactionButton<String>(
|
||||
onReactionChanged: (reaction) {
|
||||
updateImage(reaction?.value ?? 'like');
|
||||
debugPrint('Selected value: ${reaction?.value}');
|
||||
},
|
||||
reactions: <Reaction<String>?>[
|
||||
Reaction<String>(
|
||||
value: 'like',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'heart',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'party',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
),
|
||||
],
|
||||
selectedReaction: Reaction<String>(
|
||||
value: 'like',
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
),
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 9,
|
||||
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),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildReactionsPreviewIcon(String assetPath) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Image.asset(
|
||||
assetPath,
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildReactionsIcon(String assetPath) {
|
||||
return Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
assetPath,
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Like')
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
class CommunityListModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
CommunityListModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
CommunityListModel.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(new Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
int? iamPrincipalXid;
|
||||
int? manageCommunityXid;
|
||||
Community? community;
|
||||
|
||||
Data(
|
||||
{this.id, this.iamPrincipalXid, this.manageCommunityXid, this.community});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
iamPrincipalXid = json['iam_principal_xid'];
|
||||
manageCommunityXid = json['manage_community_xid'];
|
||||
community = json['community'] != null
|
||||
? new Community.fromJson(json['community'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['iam_principal_xid'] = this.iamPrincipalXid;
|
||||
data['manage_community_xid'] = this.manageCommunityXid;
|
||||
if (this.community != null) {
|
||||
data['community'] = this.community!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Community {
|
||||
int? id;
|
||||
String? communityName;
|
||||
String? communityProfilePhoto;
|
||||
|
||||
Community({this.id, this.communityName, this.communityProfilePhoto});
|
||||
|
||||
Community.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
communityName = json['community_name'];
|
||||
communityProfilePhoto = json['community_profile_photo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['community_name'] = this.communityName;
|
||||
data['community_profile_photo'] = this.communityProfilePhoto;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
class PopulartagsListModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
PopulartagsListModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
PopulartagsListModel.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(new Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
String? name;
|
||||
int? tagPopularity;
|
||||
|
||||
Data({this.id, this.name, this.tagPopularity});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
tagPopularity = json['tag_popularity'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['tag_popularity'] = this.tagPopularity;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
class TagsMainModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
TagsMainModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
TagsMainModel.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(new Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
String? name;
|
||||
int? tagPopularity;
|
||||
|
||||
Data({this.id, this.name, this.tagPopularity});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
tagPopularity = json['tag_popularity'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['tag_popularity'] = this.tagPopularity;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,492 +0,0 @@
|
||||
import 'package:flutter/material.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/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 PostDetailsScreen extends StatefulWidget {
|
||||
const PostDetailsScreen({super.key});
|
||||
|
||||
@override
|
||||
State<PostDetailsScreen> createState() => _PostDetailsScreenState();
|
||||
}
|
||||
|
||||
class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Post",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
postCards(
|
||||
profileImg: 'assets/images/png/Ellipse 52.png',
|
||||
title: 'Ryan Dorwat',
|
||||
mainImg: 'assets/images/png/Rectangle 25.png',
|
||||
containerTitle: [
|
||||
'Football',
|
||||
'Marathon',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
sizedBoxHeight(35.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 20.r,
|
||||
foregroundImage: AssetImage(
|
||||
"assets/images/png/Ellipse 48.png",
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(15.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text12w400_FCFCFC_blur("Roger Saris"),
|
||||
text14w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text 😍"),
|
||||
text10w400_FCFCFC_blur("Reply. . . ")
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(50.h),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: CustomTextFormField(
|
||||
hintText: "Add comment",
|
||||
suffixIcon: Container(
|
||||
height: 20.h,
|
||||
width: 25.w,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/iconoir_send.png",
|
||||
height: 20.h,
|
||||
width: 25.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(85.h)
|
||||
]))
|
||||
]))
|
||||
]));
|
||||
}
|
||||
|
||||
Widget postCards({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
required String mainImg,
|
||||
required List<String> containerTitle,
|
||||
}) {
|
||||
var mainImage = 'assets/images/png/uiw_like-o.png'.obs;
|
||||
void updateImage(String reaction) {
|
||||
if (reaction == 'like') {
|
||||
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
|
||||
} else if (reaction == 'heart') {
|
||||
mainImage.value = 'assets/images/png/heart 2.png';
|
||||
} else if (reaction == 'party') {
|
||||
mainImage.value = 'assets/images/png/party-popper 2.png';
|
||||
}
|
||||
}
|
||||
|
||||
return commonGlassContainer(
|
||||
width: double.infinity,
|
||||
height: 570.h,
|
||||
border: 0,
|
||||
borderradius: 0,
|
||||
customWidget: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: AssetImage(profileImg),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
Spacer(),
|
||||
commonGlassContainer(
|
||||
width: 72.w,
|
||||
height: 26.h,
|
||||
borderradius: 5.r,
|
||||
borderColor: Color(0xFFD90B2E),
|
||||
customWidget:
|
||||
Center(child: text14400white("Follow")),
|
||||
border: 1),
|
||||
sizedBoxWidth(6.w),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: Color(0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints.tightFor(width: 176.w),
|
||||
offset: Offset(0, 50),
|
||||
color: Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) =>
|
||||
<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
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: [
|
||||
Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC('Active alliance network'),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC('1 Hour ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
mainImg,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(20.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: containerTitle.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
},
|
||||
child: containertile(text: containerTitle[index])),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
|
||||
Row(children: [
|
||||
stackReaction(number: '20', containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
Spacer(),
|
||||
commonGlassContainer(
|
||||
border: 0.9,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('20'),
|
||||
sizedBoxWidth(20.w),
|
||||
commonGlassContainer(
|
||||
border: 0.9,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('10'),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
return ReactionButton<String>(
|
||||
onReactionChanged: (reaction) {
|
||||
updateImage(reaction?.value ?? 'like');
|
||||
debugPrint(
|
||||
'Selected value: ${reaction?.value}');
|
||||
},
|
||||
reactions: <Reaction<String>?>[
|
||||
Reaction<String>(
|
||||
value: 'like',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'heart',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'party',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
),
|
||||
],
|
||||
selectedReaction: Reaction<String>(
|
||||
value: 'like',
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
),
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 9,
|
||||
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),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget containertile({required String text}) {
|
||||
return commonGlassContainer(
|
||||
border: 0.9,
|
||||
width: 100.w,
|
||||
height: 30.h,
|
||||
borderradius: 30.r,
|
||||
borderColor: Color(0xFFD90B2E),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildReactionsPreviewIcon(String assetPath) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Image.asset(
|
||||
assetPath,
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildReactionsIcon(String assetPath) {
|
||||
return Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
assetPath,
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Like')
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,316 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
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';
|
||||
|
||||
class ReactionView extends StatefulWidget {
|
||||
const ReactionView({super.key});
|
||||
|
||||
@override
|
||||
State<ReactionView> createState() => _ReactionViewState();
|
||||
}
|
||||
|
||||
class _ReactionViewState extends State<ReactionView> {
|
||||
List allTabData = [
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg1.png",
|
||||
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
|
||||
"title": "Edward Hackket"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg2.png",
|
||||
"reactionimg": "assets/images/png/heart 2.png",
|
||||
"title": "Dulce Vaccaro"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg3.png",
|
||||
"reactionimg": "assets/images/png/party-popper 2.png",
|
||||
"title": "Edward Hackket"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg4.png",
|
||||
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
|
||||
"title": "Dulce Vaccaro"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Rectangle 65.png",
|
||||
"reactionimg": "assets/images/png/heart 2.png",
|
||||
"title": "Edward Hackket"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/Ellipse 43.png",
|
||||
"reactionimg": "assets/images/png/party-popper 2.png",
|
||||
"title": "Dulce Vaccaro"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg4.png",
|
||||
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
|
||||
"title": "Dulce Vaccaro"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg3.png",
|
||||
"reactionimg": "assets/images/png/party-popper 2.png",
|
||||
"title": "Edward Hackket"
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/cimg4.png",
|
||||
"reactionimg": "assets/images/png/f7_hand-thumbsup.png",
|
||||
"title": "Dulce Vaccaro"
|
||||
},
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Post",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
), Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(10.h),
|
||||
Expanded(
|
||||
child: DefaultTabController(
|
||||
length: 4,
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(children: [
|
||||
CommonTabBar(tabs: [
|
||||
Tab(
|
||||
text: 'All',
|
||||
),
|
||||
Tab(
|
||||
child: Row(children: [
|
||||
commonGlassContainer(
|
||||
borderColor: Color(0xFF1E3A46),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/f7_hand-thumbsup.png",
|
||||
height: 17.h,
|
||||
width: 17.w,
|
||||
),
|
||||
),
|
||||
border: 1.71),
|
||||
Spacer(),
|
||||
text14400white("110K"),
|
||||
]),
|
||||
),
|
||||
Tab(
|
||||
child: Row(children: [
|
||||
commonGlassContainer(
|
||||
borderColor: Color(0xFF1E3A46),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/heart 2.png",
|
||||
height: 17.h,
|
||||
width: 17.w,
|
||||
),
|
||||
),
|
||||
border: 1.71),
|
||||
Spacer(),
|
||||
text14400white("9.7K"),
|
||||
]),
|
||||
),
|
||||
Tab(
|
||||
child: Row(children: [
|
||||
commonGlassContainer(
|
||||
borderColor: Color(0xFF1E3A46),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderradius: 100,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/party-popper 2.png",
|
||||
height: 17.h,
|
||||
width: 17.w,
|
||||
),
|
||||
),
|
||||
border: 1.71),
|
||||
Spacer(),
|
||||
text14400white("7.4K"),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: [
|
||||
allTab(),
|
||||
likeTab(),
|
||||
favouriteTab(),
|
||||
partyTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h)
|
||||
])),
|
||||
)
|
||||
])
|
||||
]));
|
||||
}
|
||||
|
||||
Widget allTab() {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: allTabData.length,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
commonReaction(
|
||||
imagePath: allTabData[index]["imagePath"],
|
||||
reactionimg: allTabData[index]["reactionimg"],
|
||||
title: allTabData[index]["title"]),
|
||||
if (allTabData.length - 1 != index) commonDivider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget likeTab() {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: allTabData.length,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
commonReaction(
|
||||
imagePath: allTabData[index]["imagePath"],
|
||||
reactionimg: allTabData[index]["reactionimg"],
|
||||
title: allTabData[index]["title"]),
|
||||
if (allTabData.length - 1 != index) commonDivider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget favouriteTab() {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: allTabData.length,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
commonReaction(
|
||||
imagePath: allTabData[index]["imagePath"],
|
||||
reactionimg: allTabData[index]["reactionimg"],
|
||||
title: allTabData[index]["title"]),
|
||||
if (allTabData.length - 1 != index) commonDivider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget partyTab() {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: allTabData.length,
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
commonReaction(
|
||||
imagePath: allTabData[index]["imagePath"],
|
||||
reactionimg: allTabData[index]["reactionimg"],
|
||||
title: allTabData[index]["title"]),
|
||||
if (allTabData.length - 1 != index) commonDivider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget commonReaction(
|
||||
{required String imagePath,
|
||||
required String reactionimg,
|
||||
required String title}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 25.w, vertical: 18.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(children: [
|
||||
CircleAvatar(
|
||||
radius: 25.r,
|
||||
backgroundImage: AssetImage(imagePath),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
height: 22.h,
|
||||
width: 22.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFF1E3A46),
|
||||
border: Border.all(
|
||||
color: Color(0xFFFCFCFC).withOpacity(0.18),
|
||||
width: 0.6)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
reactionimg,
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
)),
|
||||
]),
|
||||
sizedBoxWidth(10.w),
|
||||
text17400white(title),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
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';
|
||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
|
||||
class PostScreen extends StatefulWidget {
|
||||
const PostScreen({super.key});
|
||||
|
||||
@override
|
||||
State<PostScreen> createState() => _PostScreenState();
|
||||
}
|
||||
|
||||
class _PostScreenState extends State<PostScreen> {
|
||||
List<File?> bannerPath = [];
|
||||
bool isbannerAdded = false;
|
||||
var selectedContainerIndices = <int>{}.obs;
|
||||
|
||||
void toggleSelectedIndex(int index) {
|
||||
if (selectedContainerIndices.contains(index)) {
|
||||
selectedContainerIndices.remove(index);
|
||||
} else {
|
||||
selectedContainerIndices.add(index);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Create a post",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
|
||||
text16w400_FCFCFC("Caption"),
|
||||
|
||||
sizedBoxHeight(18.h),
|
||||
CustomTextFormField2(
|
||||
maxlines: 3,
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Media"),
|
||||
sizedBoxHeight(18.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
false,
|
||||
(result) {
|
||||
var file = File(result);
|
||||
|
||||
bannerPath.add(file);
|
||||
isbannerAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: DottedBorder(
|
||||
strokeWidth: 1,
|
||||
dashPattern: [7, 4],
|
||||
borderType: BorderType.RRect,
|
||||
radius: Radius.circular(14.r),
|
||||
color: Color(0xFF434A53),
|
||||
child: commonGlassContainer(
|
||||
border: 0,
|
||||
width: double.infinity,
|
||||
height: 130.h,
|
||||
borderradius: 10.r,
|
||||
customWidget: bannerPath.isNotEmpty && isbannerAdded
|
||||
? Stack(children: [
|
||||
Image.file(
|
||||
bannerPath[0]!,
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
),
|
||||
Positioned(
|
||||
right: 5,
|
||||
bottom: 5,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
bannerPath.clear();
|
||||
isbannerAdded = false;
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
width: 27,
|
||||
height: 27,
|
||||
decoration: ShapeDecoration(
|
||||
color: Color(0xFF7E7E7E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5)),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
),
|
||||
])
|
||||
: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 16.h),
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/images/png/bi_download.png",
|
||||
height: 36.h,
|
||||
width: 36.w,
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
text14w400_FCFCFC("Upload image"),
|
||||
sizedBoxHeight(8.h),
|
||||
text8w400_8A8A8A(
|
||||
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Tags"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownTag1(
|
||||
header: "Enter tags",
|
||||
title: "Enter tags",
|
||||
listData: [
|
||||
"#Race",
|
||||
"#Swimming",
|
||||
"#Cycle",
|
||||
"#Swimming",
|
||||
"#Race"
|
||||
],
|
||||
rowData: [
|
||||
"23,233 Recently use tags",
|
||||
"15,123 Recently use tags",
|
||||
"15,123 Recently use tags",
|
||||
"15,123 Available tags",
|
||||
"15,123 Available tags"
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: SizedBox()),
|
||||
// CustomTextFormField(
|
||||
// suffixIcon: Container(
|
||||
// height: 20.h,
|
||||
// width: 20.w,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/Frame 58575.png",
|
||||
// height: 20.h,
|
||||
// width: 20.w,
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// )),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
containerTile(text: "# Race", index: 0),
|
||||
containerTile(text: "# Swimming", index: 1),
|
||||
containerTile(text: "# Cycle", index: 2),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
containerTile(text: "# Race", index: 3),
|
||||
containerTile(text: "# Swimming", index: 4),
|
||||
containerTile(text: "# Cycle", index: 5),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
text16w400_FCFCFC("CTA Title"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomTextFormField(
|
||||
// validationMessage: "Enter a CTA Title",
|
||||
validator: (val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return 'Enter a CTA Title';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter()
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Post as"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: ['Individual', 'Anonymous'],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: SizedBox()),
|
||||
// CommonDropdownradioBtn(
|
||||
// hint: '', items: ['Individual', 'Anonymous']),
|
||||
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Post in"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownCheckBox(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: [
|
||||
'Active alliance network',
|
||||
'Fitfam federation',
|
||||
'The athletic town',
|
||||
'Football fever'
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
images: [
|
||||
'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()),
|
||||
// CommonDropdownCheckbox(
|
||||
// hint: '',
|
||||
// items: [
|
||||
// 'Active alliance network',
|
||||
// 'Fitfam federation',
|
||||
// 'The athletic town',
|
||||
// 'Football fever'
|
||||
// ],
|
||||
// images: [
|
||||
// 'assets/images/png/Rectangle 65.png',
|
||||
// 'assets/images/png/Rectangle 66.png',
|
||||
// 'assets/images/png/Rectangle 60.png',
|
||||
// 'assets/images/png/Rectangle 68.png'
|
||||
// ],
|
||||
// ),
|
||||
sizedBoxHeight(40.h),
|
||||
CommonBtn(
|
||||
text: 'Submit post',
|
||||
onTap: () {
|
||||
successBottomsheet();
|
||||
},
|
||||
),
|
||||
|
||||
sizedBoxHeight(150.h),
|
||||
]),
|
||||
),
|
||||
),
|
||||
]));
|
||||
}
|
||||
|
||||
void successBottomsheet() {
|
||||
Get.bottomSheet(Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(14.r),
|
||||
color: Color(0xFF222935)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.w),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004082.png',
|
||||
width: 199.w,
|
||||
height: 158.h,
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text18w500Center_FCFCFC(
|
||||
'Your post has been succesfully uploaded'),
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 216.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: Color(0xFF434A53), width: 1),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color.fromRGBO(255, 255, 255, 0.054),
|
||||
Color.fromRGBO(255, 255, 255, 0.072),
|
||||
],
|
||||
stops: [0.0233, 1.0],
|
||||
transform: GradientRotation(271.14 *
|
||||
(3.141592653589793 /
|
||||
180)), // Converting degrees to radians
|
||||
),
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
),
|
||||
child: Center(child: text14w400_FCFCFC('Check out')),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h)
|
||||
]))));
|
||||
}
|
||||
|
||||
Widget containerTile({
|
||||
required String text,
|
||||
required int index,
|
||||
}) {
|
||||
return Obx(() {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
toggleSelectedIndex(index);
|
||||
},
|
||||
child: Container(
|
||||
height: 35,
|
||||
decoration: BoxDecoration(
|
||||
color: selectedContainerIndices.contains(index)
|
||||
? Color(0xFFD90B2E).withOpacity(0.4)
|
||||
: Color(0xFFFFFFFF).withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Color(0xFFD90B2E), width: 1)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
|
||||
// FollowersModel? communitytagssobj;
|
||||
|
||||
|
||||
class Communitygetmethod {
|
||||
getTagsdata(id) {}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
|
||||
class Communitypostmethod {
|
||||
Communitypostmethod();
|
||||
|
||||
Future<ResponseData<dynamic>> postCreatedTag(updata) async {
|
||||
print("updata is $updata");
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postnewtags,
|
||||
);
|
||||
print("response is ${response.data}");
|
||||
print("response message is ${response.message}");
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> postUpload(updata) async {
|
||||
print("updata is $updata");
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postupload,
|
||||
);
|
||||
print("response is ${response.data}");
|
||||
print("response message is ${response.message}");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/Community/Model/communitylistModel.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/Community/Model/populartagsListModel.dart';
|
||||
|
||||
class CommunityLsitApi {
|
||||
CommunityLsitApi();
|
||||
var data = "";
|
||||
Future<ResponseData<dynamic>> getPostinList() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.getpostcommunitylist,
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
print("success");
|
||||
CommunityListModel communitylistobj =
|
||||
CommunityListModel.fromJson(responseData);
|
||||
} else {
|
||||
// return ResponseData<dynamic>(
|
||||
// responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getPopulartagsList(updata) async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
'https://regroup.betadelivery.com/api/v1/fetch-popular-tags?manage_community_xid=$updata&name=');
|
||||
// '${ApiUrls.getpopulartagscommunity}?manage_community_xid=$updata&name=',
|
||||
|
||||
// );
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
print("success");
|
||||
PopulartagsListModel populartagslistobj =
|
||||
PopulartagsListModel.fromJson(responseData);
|
||||
} else {
|
||||
// return ResponseData<dynamic>(
|
||||
// responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
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: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';
|
||||
|
||||
class Certificate extends StatefulWidget {
|
||||
const Certificate({super.key});
|
||||
|
||||
@override
|
||||
State<Certificate> createState() => _CertificateState();
|
||||
}
|
||||
|
||||
class _CertificateState extends State<Certificate> {
|
||||
List CertificateData = [
|
||||
{
|
||||
"imagePath": "assets/images/png/image 17.png",
|
||||
"text": "Lorem ipsum is a dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/image 18.png",
|
||||
"text": "Lorem ipsum is a dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/image 20.png",
|
||||
"text": "Lorem ipsum is a dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/image 17.png",
|
||||
"text": "Lorem ipsum is a dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/image 18.png",
|
||||
"text": "Lorem ipsum is a dummy text",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/png/image 20.png",
|
||||
"text": "Lorem ipsum is a dummy text",
|
||||
},
|
||||
];
|
||||
|
||||
@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(
|
||||
CertificateData[index]["imagePath"],
|
||||
height: 100.h,
|
||||
width: 105.w,
|
||||
),
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
CertificateData[index]["text"],
|
||||
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),
|
||||
],
|
||||
)
|
||||
])))
|
||||
]));
|
||||
}
|
||||
}
|
||||
@@ -1,212 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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';
|
||||
|
||||
class Followers extends StatefulWidget {
|
||||
const Followers({super.key});
|
||||
|
||||
@override
|
||||
State<Followers> createState() => _FollowersState();
|
||||
}
|
||||
|
||||
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",
|
||||
},
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: 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",
|
||||
),
|
||||
),
|
||||
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(),
|
||||
],
|
||||
);
|
||||
},
|
||||
)
|
||||
])
|
||||
]))
|
||||
]));
|
||||
}
|
||||
|
||||
Widget followerWidget({
|
||||
required String imagePath,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
|
||||
child: Row(
|
||||
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,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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';
|
||||
|
||||
class Following extends StatefulWidget {
|
||||
const Following({super.key});
|
||||
|
||||
@override
|
||||
State<Following> createState() => _FollowingState();
|
||||
}
|
||||
|
||||
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",
|
||||
},
|
||||
];
|
||||
|
||||
@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(
|
||||
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",
|
||||
),
|
||||
),
|
||||
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(),
|
||||
],
|
||||
);
|
||||
},
|
||||
)
|
||||
])
|
||||
]))
|
||||
]));
|
||||
}
|
||||
|
||||
Widget followingWidget({
|
||||
required String imagePath,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
|
||||
child: Row(
|
||||
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,
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||