195 Commits

Author SHA1 Message Date
b5645624bd Merge pull request 'bugs26aug' (#22) from bugs26aug into main
Reviewed-on: #22
2024-08-26 08:07:58 +00:00
Shubhamshirva
fb271e64c4 bugs solved for dropdown in create post 2024-08-26 13:31:16 +05:30
priyankahadpad
6eba901db1 Merge pull request #159 from WDI-Ideas/RegroupPriyanka
minor changes
2024-08-23 20:16:19 +05:30
Dakshesh42
333a8df39a minor changes 2024-08-23 20:15:38 +05:30
Shubham Shetty
ee8c37a4dc Merge pull request #158 from WDI-Ideas/confaug22
bugs fixed for some pages
2024-08-23 19:22:34 +05:30
Shubhamshirva
d39c4ad5d8 bugs fixed for some pages 2024-08-23 19:21:55 +05:30
priyankahadpad
42069126a3 Merge pull request #157 from WDI-Ideas/RegroupPriyanka
pin mute problem solved
2024-08-23 19:20:10 +05:30
Dakshesh42
0efd230d10 pin mute problem solved 2024-08-23 19:19:36 +05:30
Shubham Shetty
4f9d5b9abf Merge pull request #156 from WDI-Ideas/bugs23aug
conflicts for pages and testing bugs resolved
2024-08-23 17:46:37 +05:30
Shubhamshirva
d0468bc718 conflicts for pages and testing bugs resolved 2024-08-23 17:46:05 +05:30
priyankahadpad
32bce97bed Merge pull request #155 from WDI-Ideas/RegroupPriyanka
minor bug fixing of null check
2024-08-23 17:41:14 +05:30
Dakshesh42
f250c6d039 minor bug fixing of null check 2024-08-23 17:40:43 +05:30
Kishan Bhuta
91de373f35 Merge pull request #154 from WDI-Ideas/bugfixing23AugKishan
comment count fixed
2024-08-23 17:01:47 +05:30
kishan06
f81db0d848 conflict resolved 2024-08-23 17:00:45 +05:30
kishan06
1166d97dbc comment count fixed 2024-08-23 16:49:10 +05:30
Shubham Shetty
e5472c7414 Merge pull request #153 from WDI-Ideas/bugs23aug
conflicts resolved
2024-08-23 15:29:49 +05:30
Shubhamshirva
ea458d58b2 conflicts resolved 2024-08-23 15:29:01 +05:30
Shubham Shetty
01eec8a1c5 Merge pull request #152 from WDI-Ideas/bugs23aug
bugs solved for create post and login page
2024-08-23 15:23:00 +05:30
Shubhamshirva
51f601d982 bugs solved for create post and login page 2024-08-23 15:22:32 +05:30
kishan06
87428c51f1 initalization error fixed completley 2024-08-23 14:36:49 +05:30
Kishan Bhuta
ba2c222c70 Merge pull request #151 from WDI-Ideas/22augkishan
22augkishan
2024-08-23 13:22:36 +05:30
kishan06
65a87af3e3 conflict resolved 2024-08-23 13:22:06 +05:30
kishan06
bd9c8b9d0d tags array index out of bound error fixed temporary 2024-08-23 13:20:11 +05:30
Shubham Shetty
ce25bd9de7 Merge pull request #150 from WDI-Ideas/bugs22aug
fixes for pages in community details and my communities
2024-08-23 12:54:29 +05:30
Shubhamshirva
dff6fae483 fixes for pages in community details and my communities 2024-08-23 12:53:34 +05:30
Shubham Shetty
0f3b80ce1d Merge pull request #149 from WDI-Ideas/bugs22aug
bugs solved for tagdetail page and community page
2024-08-22 20:21:49 +05:30
Shubhamshirva
e62f92da75 bugs solved for tagdetail page and community page 2024-08-22 20:21:25 +05:30
priyankahadpad
bf81504b8b Merge pull request #148 from WDI-Ideas/RegroupPriyanka
pin unpin problem solved
2024-08-22 20:19:32 +05:30
Dakshesh42
111bce4390 pin unpin problem solved 2024-08-22 20:18:41 +05:30
priyankahadpad
1dab461497 Merge pull request #147 from WDI-Ideas/RegroupPriyanka
minor changes
2024-08-22 19:47:52 +05:30
Dakshesh42
c53ddbc357 minor changes 2024-08-22 19:46:57 +05:30
priyankahadpad
8b05256bad Merge pull request #146 from WDI-Ideas/RegroupPriyanka
mute api and manage interest done
2024-08-22 19:43:18 +05:30
Dakshesh42
175d366c35 conflict resolved 2024-08-22 19:43:00 +05:30
Dakshesh42
c2b9a0872a mute api and manage interest done 2024-08-22 19:26:18 +05:30
diptimhabadi351
bde57c0bcc Merge pull request #145 from WDI-Ideas/dipti
overflow changes and leave community api completed
2024-08-22 19:02:11 +05:30
diptimhabadi351
2c9ce5ea44 Merge branch 'main' into dipti 2024-08-22 19:01:58 +05:30
jayesh
e84bd1b5da overflow changes and leave community api completed 2024-08-22 18:59:09 +05:30
Kishan Bhuta
3c99a41234 Merge pull request #144 from WDI-Ideas/22augkishan
code clean up
2024-08-22 18:57:20 +05:30
kishan06
8936ea2bcf code clean up 2024-08-22 18:56:57 +05:30
Kishan Bhuta
208f000a26 Merge pull request #143 from WDI-Ideas/22augkishan
widget binding added in tags
2024-08-22 17:57:47 +05:30
kishan06
4a923fb7a7 widget binding added in tags 2024-08-22 17:55:43 +05:30
Shubham Shetty
4e49d433af Merge pull request #142 from WDI-Ideas/bugs22aug
bugs solved for for my communities page
2024-08-22 17:49:58 +05:30
Shubhamshirva
2ffa30de18 bugs solved for for my communities page 2024-08-22 17:49:29 +05:30
Kishan Bhuta
25a7e5f060 Merge pull request #141 from WDI-Ideas/22augkishan
minor channges
2024-08-22 17:47:51 +05:30
kishan06
474a3c5e14 minor channges 2024-08-22 17:47:09 +05:30
Kishan Bhuta
77b61d229a Merge pull request #140 from WDI-Ideas/22augkishan
minor changes
2024-08-22 16:59:23 +05:30
kishan06
3977b3df53 minor changes 2024-08-22 16:58:37 +05:30
Shubham Shetty
0be6eda607 Merge pull request #139 from WDI-Ideas/coflicts22aug
conflict solved for page refresh in communkty details page if iser go…
2024-08-22 13:32:50 +05:30
Shubhamshirva
5c6e48e372 conflicts resolved for community details page 2024-08-22 13:31:21 +05:30
Shubhamshirva
2d0ca49d1b conflict solved for page refresh in communkty details page if iser goes to edit cmmunity 2024-08-22 13:20:34 +05:30
diptimhabadi351
c07af14fed Merge pull request #138 from WDI-Ideas/dipti
pin-unpin api completed in my community
2024-08-22 12:49:46 +05:30
diptimhabadi351
13ea470b0d Merge branch 'main' into dipti 2024-08-22 12:49:34 +05:30
jayesh
7e01ed10ef pin-unpin api completed in my community 2024-08-22 12:44:21 +05:30
Shubham Shetty
ef0c761b95 Merge pull request #137 from WDI-Ideas/managegroups
manage groups in communities completed and changes for create post us…
2024-08-22 12:14:34 +05:30
Shubhamshirva
c52246f3b9 manage groups in communities completed and changes for create post using announcement or regular tags done 2024-08-22 12:13:58 +05:30
priyankahadpad
f161c8115c Merge pull request #136 from WDI-Ideas/RegroupPriyanka
minor changes
2024-08-20 20:10:40 +05:30
Dakshesh42
f3512a4f28 minor changes 2024-08-20 20:09:43 +05:30
priyankahadpad
37f36f2e6b Merge pull request #135 from WDI-Ideas/RegroupPriyanka
new tag api done and tag detail screen
2024-08-20 20:04:16 +05:30
Dakshesh42
688d006382 conflict resolved 2024-08-20 20:04:01 +05:30
Dakshesh42
3f0423edef new tag api done and tag detail screen 2024-08-20 20:01:30 +05:30
Shubham Shetty
d5baaa0e70 Merge pull request #134 from WDI-Ideas/editcom
communities edit changes done and also some fixes
2024-08-20 17:54:45 +05:30
Shubhamshirva
d297bcde84 communities edit changes done and also some fixes 2024-08-20 17:53:49 +05:30
Shubham Shetty
049fd76734 Merge pull request #133 from WDI-Ideas/homecommunity
edit community details completed and some fixes in main page and also…
2024-08-17 00:45:43 +05:30
Sahil Shetty
9d98c57bbd edit community details completed and some fixes in main page and also fixes in communities page 2024-08-17 00:44:52 +05:30
priyankahadpad
6765f8db88 Merge pull request #132 from WDI-Ideas/RegroupPriyanka
leave community api done
2024-08-16 19:53:12 +05:30
Dakshesh42
67486b2d2e conflict resolved 2024-08-16 19:52:53 +05:30
Dakshesh42
e295051a6e leave community api done 2024-08-16 19:33:44 +05:30
diptimhabadi351
533a908441 Merge pull request #131 from WDI-Ideas/dipti
community details post completed
2024-08-16 19:21:32 +05:30
jayesh
0d3b3b2fb0 community details post completed 2024-08-16 19:20:29 +05:30
priyankahadpad
ace7d84b29 Merge pull request #130 from WDI-Ideas/PriyankaH
interest page changed
2024-08-16 12:30:20 +05:30
Dakshesh42
34209c85d4 interest page changed 2024-08-16 12:29:20 +05:30
priyankahadpad
f402b65210 Merge pull request #129 from WDI-Ideas/PriyankaH
community posts api integration
2024-08-16 12:00:17 +05:30
Dakshesh42
16d536307b conflict resolved 2024-08-16 12:00:01 +05:30
Dakshesh42
73188fa3da community posts api integration 2024-08-16 11:53:03 +05:30
Kishan Bhuta
e910046501 Merge pull request #128 from WDI-Ideas/performanceimprove
normal card and feed completee
2024-08-16 11:42:06 +05:30
kishan
d365d73931 normal card and feed completee 2024-08-16 11:40:12 +05:30
Shubham Shetty
6108ab0d65 Merge pull request #127 from WDI-Ideas/editcommunity
get api called for edit commiunity page,and some fixes
2024-08-14 20:44:12 +05:30
Shubhamshirva
01a8e0d908 get api called for edit commiunity page,and some fixes 2024-08-14 20:43:43 +05:30
priyankahadpad
1128714847 Merge pull request #126 from WDI-Ideas/PriyankaH
Community detail api integration
2024-08-14 17:34:02 +05:30
Dakshesh42
fd48696453 conflict resolved 2024-08-14 17:32:38 +05:30
diptimhabadi351
1828337698 Merge pull request #125 from WDI-Ideas/dipti
bugs fixing - login, edit profile,
2024-08-14 16:34:48 +05:30
Dakshesh42
c3d9ea58bd Community detail api integration 2024-08-14 16:34:24 +05:30
jayesh
3428ac17f7 bugs fixing - login, edit profile, 2024-08-14 16:33:09 +05:30
Shubham Shetty
f57bb8aecb Merge pull request #124 from WDI-Ideas/createcommunity
some fixes for community details page and network api services to che…
2024-08-14 13:50:26 +05:30
Shubhamshirva
8ec55f95e1 some fixes for community details page and network api services to check if user token is invalid 2024-08-14 13:49:57 +05:30
Shubham Shetty
1a21624d72 Merge pull request #123 from WDI-Ideas/createcommunity
meberes page in community details
2024-08-14 12:21:43 +05:30
Shubham Shetty
3d68e0a4ed Merge branch 'main' into createcommunity 2024-08-14 12:21:35 +05:30
Shubhamshirva
a84b1b72a5 meberes page in community details 2024-08-14 12:12:47 +05:30
priyankahadpad
07e48c9edd Merge pull request #122 from WDI-Ideas/PriyankaH
requested and invited api done.
2024-08-13 20:18:08 +05:30
Dakshesh42
0ea40850e8 conflict resolved 2024-08-13 20:17:55 +05:30
Dakshesh42
65725e0271 requested and invited api done. 2024-08-13 19:55:56 +05:30
Shubham Shetty
bbb7fafaf5 Merge pull request #121 from WDI-Ideas/createcommunity
create community and add groups in community done and also show commu…
2024-08-13 19:20:27 +05:30
Shubhamshirva
f19a19f19f create community and add groups in community done and also show community groups done 2024-08-13 19:19:45 +05:30
Kishan Bhuta
dde275ecdc Merge pull request #120 from WDI-Ideas/performanceimprove
Performanceimprove
2024-08-13 17:44:37 +05:30
kishan
ea567d8670 normal card added in community 2024-08-13 17:43:42 +05:30
kishan
39cbcb4845 common card added 2024-08-11 19:22:25 +05:30
Shubham Shetty
c8a8a73070 Merge pull request #119 from WDI-Ideas/confi9new
bottom overflow resolved
2024-08-09 19:59:23 +05:30
Shubhamshirva
8e076269e0 bottom overflow resolved 2024-08-09 19:58:54 +05:30
priyankahadpad
28423220c5 Merge pull request #118 from WDI-Ideas/PriyankaH
bug fixed
2024-08-09 19:47:08 +05:30
Dakshesh42
b97ee0c77c bug fixed 2024-08-09 19:46:45 +05:30
Shubham Shetty
77e2d5abbb Merge pull request #117 from WDI-Ideas/confi9aug
conflicts fixed for community page and sidebar
2024-08-09 19:26:48 +05:30
Shubhamshirva
0fcbff1c52 conflicts fixed for community page and sidebar 2024-08-09 19:26:05 +05:30
priyankahadpad
0c3c1d1449 Merge pull request #116 from WDI-Ideas/PriyankaH
error resolved
2024-08-09 16:11:39 +05:30
Dakshesh42
ea5c5d1b72 error resolved 2024-08-09 16:10:55 +05:30
priyankahadpad
e176553b71 Merge pull request #115 from WDI-Ideas/PriyankaH
new data added
2024-08-09 15:59:18 +05:30
Dakshesh42
51d3aa44ec new data added 2024-08-09 15:58:10 +05:30
priyankahadpad
d6f70f34d0 Merge pull request #114 from WDI-Ideas/PriyankaH
postdetail pin api done
2024-08-09 15:48:01 +05:30
Dakshesh42
ce2f658196 postdetail pin api done 2024-08-09 15:47:34 +05:30
priyankahadpad
083a6a0ff3 Merge pull request #113 from WDI-Ideas/PriyankaH
post id added to all tab in community
2024-08-09 13:28:16 +05:30
Dakshesh42
a338f3f972 post id added to all tab in community 2024-08-09 13:27:27 +05:30
priyankahadpad
a1b2021b77 Merge pull request #112 from WDI-Ideas/PriyankaH
post detail api done.
2024-08-09 13:14:29 +05:30
Dakshesh42
89e98279ac post detail api done. 2024-08-09 13:13:58 +05:30
Shubham Shetty
bda76db16f Merge pull request #111 from WDI-Ideas/tagspopchanges
tags field shown in popular tab and also reaction button error resolv…
2024-08-09 13:13:31 +05:30
Shubhamshirva
96269b8a36 tags field shown in popular tab and also reaction button error resolved added is once 2024-08-09 13:12:58 +05:30
priyankahadpad
ef5472cf64 Merge pull request #110 from WDI-Ideas/PriyankaH
id taken from community
2024-08-08 19:44:03 +05:30
Dakshesh42
f6cdfcd051 id taken from community 2024-08-08 19:42:32 +05:30
Shubham Shetty
a94680b572 Merge pull request #109 from WDI-Ideas/tagsFeatureShubham
fixes for feed tab done
2024-08-08 19:26:59 +05:30
Shubhamshirva
13d1b06449 fixes for feed tab done 2024-08-08 19:26:16 +05:30
priyankahadpad
1f41b5ab3a Merge pull request #108 from WDI-Ideas/PriyankaH
populattab api integration
2024-08-08 19:16:19 +05:30
Dakshesh42
0a2ffa53df conflict resolved 2024-08-08 19:16:05 +05:30
Dakshesh42
6aea13e959 populattab api integration 2024-08-08 19:05:36 +05:30
Shubham Shetty
f260eaaad0 Merge pull request #107 from WDI-Ideas/tagspopular
tags popular done fixes in feed tab and create post screen
2024-08-08 18:56:07 +05:30
Shubham Shetty
c94a405623 Merge branch 'main' into tagspopular 2024-08-08 18:55:58 +05:30
Shubhamshirva
255faca290 tags popular done fixes in feed tab and create post screen 2024-08-08 18:52:09 +05:30
Kishan Bhuta
8f6682f969 Merge pull request #106 from WDI-Ideas/commentTree
comment tree completed
2024-08-08 18:50:55 +05:30
Kishan Bhuta
b2f48c3ea8 Merge branch 'main' into commentTree 2024-08-08 18:50:48 +05:30
kishan
bd9aedb5de comment tree completed 2024-08-08 18:45:38 +05:30
priyankahadpad
81dc824c49 Merge pull request #105 from WDI-Ideas/PriyankaH
reaction screen bug and conflict fixed
2024-08-08 12:12:55 +05:30
Dakshesh42
574b7c22b8 reaction screen bug and conflict fixed 2024-08-08 12:11:45 +05:30
Shubham Shetty
ff08056369 Merge pull request #103 from WDI-Ideas/tagsdetails
tag detail page done only latest tab completed save and pin for lates…
2024-08-07 20:05:05 +05:30
Shubhamshirva
d9a21f280f tag detail page done only latest tab completed save and pin for latest also done 2024-08-07 20:04:18 +05:30
priyankahadpad
5b47ae3105 Merge pull request #102 from WDI-Ideas/Development
community tab error fixed
2024-08-06 19:18:37 +05:30
Dakshesh42
7db4700353 community tab error fixed 2024-08-06 19:17:36 +05:30
Shubham Shetty
3e5e8a472d Merge pull request #101 from WDI-Ideas/likepost
like post done for latest tab in this like post is done but on click …
2024-08-06 18:42:47 +05:30
Shubhamshirva
27acf919db conflicts resolved 2024-08-06 18:42:09 +05:30
Shubhamshirva
48a15229eb like post done for latest tab in this like post is done but on click of again removing like it is not shown unless page is refreshed again 2024-08-06 18:01:24 +05:30
Kishan Bhuta
b81fcb6b75 Merge pull request #100 from WDI-Ideas/commentTree
common comment tree
2024-08-06 17:20:26 +05:30
WDIPL
3e30fd545a common comment tree 2024-08-06 17:11:40 +05:30
diptimhabadi351
eda3416d4b Merge pull request #99 from WDI-Ideas/dipti
intigrated fetch-like-post api
2024-08-06 10:34:55 +05:30
jayesh
9d436c2a74 intigrated fetch-like-post api 2024-08-06 10:31:43 +05:30
priyankahadpad
c03cfe1dbc Merge pull request #98 from WDI-Ideas/Development
onboard flow api done.
2024-08-02 19:53:39 +05:30
Dakshesh42
2863f827a6 onboard flow api done. 2024-08-02 19:52:50 +05:30
diptimhabadi351
63bcd725e8 Merge pull request #97 from WDI-Ideas/dipti
feed and latest fixed
2024-08-02 18:49:18 +05:30
jayesh
044f216900 conflict fixed 2024-08-02 18:48:58 +05:30
jayesh
1a03b61b6f feed and latest fixed 2024-08-02 18:43:12 +05:30
Shubham Shetty
838142308d Merge pull request #96 from WDI-Ideas/pinsidebar
pin for sidebar and unpin done
2024-08-02 17:31:40 +05:30
Shubhamshirva
2a7c866639 pin for sidebar and unpin done 2024-08-02 17:30:58 +05:30
Kishan Bhuta
b2b2b1d6eb Merge pull request #95 from WDI-Ideas/k25july
K25july
2024-08-01 18:50:40 +05:30
kishan06
18886dc6c0 conflict fixed for comment tree 2024-08-01 18:50:04 +05:30
kishan06
0ce1719179 comment tree added 2024-08-01 17:57:15 +05:30
Shubham Shetty
ac60eaecff Merge pull request #94 from WDI-Ideas/Communitypost
community post completed for individual and business
2024-08-01 17:56:17 +05:30
Shubhamshirva
857721abf9 conflicts resolved in post method for community 2024-08-01 17:55:42 +05:30
Shubhamshirva
a5e52eae4f Merge branch 'main' of https://github.com/WDI-Ideas/Regroup_flutter into Communitypost 2024-08-01 17:53:30 +05:30
Shubhamshirva
01cb284b43 community post completed for individual and business 2024-08-01 17:52:40 +05:30
priyankahadpad
dad5d8d9cf Merge pull request #93 from WDI-Ideas/Development
minor changes
2024-08-01 16:00:54 +05:30
Dakshesh42
93e07b3cc0 minor changes 2024-08-01 15:59:47 +05:30
diptimhabadi351
053048de06 Merge pull request #92 from WDI-Ideas/dipti
deleted duplicate community
2024-08-01 15:58:43 +05:30
jayesh
dd47ae3508 deleted duplicate community 2024-08-01 15:57:30 +05:30
priyankahadpad
a556d104c7 Merge pull request #91 from WDI-Ideas/Development
ui changes of onboard done
2024-08-01 15:22:50 +05:30
priyankahadpad
2b9755c4b9 Merge branch 'main' into Development 2024-08-01 15:22:43 +05:30
Dakshesh42
716c2c219b ui changes of onboard done 2024-08-01 15:21:47 +05:30
diptimhabadi351
b9c929c7f0 Merge pull request #90 from WDI-Ideas/dipti
revert changes of community latest post api
2024-08-01 15:21:15 +05:30
jayesh
e77c766fa0 revert changes of community latest post api 2024-08-01 15:19:34 +05:30
diptimhabadi351
30f05268e5 Merge pull request #89 from WDI-Ideas/dipti
merge this branch i have taken pull
2024-08-01 13:58:32 +05:30
jayesh
1fd6475a9d merge this branch i have taken pull 2024-08-01 13:57:46 +05:30
diptimhabadi351
8f045d0d22 Merge pull request #88 from WDI-Ideas/dipti
changes
2024-08-01 13:49:18 +05:30
jayesh
5a08469415 Conflict resolve 2024-08-01 13:47:08 +05:30
priyankahadpad
67bd9b0a6a Merge pull request #87 from WDI-Ideas/Development
changes all glassmorphism with glassUi
2024-08-01 13:45:15 +05:30
Dakshesh42
26e997447c conflict resolved 2024-08-01 13:45:01 +05:30
Dakshesh42
2dcae88e7e changes all glassmorphism with glassUi 2024-08-01 13:35:58 +05:30
jayesh
00c9683f10 changes 2024-08-01 13:33:57 +05:30
Kishan Bhuta
1f33ab55bc Merge pull request #86 from WDI-Ideas/k25july
code cleaning
2024-07-31 16:08:52 +05:30
kishan06
9bd0f3affc code cleaning 2024-07-31 16:08:23 +05:30
Kishan Bhuta
84239f52ba Merge pull request #85 from WDI-Ideas/k25july
K25july
2024-07-30 18:01:35 +05:30
kishan06
d9d04996b5 conflic fixed 2024-07-30 18:00:54 +05:30
priyankahadpad
76c29fafcd Merge pull request #84 from WDI-Ideas/Development
Development
2024-07-30 13:57:20 +05:30
kishan06
55f2b4673a minor change 2024-07-30 13:57:12 +05:30
cj201199
e62c3dc8c1 null check bug fixed 2024-07-30 13:56:49 +05:30
cj201199
15a991687d minor changes done 2024-07-29 20:32:34 +05:30
priyankahadpad
b470d63819 Merge pull request #83 from WDI-Ideas/Development
minor changes done
2024-07-29 20:16:47 +05:30
cj201199
5d16e5b8b8 minor changes done 2024-07-29 20:16:05 +05:30
Shubham Shetty
3c4c2fce6c Merge pull request #82 from WDI-Ideas/pro29
bugs resolved
2024-07-29 20:12:07 +05:30
Shubhamshirva
a58f91ba99 bugs resolved 2024-07-29 20:11:26 +05:30
Shubham Shetty
e0759e5df7 Merge pull request #81 from WDI-Ideas/newchanges29
some fixes in edit page
2024-07-29 19:09:25 +05:30
Shubhamshirva
6ecc937d09 conflicts resolved 2024-07-29 19:08:34 +05:30
Shubhamshirva
728d8676f7 some fixes in edit page 2024-07-29 19:07:00 +05:30
Kishan Bhuta
8714ffeb6d Merge pull request #80 from WDI-Ideas/k25july
login and minor bug fix
2024-07-29 19:05:07 +05:30
kishan06
5b92d23bcb conflict fixes 2024-07-29 19:04:42 +05:30
kishan06
97e3928963 login and minor bug fix 2024-07-29 19:02:59 +05:30
priyankahadpad
f45aeebfd8 Merge pull request #79 from WDI-Ideas/Development
bug fixing done
2024-07-29 18:58:53 +05:30
cj201199
875fa240fb bug fixing done 2024-07-29 18:58:17 +05:30
Kishan Bhuta
9eaf857dcf Merge pull request #78 from WDI-Ideas/k25july
interest bug fix
2024-07-29 17:22:54 +05:30
kishan06
092e8b77ed interest bug fix 2024-07-29 17:22:31 +05:30
priyankahadpad
0e21f2d37a Merge pull request #77 from WDI-Ideas/Development
minor bug fix
2024-07-29 16:52:54 +05:30
cj201199
295b74b6e2 minor bug fix 2024-07-29 16:52:25 +05:30
259 changed files with 24155 additions and 10308 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

BIN
assets/images/png/add 1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

1
devtools_options.yaml Normal file
View File

@@ -0,0 +1 @@
extensions:

View File

@@ -64,7 +64,7 @@ PODS:
- firebase_core (2.32.0):
- Firebase/CoreOnly (= 10.25.0)
- Flutter
- FirebaseAppCheckInterop (10.28.0)
- FirebaseAppCheckInterop (10.29.0)
- FirebaseAuth (10.25.0):
- FirebaseAppCheckInterop (~> 10.17)
- FirebaseCore (~> 10.0)
@@ -76,12 +76,14 @@ PODS:
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
- FirebaseCoreInternal (10.28.0):
- 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
@@ -130,10 +132,10 @@ PODS:
- GTMAppAuth (4.1.1):
- AppAuth/Core (~> 1.7)
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
- GTMSessionFetcher (3.4.1):
- GTMSessionFetcher/Full (= 3.4.1)
- GTMSessionFetcher/Core (3.4.1)
- GTMSessionFetcher/Full (3.4.1):
- GTMSessionFetcher (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
@@ -149,9 +151,9 @@ PODS:
- Flutter
- PromisesObjC (2.4.0)
- RecaptchaInterop (100.0.0)
- SDWebImage (5.19.2):
- SDWebImage/Core (= 5.19.2)
- SDWebImage/Core (5.19.2)
- SDWebImage (5.19.4):
- SDWebImage/Core (= 5.19.4)
- SDWebImage/Core (5.19.4)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
@@ -169,6 +171,7 @@ DEPENDENCIES:
- 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`)
@@ -222,6 +225,8 @@ EXTERNAL SOURCES:
: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:
@@ -259,12 +264,13 @@ SPEC CHECKSUMS:
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
firebase_auth: 5719ddc9f654b813405899480e84971bd8e61235
firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197
FirebaseAppCheckInterop: 5315f40293191bfec04b2cfab0215760e441540a
FirebaseAppCheckInterop: 6a1757cfd4067d8e00fccd14fcc1b8fd78cfac07
FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698
FirebaseCoreInternal: df84dd300b561c27d5571684f389bf60b0a5c934
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_facebook_auth: c8700ab1770f3d8e5e7456220e4f3bbcdb831454
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
google_maps_flutter_ios: d1318b4ff711612cab16862d7a87e31a7403d458
@@ -273,7 +279,7 @@ SPEC CHECKSUMS:
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
image_cropper: 2c150b3d63f4feaad31054d20381ddac0a460e63
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
@@ -281,7 +287,7 @@ SPEC CHECKSUMS:
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
SDWebImage: 066c47b573f408f18caa467d71deace7c0f8280d
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4

View File

@@ -8,13 +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 */
@@ -31,16 +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; };
@@ -49,7 +50,6 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
DC7FC30109CCD5376F6BFA0F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -57,7 +57,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2105BA461347F33698D3FD7B /* Pods_Runner.framework in Frameworks */,
CA23128F3D22F12344F34510 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -67,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>";
@@ -92,8 +92,8 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
01448FBCAC46C16EC8BC1181 /* Pods */,
DE8E73CF7AB07643531FB23E /* Frameworks */,
D4274500C33C54346ECA2D49 /* GoogleService-Info.plist */,
F4C62E65C792A2B03ABD303E /* Frameworks */,
);
sourceTree = "<group>";
};
@@ -121,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>";
@@ -136,23 +136,21 @@
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 = (
);
dependencies = (
);
name = Runner;
packageProductDependencies = (
);
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
@@ -181,8 +179,6 @@
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -208,24 +204,7 @@
/* 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 = (
@@ -263,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 = (
@@ -295,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 */

View 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;
// }
// }

View File

@@ -12,10 +12,7 @@ Widget commonGlassContainer({
double opacity2 = 0.05,
Color borderColor = const Color(0xff434A53),
}) {
return
GlassmorphicContainer(
return GlassmorphicContainer(
width: width,
height: height,
borderRadius: borderradius,
@@ -85,7 +82,7 @@ Widget commonGlassContainerblue({
Widget commonGlassUIBlue({
required double width,
required double height,
required double? height,
required Widget customWidget,
// required double border,
double mainOpacity = 1,
@@ -116,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,
@@ -150,7 +147,7 @@ Widget commonGlassUI({
Widget commonContainer({
required double width,
required double height,
required double? height,
// required double border,
// double mainOpacity = 1,
double opacity1 = 0.04,

View File

@@ -22,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(
@@ -185,7 +185,8 @@ Future<TimeOfDay?> showCustomTimePicker(BuildContext context,
onSurface: Colors.white,
),
textTheme: Theme.of(context).textTheme.copyWith(
titleLarge: const TextStyle(color: Colors.blue), // Change the title color
titleLarge:
const TextStyle(color: Colors.blue), // Change the title color
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
@@ -247,7 +248,8 @@ Widget stackContainers({
width: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: const Color(0xFF2C3742), width: 1),
border: Border.all(
color: const Color(0xFF2C3742), width: 1),
),
child: CircleAvatar(
foregroundImage: AssetImage(containerImages[index]),
@@ -272,7 +274,7 @@ Widget stackContainersGroups({
const maxImagesToShow = 3;
// Calculate the number of images to show and the remaining count
final remainingCount = containerImages.length - maxImagesToShow;
// final remainingCount = containerImages.length - maxImagesToShow;
final imagesToShow = containerImages.take(maxImagesToShow).toList();
return Row(
@@ -280,27 +282,34 @@ Widget stackContainersGroups({
Stack(
clipBehavior: Clip.none,
children: [
Container(
height: 30,
width: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: const Color(0xFFD90B2E),
border: Border.all(color: const Color(0xFF2C3742), width: 1),
),
child: Center(
child: Text(
remainingCount > 0 ? '+$remainingCount' : '',
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w400,
fontSize: 8,
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: 22.w,
left: containerImages.length > maxImagesToShow ? 22.w : 0.w,
child: SizedBox(
height: 30,
width: 30 * maxImagesToShow.toDouble(),
@@ -314,7 +323,8 @@ Widget stackContainersGroups({
width: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: const Color(0xFF2C3742), width: 1),
border: Border.all(
color: const Color(0xFF2C3742), width: 1),
),
child: CircleAvatar(
backgroundImage: NetworkImage(imagesToShow[index]),
@@ -395,7 +405,8 @@ Widget stackReaction({
1,
],
),
border: Border.all(color: const Color(0xFF1E3A46), width: 1.71)),
border: Border.all(
color: const Color(0xFF1E3A46), width: 1.71)),
child: Center(
child: Image.asset(
containerImages[index],

View 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';
}
}
}

View 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();
}
}

View File

@@ -84,6 +84,38 @@ class ApiUrls {
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";
@@ -91,14 +123,17 @@ class ApiUrls {
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";
@@ -112,4 +147,55 @@ class ApiUrls {
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";
}

View File

@@ -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/EditProfile/View/ProfileTab.dart';
class MainController extends GetxController {
var selectedIndex = 0.obs;

View File

@@ -2,11 +2,24 @@ 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(() {

View 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),
]),
),
],
)),
);
}
}

View File

@@ -6,6 +6,8 @@ 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;
@@ -16,9 +18,8 @@ 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{\$%^^&&'));
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) {
@@ -27,7 +28,6 @@ class NetworkApiServices {
Response response;
SharedPreferences prefs = await SharedPreferences.getInstance();
token = prefs.getString('access-token');
print("url is $url");
log(token.toString());
try {
@@ -52,7 +52,40 @@ class NetworkApiServices {
),
);
} on Exception catch (e) {
log(e.toString());
// 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);
}
@@ -190,20 +223,39 @@ class NetworkApiServices {
);
}
if (e.response!.statusCode == 401) {
prefs.remove('token');
prefs.remove('refreshToken');
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,
);
// 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 {
}
// 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);

File diff suppressed because it is too large Load Diff

View File

@@ -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: const 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: [
const CommonTabBar(tabs: [
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: const Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
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: () {},
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",
),
),
const 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: SizedBox(
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'
]),
),
const 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: const Size(45, 45),
boxPadding: const EdgeInsets.all(8),
boxAnimationDuration: const Duration(milliseconds: 200),
itemAnimationDuration: const Duration(milliseconds: 500),
hoverDuration: const Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
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')
],
);
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -1,491 +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/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: const Color(0xFF222935),
extendBody: true,
appBar: const 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: const 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: const EdgeInsets.only(top: 15, bottom: 15),
child: Row(
children: <Widget>[
Expanded(
child: CustomTextFormField(
hintText: "Add comment",
suffixIcon: SizedBox(
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),
const Spacer(),
commonGlassContainer(
width: 72.w,
height: 26.h,
borderradius: 5.r,
borderColor: const Color(0xFFD90B2E),
customWidget:
Center(child: text14400white("Follow")),
border: 1),
sizedBoxWidth(6.w),
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: () {},
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",
),
),
const 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: const Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
),
],
),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: SizedBox(
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'
]),
const 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: const Size(45, 45),
boxPadding: const EdgeInsets.all(8),
boxAnimationDuration:
const Duration(milliseconds: 200),
itemAnimationDuration:
const Duration(milliseconds: 500),
hoverDuration: const Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
],
),
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: const 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')
],
);
}
}

View File

@@ -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: const Color(0xFF222935),
extendBody: true,
appBar: const 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: [
const Tab(
text: 'All',
),
Tab(
child: Row(children: [
commonGlassContainer(
borderColor: const 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),
const Spacer(),
text14400white("110K"),
]),
),
Tab(
child: Row(children: [
commonGlassContainer(
borderColor: const 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),
const Spacer(),
text14400white("9.7K"),
]),
),
Tab(
child: Row(children: [
commonGlassContainer(
borderColor: const 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),
const 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: const Color(0xFF1E3A46),
border: Border.all(
color: const 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),
],
),
);
}
}

View File

@@ -1,355 +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_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.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/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: const Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: const 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: const [7, 4],
borderType: BorderType.RRect,
radius: Radius.circular(14.r),
color: const Color(0xFF434A53),
child: commonGlassUI(
width: double.infinity,
height: 130.h,
borderRadius: BorderRadius.circular(10.r),
borderColor: Colors.transparent,
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: const Color(0xFF7E7E7E),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
5)),
),
child: const 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: const [
"#Race",
"#Swimming",
"#Cycle",
"#Swimming",
"#Race"
],
rowData: const [
"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: const 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: const ['Individual', 'Anonymous'],
onItemSelected: (p0) {},
leadingImage: const SizedBox()),
// CommonDropdownradioBtn(
// hint: '', items: ['Individual', 'Anonymous']),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Post in"),
sizedBoxHeight(18.h),
CustomDropDownCheckBox(
header: "",
title: "",
listData: const [
'Active alliance network',
'Fitfam federation',
'The athletic town',
'Football fever'
],
onItemSelected: (p0) {},
images: const [
'assets/images/png/Rectangle 65.png',
'assets/images/png/Rectangle 66.png',
'assets/images/png/Rectangle 60.png',
'assets/images/png/Rectangle 68.png'
],
leadingImage: const 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: const 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: const 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)
? const Color(0xFFD90B2E).withOpacity(0.4)
: const Color(0xFFFFFFFF).withOpacity(0.2),
borderRadius: BorderRadius.circular(30),
border: Border.all(color: const Color(0xFFD90B2E), width: 1)),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Center(child: text14w400_FCFCFC(text)),
),
),
);
});
}
}

View File

@@ -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) {}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -1,940 +0,0 @@
import 'dart:developer';
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide MultipartFile, FormData;
import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/View/picturecontroller/indiprofileimagecontroller.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/InterestApiList.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:path/path.dart' as path;
import 'package:regroup/resources/routes/route_name.dart';
class EditProfile extends StatefulWidget {
const EditProfile({super.key});
@override
State<EditProfile> createState() => _EditProfileState();
}
//location in normal profile individual api
class _EditProfileState extends State<EditProfile> {
TextEditingController fullNameController = TextEditingController();
TextEditingController userNameController = TextEditingController();
TextEditingController dateController = TextEditingController();
TextEditingController locationController = TextEditingController();
TextEditingController aboutController = TextEditingController();
TextEditingController positionController = TextEditingController();
TextEditingController trainingScoresController = TextEditingController();
TextEditingController heightController = TextEditingController();
TextEditingController weightController = TextEditingController();
TextEditingController battingAvgController = TextEditingController();
String profilePicture = "";
bool isImageAdded = false;
bool isOnce = true;
late Future myfuture;
convertFileToMultiPart1(String? file) async {
return await MultipartFile.fromFile(
file!,
filename: path.basename(file),
);
}
String extractFileName1(String filePath) {
return path.basename(filePath);
}
String _selectedgenderType = '';
void _onItemSelected(String value) {
setState(() {
_selectedgenderType = value;
});
}
List<int> selectedinterestid = [];
RxBool isloading = true.obs;
void getCatIdFromName(List<String> selectedInterests) {
selectedinterestid.clear();
for (var name in selectedInterests) {
for (var i = 0; i < interestlistobj!.data!.length; i++) {
if (name == interestlistobj!.data![i].name) {
selectedinterestid.add(interestlistobj!.data![i].id!);
break;
}
}
}
}
@override
void initState() {
myfuture = EditProfileApi()
.getEditProfileIndividual()
.then((value) => {setValues()});
super.initState();
}
setValues() async {
if (isOnce) {
fullNameController.text = getEditProfileIndi!.data!.fullName ?? '';
userNameController.text = getEditProfileIndi!.data!.userName ?? '';
dateController.text = getEditProfileIndi!.data!.dateOfBirth ?? '';
_selectedgenderType = getEditProfileIndi!.data!.gender ?? '';
locationController.text = getEditProfileIndi!.data!.location ?? '';
locationController.text = getEditProfileIndi!.data!.about ?? '';
aboutController.text = getEditProfileIndi!.data!.about ?? '';
positionController.text =
getEditProfileIndi!.data!.position ?? 'Lorem lpsum';
trainingScoresController.text =
getEditProfileIndi!.data!.trainingScores ?? '50';
heightController.text = getEditProfileIndi!.data!.height ?? '6 feet';
weightController.text = getEditProfileIndi!.data!.weight ?? '70kg';
battingAvgController.text =
getEditProfileIndi!.data!.battingAverage ?? '372';
isOnce = false;
setState(() {});
}
}
void saveEditProfileInd() async {
utils.loader();
FormData? updata;
var imageFile;
String abilitiesIds = selectedinterestid.toString();
print("Interests String: $abilitiesIds");
if (editProfileImage.usserprofilePicPath.value.isNotEmpty) {
imageFile = await MultipartFile.fromFile(
editProfileImage.usserprofilePicPath.value,
filename: path.basename(profilePicture),
);
print(imageFile.toString());
}
updata = FormData.fromMap({
// "email_address": "priyanka14@yopmail.com",
"full_name": fullNameController.text,
"profile_image":
editProfileImage.usserprofilePicPath.isNotEmpty ? imageFile : null,
// profilePicture.isNotEmpty
// ? await convertFileToMultiPart1(profilePicture)
// : null,
// "profile_image": "ghjkk.png",
"user_name": userNameController.text,
"date_of_birth": dateController.text,
"gender": _selectedgenderType,
// "interest": "selectedSportsIds",
"interest":
// '[1,2,3,4]',
abilitiesIds,
"about": aboutController.text,
"position": positionController.text,
"training_scores": trainingScoresController.text,
"height": heightController.text,
"weight": weightController.text,
"batting_average": battingAvgController.text,
"address_line1": battingAvgController.text,
});
log(updata.toString());
print(imageFile.toString());
final data = await EditProfileApi().postEditProfileIndividual(updata);
if (data.status == ResponseStatus.SUCCESS) {
Get.back();
Get.toNamed(RouteName.mainscreen, arguments: 4);
} else {
Get.back();
// btnController.reset();
Get.snackbar(
"Error!",
data.data['message'],
duration: const Duration(seconds: 2),
colorText: Colors.white,
backgroundColor: Colors.red,
margin: const EdgeInsets.all(8),
snackStyle: SnackStyle.FLOATING,
snackPosition: SnackPosition.BOTTOM,
);
// _controller.isTextFieldEnabled.value = true;
}
}
final UserIndiProfileImageController editProfileImage =
Get.put(UserIndiProfileImageController());
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
child: Scaffold(
backgroundColor: const Color(0xFF222935),
extendBody: true,
appBar: const CommonAppbar(
titleTxt: "",
),
body: FutureBuilder(
future: myfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
print("Data fetched-->");
return Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(children: [
sizedBoxHeight(25.h),
Stack(
children: [
Obx(
() => editProfileImage
.usserprofilePicPath.value !=
''
? ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(50.r),
child: editProfileImage
.usserprofilePicPath
.value !=
''
? Image(
// File(profilePicture),
image: FileImage(
File(
editProfileImage
.usserprofilePicPath
.value,
),
),
fit: BoxFit.cover,
width: double.infinity,
errorBuilder:
(BuildContext
context,
Object
exception,
StackTrace?
stackTrace) {
return CircleAvatar(
backgroundImage:
const AssetImage(
"assets/images/png/cimg3.png"),
radius: 50.r,
);
},
)
: Image.asset(
'assets/images/png/cimg3.png')),
)
: ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(60.r),
child: getEditProfileIndi!.data!
.profilePhoto !=
null
? ClipOval(
child:
SizedBox.fromSize(
size: Size.fromRadius(
25.r),
child: CircleAvatar(
backgroundImage:
NetworkImage(
getEditProfileIndi!
.data!
.profilePhoto!),
radius: 25.r,
),
),
)
: Image.asset(
"assets/images/blank-profile-picture-973460_1280.png")),
),
),
Positioned(
bottom: 0,
right: 0,
child: InkWell(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
true,
(result) {
// var filenameresult =
// extractFileName1(result);
editProfileImage
.usserprofilePicPath
.value = result;
var filenameresult =
extractFileName1(result);
print(
"File name is $filenameresult");
profilePicture = result;
isImageAdded = true;
setState(() {});
},
);
},
child: Container(
height: 35.h,
width: 35.w,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFD90B2E)),
child: Center(
child: Image.asset(
"assets/images/png/cameraicon2.png",
height: 19.h,
width: 19.w,
),
),
),
))
],
),
sizedBoxHeight(15.h),
text16400white("Edit profile picture"),
sizedBoxHeight(20.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16400white("Full name"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: fullNameController,
leadingIcon: Container(
width: 18.w,
height: 17.h,
child: Center(
child: Image.asset(
"assets/images/png/Frame 24.png",
width: 18.w,
height: 17.h,
),
),
),
hintText: "Edward Hackett",
),
sizedBoxHeight(20.h),
text16400white("User name"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: userNameController,
leadingIcon: Container(
width: 18.w,
height: 17.h,
child: Center(
child: Image.asset(
"assets/images/png/Frame 24.png",
width: 18.w,
height: 17.h,
),
),
),
hintText: "edward_01",
),
sizedBoxHeight(20.h),
text16400white("Date of birth"),
sizedBoxHeight(16.h),
GestureDetector(
onTap: () =>
datePicker(context, dateController),
child: AbsorbPointer(
child: CustomTextFormField(
leadingIcon: Container(
width: 18.0,
height: 17.0,
child: Center(
child: Image.asset(
"assets/images/png/calender.png",
width: 18.0,
height: 17.0,
),
),
),
hintText: "12-04-2024",
textEditingController: dateController,
),
),
),
sizedBoxHeight(20.h),
text16400white("Gender"),
sizedBoxHeight(16.h),
CustomDropDownRadio(
initialSelectedValue: _selectedgenderType,
header: _selectedgenderType ?? "Male",
title: "",
showOtherOption: true,
listData: const [
"Male",
"Female",
"Prefer not to say"
],
onItemSelected: _onItemSelected,
leadingImage: Image.asset(
"assets/images/png/Vector ws.png",
width: 18.w,
height: 17.h,
),
),
sizedBoxHeight(25.h),
Row(
children: [
text16400white("Location"),
sizedBoxWidth(6.w),
Image.asset(
"assets/images/png/octicon_question-24.png",
height: 16.h,
width: 16.w,
)
],
),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: locationController,
leadingIcon: Container(
width: 18.w,
height: 17.h,
child: Center(
child: Image.asset(
"assets/images/png/Group 58645.png",
width: 18.w,
height: 17.h,
),
),
),
hintText:
"Elm street london, United Kingdom",
),
sizedBoxHeight(20.h),
Row(
children: [
text16400white("Interests"),
sizedBoxWidth(6.w),
Image.asset(
"assets/images/png/octicon_question-24.png",
height: 16.h,
width: 16.w,
)
],
),
sizedBoxHeight(16.h),
//Obx(() {
//return
CustomDropDownChexkBox(
header: 'Select interest',
title: "",
listData: listofInterests,
onItemSelected: getCatIdFromName,
leadingImage: Image.asset(
"assets/images/png/Vector (4).png",
width: 18.w,
height: 17.h,
),
// showOtherOption: true,
initiallySelected: listofUserInterests,
),
// }),
sizedBoxHeight(20.h),
text16400white("About"),
sizedBoxHeight(16.h),
CustomTextFormField2(
textEditingController: aboutController,
hintText:
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
maxlines: 3,
),
// sizedBoxHeight(20.h),
text16400white("Position"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: positionController,
hintText: "Lorem Ipsum",
),
sizedBoxHeight(20.h),
text16400white("Training Scores"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController:
trainingScoresController,
hintText: "50",
),
sizedBoxHeight(20.h),
text16400white("Height"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: heightController,
hintText: "6 feet",
),
sizedBoxHeight(20.h),
text16400white("Weight"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: weightController,
hintText: "70kg",
),
sizedBoxHeight(20.h),
text16400white("Batting Average"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: battingAvgController,
hintText: "372",
),
sizedBoxHeight(20.h),
sizedBoxHeight(60.h),
CommonBtn(
text: "Save",
onTap: () {
if (fullNameController.text.isBlank! ||
userNameController.text.isBlank! ||
dateController.text.isBlank! ||
locationController.text.isBlank! ||
aboutController.text.isBlank! ||
positionController.text.isBlank! ||
trainingScoresController
.text.isBlank! ||
heightController.text.isBlank! ||
weightController.text.isBlank! ||
battingAvgController.text.isBlank!) {
Get.snackbar(
'Error',
'Please fill missing details',
snackPosition: SnackPosition.BOTTOM,
backgroundColor: Colors.red,
colorText: Colors.white,
);
}
// else if (profilePicture == "") {
// utils.showToast(
// 'Upload edit profile picture!');
// }
else {
print(selectedinterestid.toString());
saveEditProfileInd();
}
},
),
sizedBoxHeight(60.h),
],
)
])))
]);
}
return Container();
})),
);
// FutureBuilder(
// future: myfuture,
// builder: (ctx, snapshot) {
// if (snapshot.connectionState == ConnectionState.waiting) {
// return const Center(
// child: CircularProgressIndicator(
// color: Colors.blue,
// ),
// );
// }
// if (snapshot.hasError) {
// return Center(
// child: Text(
// '${snapshot.error} occurred',
// style: TextStyle(fontSize: 18.spMin),
// ),
// );
// }
// if (snapshot.connectionState == ConnectionState.done &&
// snapshot.hasData) {
// print("Data fetched-->");
// return Stack(children: [
// Container(
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage(
// "assets/images/png/Ellipse 1496.png"),
// fit: BoxFit.fill)),
// ),
// SingleChildScrollView(
// child: Padding(
// padding: const EdgeInsets.symmetric(horizontal: 16),
// child: Column(children: [
// sizedBoxHeight(25.h),
// Stack(
// children: [
// profilePicture != "" && isImageAdded
// ? ClipOval(
// child: SizedBox.fromSize(
// size: Size.fromRadius(50.r),
// child: Image.file(
// File(profilePicture),
// fit: BoxFit.cover,
// width: double.infinity,
// errorBuilder: (BuildContext context,
// Object exception,
// StackTrace? stackTrace) {
// return CircleAvatar(
// backgroundImage: const AssetImage(
// "assets/images/png/cimg3.png"),
// radius: 50.r,
// );
// },
// ),
// ),
// )
// : getEditProfileIndi?.data?.profilePhoto !=
// null &&
// getEditProfileIndi!
// .data!.profilePhoto!.isNotEmpty
// ? Container(
// width: 100.w,
// height: 100.h,
// decoration: ShapeDecoration(
// image: DecorationImage(
// image: NetworkImage(
// getEditProfileIndi!
// .data!.profilePhoto!,
// ),
// fit: BoxFit.cover,
// // onError: (error, stackTrace) {
// // // Fallback to default image in case of error
// // return const AssetImage("assets/images/png/cimg3.png");
// // },
// ),
// shape: const OvalBorder(),
// ),
// )
// : CircleAvatar(
// backgroundImage: const AssetImage(
// "assets/images/png/cimg3.png"),
// radius: 50.r,
// ),
// Positioned(
// bottom: 0,
// right: 0,
// child: InkWell(
// onTap: () {
// ImageUploadBottomSheet().showModal(
// context,
// true,
// (result) {
// var filenameresult =
// extractFileName1(result);
// profilePicture = result;
// isImageAdded = true;
// setState(() {});
// },
// );
// },
// child: Container(
// height: 35.h,
// width: 35.w,
// decoration: const BoxDecoration(
// shape: BoxShape.circle,
// color: Color(0xFFD90B2E)),
// child: Center(
// child: Image.asset(
// "assets/images/png/cameraicon2.png",
// height: 19.h,
// width: 19.w,
// ),
// ),
// ),
// ))
// ],
// ),
// sizedBoxHeight(15.h),
// text16400white("Edit profile picture"),
// sizedBoxHeight(20.h),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// text16400white("Full name"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: fullNameController,
// leadingIcon: Container(
// width: 18.w,
// height: 17.h,
// child: Center(
// child: Image.asset(
// "assets/images/png/Frame 24.png",
// width: 18.w,
// height: 17.h,
// ),
// ),
// ),
// hintText: "Edward Hackett",
// ),
// sizedBoxHeight(20.h),
// text16400white("User name"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: userNameController,
// leadingIcon: Container(
// width: 18.w,
// height: 17.h,
// child: Center(
// child: Image.asset(
// "assets/images/png/Frame 24.png",
// width: 18.w,
// height: 17.h,
// ),
// ),
// ),
// hintText: "edward_01",
// ),
// sizedBoxHeight(20.h),
// text16400white("Date of birth"),
// sizedBoxHeight(16.h),
// GestureDetector(
// onTap: () =>
// datePicker(context, dateController),
// child: AbsorbPointer(
// child: CustomTextFormField(
// leadingIcon: Container(
// width: 18.0,
// height: 17.0,
// child: Center(
// child: Image.asset(
// "assets/images/png/calender.png",
// width: 18.0,
// height: 17.0,
// ),
// ),
// ),
// hintText: "12-04-2024",
// textEditingController: dateController,
// ),
// ),
// ),
// sizedBoxHeight(20.h),
// text16400white("Gender"),
// sizedBoxHeight(16.h),
// CustomDropDownRadio(
// initialSelectedValue: _selectedgenderType,
// header: _selectedgenderType ?? "Male",
// title: "",
// showOtherOption: true,
// listData: [
// "Male",
// "Female",
// "Prefer not to say"
// ],
// onItemSelected: _onItemSelected,
// leadingImage: Image.asset(
// "assets/images/png/Vector ws.png",
// width: 18.w,
// height: 17.h,
// ),
// ),
// sizedBoxHeight(25.h),
// Row(
// children: [
// text16400white("Location"),
// sizedBoxWidth(6.w),
// Image.asset(
// "assets/images/png/octicon_question-24.png",
// height: 16.h,
// width: 16.w,
// )
// ],
// ),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: locationController,
// leadingIcon: Container(
// width: 18.w,
// height: 17.h,
// child: Center(
// child: Image.asset(
// "assets/images/png/Group 58645.png",
// width: 18.w,
// height: 17.h,
// ),
// ),
// ),
// hintText: "Elm street london, United Kingdom",
// ),
// sizedBoxHeight(20.h),
// Row(
// children: [
// text16400white("Interests"),
// sizedBoxWidth(6.w),
// Image.asset(
// "assets/images/png/octicon_question-24.png",
// height: 16.h,
// width: 16.w,
// )
// ],
// ),
// sizedBoxHeight(16.h),
// // CustomDropDownChexkBox(
// // header: _selectedsportType ??
// // "Rowing, Rugby, Swimming",
// // title: "",
// // listData: [
// // "Rowing",
// // "Cycling",
// // "Running",
// // "Swimming",
// // "Triathlon",
// // "Hiking",
// // "Football",
// // "Rugby"
// // ],
// // onItemSelected: _onSportSelected,
// // leadingImage: Image.asset(
// // "assets/images/png/Vector (4).png",
// // width: 18.w,
// // height: 17.h,
// // ),
// // showOtherOption: true,
// // initiallySelected: _selectedSports,
// // ),
// // CustomDropDownRadio(
// // showOtherOption: true,
// // header: _selectedsportType ??
// // "Rowing, Rugby, Swimming",
// // title: "",
// // listData: [
// // "Rowing",
// // "Cycling",
// // "Running",
// // "Swimming",
// // "Triathlon",
// // "Hiking",
// // "Football",
// // "Rugby"
// // ],
// // onItemSelected: _onSportSelected,
// // leadingImage: Image.asset(
// // "assets/images/png/Vector (4).png",
// // width: 18.w,
// // height: 17.h,
// // ),
// // ),
// sizedBoxHeight(20.h),
// text16400white("About"),
// sizedBoxHeight(16.h),
// CustomTextFormField2(
// textEditingController: aboutController,
// hintText:
// "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
// maxlines: 3,
// ),
// // sizedBoxHeight(20.h),
// text16400white("Position"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: positionController,
// hintText: "Lorem Ipsum",
// ),
// sizedBoxHeight(20.h),
// text16400white("Training Scores"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController:
// trainingScoresController,
// hintText: "50",
// ),
// sizedBoxHeight(20.h),
// text16400white("Height"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: heightController,
// hintText: "6 feet",
// ),
// sizedBoxHeight(20.h),
// text16400white("Weight"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: weightController,
// hintText: "70kg",
// ),
// sizedBoxHeight(20.h),
// text16400white("Batting Average"),
// sizedBoxHeight(16.h),
// CustomTextFormField(
// textEditingController: battingAvgController,
// hintText: "372",
// ),
// sizedBoxHeight(20.h),
// sizedBoxHeight(60.h),
// CommonBtn(
// text: "Save",
// onTap: () {
// saveEditProfileInd();
// },
// ),
// sizedBoxHeight(60.h),
// ],
// )
// ])))
// ]);
// }
// return Container();
// }));
}
}

View File

@@ -6,12 +6,11 @@ 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/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Model/timelineabilityModel.dart'
as timelineabilist;
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/gettimelineability.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
import 'package:regroup/Main_Screens/ProfileTab/Model/timelineabilityModel.dart' as timelineabilist;
import 'package:regroup/Main_Screens/ProfileTab/view_model/gettimelineability.dart';
import 'package:regroup/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
import 'package:regroup/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
@@ -23,7 +22,6 @@ import 'package:regroup/resources/routes/route_name.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
import 'package:intl/intl.dart';
import 'package:async/src/future_group.dart';
import 'package:shared_preferences/shared_preferences.dart';
class AddTimeline extends StatefulWidget {
const AddTimeline({super.key});
@@ -276,7 +274,7 @@ class _AddTimelineState extends State<AddTimeline> {
hintText: 'Enter club name',
validator: (value) {
if (value!.isEmpty) {
return 'Enter your full name ';
return 'Enter your club name ';
}
return null;
},
@@ -288,16 +286,16 @@ class _AddTimelineState extends State<AddTimeline> {
],
),
sizedBoxHeight(25.h),
text16400white("Role in the club"),
text16400white("Role in "),
sizedBoxHeight(15.h),
CustomTextFormField(
textEditingController:
rollnameController,
texttype: TextInputType.text,
hintText: 'Enter role in club',
hintText: 'Enter role in the club',
validator: (value) {
if (value!.isEmpty) {
return 'Enter role in club';
return 'Enter role in the club';
}
return null;
},
@@ -404,9 +402,9 @@ class _AddTimelineState extends State<AddTimeline> {
Row(
children: [
Obx(() {
return commonGlassContainer(
border: 1,
borderradius: 2,
return commonGlassUI(
borderwidth: 1,
borderRadius: BorderRadius.circular(2),
height: 20.h,
width: 20.w,
opacity1: 0.24,
@@ -568,10 +566,10 @@ class _AddTimelineState extends State<AddTimeline> {
textEditingController:
rollnameController,
texttype: TextInputType.text,
hintText: 'Enter role in club',
hintText: 'Enter role in the club',
validator: (value) {
if (value!.isEmpty) {
return 'Enter role in club';
return 'Enter role in the club';
}
return null;
},
@@ -678,9 +676,9 @@ class _AddTimelineState extends State<AddTimeline> {
Row(
children: [
Obx(() {
return commonGlassContainer(
border: 1,
borderradius: 2,
return commonGlassUI(
borderwidth: 1,
borderRadius: BorderRadius.circular( 2),
height: 20.h,
width: 20.w,
opacity1: 0.24,
@@ -817,153 +815,6 @@ class _CustomDropDownCheckBoxTimelineState
.addAll(widget.initiallySelected); // Initialize selectedValues
}
// List<DropdownMenuItem<String>> _buildDropdownMenuItems() {
// List<DropdownMenuItem<String>> items =
// widget.listData.asMap().entries.map((entry) {
// int index = entry.key;
// String item = entry.value;
// return DropdownMenuItem<String>(
// value: item,
// child: InkWell(
// onTap: () {
// setState(() {
// if (selectedValues.contains(item)) {
// selectedValues.remove(item);
// } else {
// selectedValues.add(item);
// }
// _textController.clear();
// widget.onItemSelected(
// selectedValues.toList()); // Convert RxList to List
// });
// },
// child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Row(
// children: [
// Obx(() {
// return Checkbox(
// value: selectedValues.contains(item),
// activeColor: Colors.white,
// checkColor: const Color(0xFFD90B2E),
// onChanged: (bool? value) {
// setState(() {
// if (value == true) {
// selectedValues.add(item);
// } else {
// selectedValues.remove(item);
// }
// _textController.clear();
// widget.onItemSelected(selectedValues.toList());
// });
// },
// );
// }),
// const SizedBox(width: 8),
// Text(
// item,
// style: const TextStyle(
// color: Colors.white,
// fontSize: 16,
// fontFamily: 'Helvetica',
// fontWeight: FontWeight.w500,
// ),
// overflow: TextOverflow.ellipsis,
// ),
// ],
// ),
// if (index != widget.listData.length - 1)
// const Divider(thickness: 1, color: Color(0xFF434A53)),
// ],
// ),
// ),
// );
// }).toList();
// if (widget.showOtherOption) {
// items.add(
// DropdownMenuItem<String>(
// value: _textController.text,
// child: Column(
// children: [
// const Divider(thickness: 1, color: Color(0xFF434A53)),
// Row(
// children: [
// Obx(() {
// return Checkbox(
// value: selectedValues.contains(_textController.text),
// activeColor: Colors.white,
// onChanged: (bool? value) {
// setState(() {
// if (value == true &&
// _textController.text.trim().isNotEmpty) {
// selectedValues.add(_textController.text);
// } else {
// selectedValues.remove(_textController.text);
// }
// widget.onItemSelected(selectedValues.toList());
// });
// },
// );
// }),
// const SizedBox(width: 8),
// const Text(
// "Other: ",
// style: TextStyle(
// color: Colors.white,
// fontSize: 16,
// fontFamily: 'Helvetica',
// fontWeight: FontWeight.w500,
// ),
// overflow: TextOverflow.ellipsis,
// ),
// Expanded(
// child: TextField(
// controller: _textController,
// style: const TextStyle(
// color: Colors.white,
// fontSize: 16,
// fontFamily: 'Helvetica',
// fontWeight: FontWeight.w500,
// ),
// decoration: const InputDecoration(
// hintText: '',
// hintStyle: TextStyle(color: Colors.white70),
// border: UnderlineInputBorder(),
// ),
// ),
// ),
// TextButton(
// onPressed: () {
// setState(() {
// if (_textController.text.trim().isNotEmpty) {
// selectedValues.add(_textController.text);
// widget.onItemSelected(selectedValues.toList());
// }
// });
// },
// child: const Text(
// 'OK',
// style: TextStyle(
// color: Colors.white,
// fontSize: 16,
// fontFamily: 'Helvetica',
// fontWeight: FontWeight.w500,
// ),
// ),
// ),
// ],
// ),
// SizedBox(height: 10),
// ],
// ),
// ),
// );
// }
// return items;
// }
List<DropdownMenuItem<String>> _buildDropdownMenuItems() {
return widget.listData.asMap().entries.map((entry) {
int index = entry.key;
@@ -1043,11 +894,9 @@ class _CustomDropDownCheckBoxTimelineState
},
child: Container(
width: double.infinity,
height: 50,
padding: EdgeInsets.only(
right: 22,
left: 12,
),
// height: 50,
padding:
EdgeInsets.only(right: 22, left: 12, top: 15, bottom: 15),
decoration: BoxDecoration(
color: const Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: onDropTap.value
@@ -1085,10 +934,10 @@ class _CustomDropDownCheckBoxTimelineState
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400,
),
overflow: TextOverflow.ellipsis,
// overflow: TextOverflow.ellipsis,
),
),
const Spacer(),
// const Spacer(),
onDropTap.value
? Image.asset('assets/images/png/arrowup.png')
: Image.asset('assets/images/png/arrowdown.png'),

View File

@@ -1,81 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/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 CommunitySetting extends StatefulWidget {
const CommunitySetting({super.key});
@override
State<CommunitySetting> createState() => _CommunitySettingState();
}
class _CommunitySettingState extends State<CommunitySetting> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "Community settings",
),
body: Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
), Column(children: [
sizedBoxHeight(30.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.editcommunity);
},
child: rowTile(text: 'Edit community info')),
commonDivider(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.managemembers);
},
child: rowTile(text: 'Manage members')),
commonDivider(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.managegroups);
},
child: rowTile(text: 'Manage groups')),
commonDivider(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.managetags);
},
child: rowTile(text: 'Manage tags')),
sizedBoxHeight(20.h),
])
]));
}
Widget rowTile({
required String text,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
child: Row(children: [
text18w400_FCFCFC(text),
Spacer(),
Icon(
Icons.arrow_forward_ios,
color: Colors.white,
size: 20,
)
]),
);
}
}

View File

@@ -1,307 +0,0 @@
import 'dart:io';
import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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/CustomNextButton.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
class EditCommunity extends StatefulWidget {
const EditCommunity({super.key});
@override
State<EditCommunity> createState() => _EditCommunityState();
}
class _EditCommunityState extends State<EditCommunity> {
TextEditingController communitynameController = TextEditingController();
TextEditingController descriptionController = TextEditingController();
@override
void initState() {
communitynameController.text = 'Active alliance network';
descriptionController.text =
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer .";
super.initState();
}
List<File?> filePath = [];
List<File?> bannerPath = [];
bool isImageAdded = false;
bool isbannerAdded = false;
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Edit community info",
),
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: [
sizedBoxHeight(30.h),
Stack(
clipBehavior: Clip.none,
children: [
Container(
height: 100.h,
width: 100.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
border:
Border.all(color: Color(0xFF434A53), width: 0.5.w),
),
child: Center(
child: filePath.isNotEmpty
? ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(50.r),
child: Image.file(
filePath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
),
)
: Image.asset('assets/images/png/Ellipse 37.png',
fit: BoxFit.cover),
),
),
Positioned(
right: -10,
bottom: 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(
color: Color(0xFFD90B2E),
shape: BoxShape.circle,
border: Border.all(
color: Color(0xFFD90B2E), width: 0.5.w)),
child: Center(
child: Image.asset(
'assets/images/png/cameraicon.png',
height: 14.h,
width: 15.w,
),
),
),
))
],
),
sizedBoxHeight(25.h),
text16w400_white("Edit community profile picture"),
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC("Community banner image"),
sizedBoxHeight(16.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: 150.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/cameraicon2.png",
height: 36.h,
width: 36.w,
),
sizedBoxHeight(10.h),
text14w400white('Upload banner image'),
sizedBoxHeight(8.h),
SizedBox(
width: 270.w,
child: text10w400_whiteCenter(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"),
),
],
),
),
),
),
),
sizedBoxHeight(16.w),
commonGlassContainer(
width: double.infinity,
height: 60.h,
borderradius: 10.r,
customWidget: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(children: [
Container(
height: 40.h,
width: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5.r)),
child: Image.asset(
"assets/images/png/img2.png",
fit: BoxFit.cover,
),
),
sizedBoxWidth(8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
text14400white("group1.png"),
sizedBoxHeight(2.h),
text12w400_FCFCFC_blur("10 kb")
],
),
Spacer(),
Image.asset(
'assets/images/png/cancelicon.png',
height: 20.h,
width: 20.w,
)
]),
),
),
border: 1),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Community name"),
sizedBoxHeight(14.h),
CustomTextFormField(
textEditingController: communitynameController,
validator: (val) {
if (val == null || val.isEmpty) {
return 'Enter Community name';
}
return null;
},
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Group description"),
sizedBoxHeight(14.h),
CustomTextFormField2(
maxlines: 3,
textEditingController: descriptionController,
),
text16w400_FCFCFC("Type of community"),
sizedBoxHeight(14.h),
CustomDropDownRadio(
header: "",
title: "",
listData: ["Public", "Private - Request to join"],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Location*"),
sizedBoxHeight(14.h),
CustomDropDownRadio(
header: "",
title: "",
listData: ["Public", "Private", "Secret"],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Primary activity*"),
sizedBoxHeight(14.h),
CustomDropDownRadio(
showOtherOption: true,
header: "",
title: "",
listData: ["Sports", "Hobby"],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(50.h),
CustomButton(text: 'Save changes', onPressed: () {}),
sizedBoxHeight(50.h),
],
),
)
]),
)
]));
}
}

View File

@@ -1,188 +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/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class ManageGroups extends StatefulWidget {
const ManageGroups({super.key});
@override
State<ManageGroups> createState() => _ManageGroupsState();
}
class _ManageGroupsState extends State<ManageGroups> {
List groupData = [
{
"imagePath": "assets/images/png/img45.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Rectangle 25.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Fit fusion squad",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Power pulse posse",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Wellness warriors collective",
"subtitle": "Lorem ipsum dummy text",
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "Manage groups",
customActionWidget: InkWell(
onTap: () {},
child: Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Color(0x40000000),
offset: Offset(0, 6),
blurRadius: 8,
spreadRadius: 0,
),
],
),
child: Icon(Icons.add, color: Colors.white, weight: 2),
),
),
),
body: Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
), SingleChildScrollView(
child: Column(children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
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 groups",
),
sizedBoxHeight(25.h),
Row(
children: [
commonGlassContainer(
opacity1: 0.24,
opacity2: 0.24,
width: 50.w,
height: 50.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Black.png",
height: 30.h,
width: 30.w,
)),
border: 0.5),
sizedBoxWidth(8.w),
text18w400_FCFCFC("Create group"),
Spacer(),
Icon(
Icons.arrow_forward_ios_outlined,
color: Colors.white,
size: 14.sp,
),
],
),
sizedBoxHeight(30.h),
text18w700white("Groups"),
sizedBoxHeight(20.h),
]),
),
ListView.builder(
shrinkWrap: true,
itemCount: groupData.length,
itemBuilder: (context, index) {
return Column(
children: [
groupWidget(
imagePath: groupData[index]["imagePath"],
title: groupData[index]["title"],
subtitle: groupData[index]["subtitle"]),
commonDivider(),
],
);
},
)
]),
)
]));
}
}
Widget groupWidget({
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: 20.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(4.h),
text12w400_FCFCFC_blur(subtitle)
],
),
Spacer(),
Icon(
Icons.clear,
color: Color(0xFFFFFFFF),
weight: 1.88,
)
],
),
);
}

View File

@@ -1,233 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class ManageTags extends StatefulWidget {
const ManageTags({super.key});
@override
State<ManageTags> createState() => _ManageTagsState();
}
class _ManageTagsState extends State<ManageTags> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Manage tags",
),
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: [
sizedBoxHeight(20.h),
DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(children: [
CommonTabBar(tabs: const [
Tab(
text: 'Tags',
),
Tab(
text: 'Tag requests',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
children: [
tagsTab(),
tagrequestsrTab(),
],
),
),
]))
]))
]),
floatingActionButtonLocation: CustomFloatingActionButtonLocation(60.0),
floatingActionButton: Container(
height: 55.h,
width: 55.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Color(0x40000000), // Hex color with 40% opacity
offset: Offset(0, 6),
blurRadius: 8,
),
],
),
child: FloatingActionButton(
onPressed: () {
Get.toNamed(RouteName.newtag);
},
backgroundColor: Color(0xFFD90B2E),
autofocus: true,
shape: CircleBorder(),
child: Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 30.h,
width: 30.w,
),
),
));
}
}
Widget tagsTab() {
List tags = ['Cycle', 'Sports', 'Fitness', 'Kayaking', 'Sports club'];
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: text16400white("Special Announcement Tags"),
),
sizedBoxHeight(15.h),
ListView.builder(
shrinkWrap: true,
itemCount: tags.length,
itemBuilder: (context, index) {
return Column(
children: [
rowTagsTile(text: tags[index]),
if (index != tags.length - 1) commonDivider()
],
);
},
)
],
);
}
Widget rowTagsTile({
required String text,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 18.h),
child: Row(children: [
text16w400_FCFCFC(text),
Spacer(),
Image.asset(
"assets/images/png/Group 1000004071.png",
width: 5.w,
height: 22.h,
)
]),
);
}
Widget tagrequestsrTab() {
List tagrequest = [
'Running',
'Fit fam friday',
];
return Column(
children: [
sizedBoxHeight(30.h),
ListView.builder(
shrinkWrap: true,
itemCount: tagrequest.length,
itemBuilder: (context, index) {
return Column(
children: [
rowTagRequestTile(title: tagrequest[index]),
sizedBoxHeight(20.h)
],
);
},
)
],
);
}
Widget rowTagRequestTile({
required String title,
}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: commonGlassContainer(
width: double.infinity,
height: 60.h,
borderradius: 10.r,
customWidget: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(children: [
text16w700_FCFCFC(title),
Spacer(),
commonGlassContainer(
width: 35.w,
height: 35.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Icon(
Icons.clear,
size: 20,
color: Colors.white,
weight: 1,
)),
border: 0.5),
sizedBoxWidth(16.w),
Container(
height: 35.h,
width: 35.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
shape: BoxShape.circle,
),
child: Icon(
Icons.check,
size: 20,
color: Colors.white,
weight: 1,
),
)
]),
),
),
border: 1),
);
}
class CustomFloatingActionButtonLocation extends FloatingActionButtonLocation {
final double offset;
CustomFloatingActionButtonLocation(this.offset);
@override
Offset getOffset(ScaffoldPrelayoutGeometry scaffoldGeometry) {
// Calculate the position
double fabX = scaffoldGeometry.scaffoldSize.width -
scaffoldGeometry.floatingActionButtonSize.width -
16.0;
double fabY = scaffoldGeometry.scaffoldSize.height -
scaffoldGeometry.floatingActionButtonSize.height -
16.0 -
offset;
return Offset(fabX, fabY);
}
}

View File

@@ -1,59 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class NewTag extends StatefulWidget {
const NewTag({super.key});
@override
State<NewTag> createState() => _NewTagState();
}
class _NewTagState extends State<NewTag> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "New tag",
),
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(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
sizedBoxHeight(30.h),
text16w400_FCFCFC("Tag name"),
sizedBoxHeight(16.h),
CustomTextFormField(
hintText: "",
validator: (val) {
if (val == null || val.isEmpty) {
return 'Enter a tag name';
}
return null;
},
),
sizedBoxHeight(80.h),
CustomButton(text: "Add", onPressed: () {})
]),
))
]));
}
}

View File

@@ -1,201 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.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 AddGroup extends StatefulWidget {
const AddGroup({super.key});
@override
State<AddGroup> createState() => _AddGroupState();
}
class _AddGroupState extends State<AddGroup> {
List<bool> isCheckedList = [false, false, false, false].obs;
List groupData = [
{
"imagePath": "assets/images/png/img45.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Rectangle 25.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Fit fusion squad",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/img2.png",
"title": "Power pulse posse",
"subtitle": "Lorem ipsum dummy text",
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "Add groups",
),
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: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
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 groups",
),
sizedBoxHeight(25.h),
Row(
children: [
commonGlassContainer(
opacity1: 0.24,
opacity2: 0.24,
width: 50.w,
height: 50.h,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Black.png",
height: 30.h,
width: 30.w,
)),
border: 0.5),
sizedBoxWidth(8.w),
text18w400_FCFCFC("Create group"),
Spacer(),
Icon(
Icons.arrow_forward_ios_outlined,
color: Colors.white,
size: 14.sp,
),
],
),
sizedBoxHeight(25.h),
sizedBoxHeight(30.h),
text18w700white("Existing Groups"),
sizedBoxHeight(20.h),
]),
),
ListView.builder(
shrinkWrap: true,
itemCount: groupData.length,
itemBuilder: (context, index) {
return Column(
children: [
groupWidget(
index: index,
imagePath: groupData[index]["imagePath"],
title: groupData[index]["title"],
subtitle: groupData[index]["subtitle"],
isChecked: isCheckedList[index],
onCheckedChanged: (bool? value) {
isCheckedList[index] = value ?? false;
},
),
commonDivider(),
],
);
},
),
sizedBoxHeight(50.h),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: CommonBtn(
text: "Add",
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
),
),
]),
)
]));
}
Widget groupWidget({
required int index,
required String imagePath,
required String title,
required String subtitle,
required bool isChecked,
required ValueChanged<bool?> onCheckedChanged,
}) {
return Padding(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
child: Row(children: [
CircleAvatar(
backgroundImage: AssetImage(imagePath),
radius: 20.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
sizedBoxHeight(4.h),
text12w400_FCFCFC_blur(subtitle),
],
),
Spacer(),
Obx(() {
return commonGlassContainer(
border: isCheckedList[index] ? 1.2 : 0.9,
borderradius: 2,
height: 23.h,
width: 23.w,
opacity1: 0.24,
opacity2: 0.24,
borderColor:
isCheckedList[index] ? Color(0xFFD90B2E) : Color(0xFF434A53),
customWidget: Transform.scale(
scale: 1,
child: Checkbox(
side: BorderSide(color: Colors.transparent),
value: isCheckedList[index],
activeColor: Colors.transparent,
checkColor: Color(0xFFD90B2E),
onChanged: onCheckedChanged,
),
));
})
]),
);
}
}

View File

@@ -1,240 +0,0 @@
import 'dart:io';
import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonButton.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';
class NewCommunity extends StatefulWidget {
const NewCommunity({super.key});
@override
State<NewCommunity> createState() => _NewCommunityState();
}
class _NewCommunityState extends State<NewCommunity> {
List<File?> filePath = [];
List<File?> bannerPath = [];
bool isImageAdded = false;
bool isbannerAdded = false;
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "New community",
),
body: Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
), SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(20.h),
Center(
child: InkWell(
onTap: () {
ImageUploadBottomSheet().showModal(
context,
true,
(result) {
var file = File(result);
filePath.add(file);
isImageAdded = true;
setState(() {});
},
);
},
child: commonGlassContainer(
width: 95.w,
height: 95.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: filePath.isNotEmpty && isImageAdded
? ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(47.5.r),
child: Image.file(
filePath[0]!,
fit: BoxFit.cover,
width: double.infinity,
),
),
)
: Center(
child: Image.asset(
"assets/images/png/cameraicon2.png",
height: 30.h,
width: 30.w,
),
),
border: 0.5),
),
),
sizedBoxHeight(20.h),
Center(child: text16w400_white("Add community profile picture")),
sizedBoxHeight(30.h),
text16w400_FCFCFC("Banner image"),
sizedBoxHeight(15.h),
InkWell(
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),
text14w400white('Upload banner image'),
sizedBoxHeight(8.h),
text8w400_8A8A8A(
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
],
),
),
),
),
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Community name*"),
sizedBoxHeight(15.h),
CustomTextFormField(
validator: (val) {
if (val == null || val.isEmpty) {
return 'Enter Community name';
}
return null;
},
),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Type of community*"),
sizedBoxHeight(15.h),
CustomDropDownRadio(
header: "",
title: "",
listData: ['Public', 'Private', 'Secret'],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
// CommonDropdownradioBtn(
// hint: '',
// items: ['Public', 'Private', 'Secret'],
// showOtherOption: false),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Location*"),
sizedBoxHeight(15.h),
CustomDropDownRadio(
header: "",
title: "",
listData: ['Public', 'Private', 'Secret'],
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
text16w400_FCFCFC("Primary activity*"),
sizedBoxHeight(20.h),
CustomDropDownRadio(
header: "",
title: "",
listData: [
'Sports',
'Hobby',
],
showOtherOption: true,
onItemSelected: (p0) {},
leadingImage: SizedBox()),
sizedBoxHeight(25.h),
sizedBoxHeight(25.h),
CommonBtn(
text: "Create community",
onTap: () {
Get.toNamed(RouteName.addgroup);
},
),
sizedBoxHeight(25.h),
sizedBoxHeight(150.h),
]),
))
]));
}
}

View File

@@ -1,767 +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/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 CommunityDetails extends StatefulWidget {
const CommunityDetails({super.key});
@override
State<CommunityDetails> createState() => _CommunityDetailsState();
}
class _CommunityDetailsState extends State<CommunityDetails> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "",
customActionWidget: PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 180.w),
offset: Offset(0, 40),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Invite"),
Spacer(),
Image.asset(
"assets/images/png/uiw_user-add.png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Share"),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Search"),
Spacer(),
Image.asset(
"assets/images/png/Frame 58575.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Mute notification"),
Spacer(),
Image.asset(
"assets/images/png/Black1233.png",
height: 16.h,
width: 16.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Pin"),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.communitysetting);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400white("Edit community"),
Spacer(),
Image.asset(
"assets/images/png/setting2.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Image.asset(
'assets/images/png/Group 1000004071.png',
height: 20.h,
width: 20.w,
)),
),
body: Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
Positioned.fill(
child: SingleChildScrollView(
child: Column(children: [
Stack(clipBehavior: Clip.none, children: [
GestureDetector(
onTap: () {
Get.toNamed(RouteName.communityInfo);
},
child: SizedBox(
height: 130.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/img1.png",
fit: BoxFit.cover,
),
),
),
Positioned(
bottom: -35.h,
left: 20.w,
child: Container(
width: 85.r,
height: 85.r,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Color.fromRGBO(255, 255, 255, 0.5),
width: 1,
),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.25),
blurRadius: 12,
offset: Offset(0, 6),
),
],
),
child: CircleAvatar(
radius: 42.5.r,
foregroundImage: AssetImage("assets/images/png/img2.png"),
),
))
]),
sizedBoxHeight(40.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
Row(
children: [
text20w700_FCFCFC("Active alliance network"),
Spacer(),
commonGlassContainer(
width: 35.w,
height: 35.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/img12.png",
height: 18.w,
width: 18.w,
)),
border: 0.5),
sizedBoxWidth(8.w),
text16w400_FCFCFCblur("Public"),
],
),
sizedBoxHeight(20.h),
commonGlassContainer(
width: double.infinity,
height: 51.h,
borderradius: 10.r,
customWidget: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
sizedBoxWidth(16.w),
stackContainers(
number: "+2",
containerImages: [
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
],
),
sizedBoxWidth(90.w),
text16w400_white('7 members'),
Spacer(),
Icon(
Icons.arrow_forward,
size: 20.sp,
color: Colors.white,
),
sizedBoxWidth(16.w),
],
),
],
),
border: 1.w),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.addgroup);
},
child: commonGlassContainer(
width: double.infinity,
height: 51.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(children: [
Image.asset(
"assets/images/png/Black.png",
height: 23.h,
width: 31.w,
),
sizedBoxWidth(15.w),
text16w400white('10 groups'),
Spacer(),
Icon(
Icons.arrow_forward,
size: 20.sp,
color: Colors.white,
),
]),
],
),
),
border: 1),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.announcement);
},
child: commonGlassContainer(
width: double.infinity,
height: 51.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(children: [
Image.asset(
"assets/images/png/marketing 1 (traced).png",
height: 23.h,
width: 31.w,
),
sizedBoxWidth(15.w),
text16w400white('Announcements'),
Spacer(),
Container(
height: 21.h,
width: 43.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius:
BorderRadius.circular(30.r)),
child: Center(child: text12w400_FCFCFC("11")),
)
]),
],
),
),
border: 1),
),
sizedBoxHeight(35.h),
Container(
height: 40.h,
width: 200.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius: BorderRadius.circular(30.r)),
child:
Center(child: text14w400white("Leave the community")),
),
sizedBoxHeight(50.h),
],
),
),
DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
Tab(
text: 'Posts',
),
Tab(
text: 'Events',
),
]),
SizedBox(
height: 600.h,
child: TabBarView(
children: [
poststab(),
eventstab(),
],
),
),
],
),
),
])))
]));
}
Widget poststab() {
return 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 eventstab() {
return Column(
children: [],
);
}
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 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: [
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(30.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')
],
)
],
)
]),
),
],
);
}
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')
],
);
}
Widget containertile({required String text}) {
return commonGlassContainer(
border: 1,
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)),
));
}
}

View File

@@ -1,381 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class MyCommunity extends StatefulWidget {
const MyCommunity({super.key});
@override
State<MyCommunity> createState() => _MyCommunityState();
}
class _MyCommunityState extends State<MyCommunity> {
List JoinedcommunityData = [
{
"imagePath": "assets/images/png/img2.png",
"text": "Active alliance network",
"members": "7 members",
"index": 1,
},
{
"imagePath": "assets/images/png/img34.png",
"text": "FitFam federation",
"members": "7 members",
"index": 2,
},
];
List RequestcommunityData = [
{
"imagePath": "assets/images/png/img45.png",
"text": "The athletic town",
"members": "7 members",
"index": 3,
},
{
"imagePath": "assets/images/png/img2.png",
"text": "Football fever",
"members": "7 members",
"index": 4,
},
];
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(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "My Communities",
customActionWidget: Row(
children: [
GestureDetector(
onTap: () {
Get.toNamed(RouteName.newcommunity);
},
child: Container(
height: 30.h,
width: 30.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
boxShadow: [
BoxShadow(
color: Color(0x40000000),
offset: Offset(0, 6),
blurRadius: 8,
spreadRadius: 0,
),
],
shape: BoxShape.circle),
child: Icon(
Icons.add,
color: Colors.white,
),
),
),
sizedBoxWidth(12.w),
Image.asset(
"assets/images/png/Frame 9.png",
height: 22.h,
width: 22.w,
)
],
),
),
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: [
text18w700_FCFCFC("Joined communities"),
sizedBoxHeight(15.h),
Column(
children:
List.generate(JoinedcommunityData.length, (index) {
return communityCard(
ontap: () {
Get.toNamed(RouteName.communityDetails);
},
imagepath: JoinedcommunityData[index]
['imagePath'],
title: JoinedcommunityData[index]['text'],
members: JoinedcommunityData[index]['members'],
index: JoinedcommunityData[index]['index']);
}),
),
text18w700_FCFCFC("Requested communities"),
sizedBoxHeight(20.h),
Column(
children:
List.generate(RequestcommunityData.length, (index) {
return communityCard(
ontap: () {},
imagepath: RequestcommunityData[index]
['imagePath'],
title: RequestcommunityData[index]['text'],
members: RequestcommunityData[index]['members'],
index: RequestcommunityData[index]['index']);
}),
)
]),
))
]));
}
Widget communityCard({
required String imagepath,
required String title,
required void Function()? ontap,
required String members,
required int index,
}) {
return Padding(
padding: EdgeInsets.only(bottom: 25.h),
child: GestureDetector(
onTap: ontap,
child: commonGlassUI(
width: double.infinity,
height: 162.h,
borderwidth: 0.9,
borderRadius: BorderRadius.circular(10.r),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h),
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 65.h,
width: 65.h,
decoration: BoxDecoration(
shape: BoxShape.circle,
// color: Colors.amber,
),
child:
// Center(
// child: Image.asset(imagepath, fit: BoxFit.cover)),
CircleAvatar(
backgroundImage: AssetImage(
imagepath,
),
),
),
sizedBoxWidth(13.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18w700_FCFCFC(title),
sizedBoxHeight(10.h),
Row(
children: [
Stack(clipBehavior: Clip.none, children: [
commonGlassContainer(
border: 0.9,
width: 30.w,
height: 30.h,
borderradius: 100.r,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/Black.png",
height: 12.h,
width: 16.w,
),
)),
Positioned(
top: 0,
right: -4,
child: Container(
height: 12.h,
width: 12.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFD90B2E),
),
child: Center(child: text6400white("2")),
))
]),
sizedBoxWidth(15.w),
text14w400_FCFCFCblur("10 groups")
],
),
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 200.w),
offset: Offset(0, 30),
color: Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Mute community"),
Spacer(),
Image.asset(
"assets/images/png/Black (1).png",
height: 18.h,
width: 18.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Hide post"),
Spacer(),
Image.asset(
"assets/images/png/mingcute_eye-close-line.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Pin"),
Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
width: 25.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 8.w),
child: Row(
children: [
text14w400_FCFCFC("Leave community"),
Spacer(),
Image.asset(
"assets/images/png/logout 1 (traced).png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 18.h,
width: 20.w,
)),
],
),
sizedBoxHeight(16.h),
commonDivider(),
sizedBoxHeight(10.h),
Expanded(
child: Row(
children: [
stackContainers(
number: "+2",
containerImages: [
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
"assets/images/png/cimg3.png",
"assets/images/png/cimg2.png",
],
),
sizedBoxWidth(95.w),
text12w400_FCFCFC_blur(members),
Spacer(),
Obx(() {
return GestureDetector(
onTap: () {
toggleSelectedIndex(index);
},
child: Container(
width: selectedContainerIndices.contains(index)
? 118.w
: 100.w,
height: 30.h,
decoration: BoxDecoration(
color:
selectedContainerIndices.contains(index)
? null
: Color(0xFFD90B2E),
borderRadius: BorderRadius.all(
Radius.circular(30.r),
),
border: Border.all(
color: Color(0xFFD90B2E), width: 1.w)),
child: Center(
child:
selectedContainerIndices.contains(index)
? text14400white("Requested")
: text14400white("Joined")),
),
);
})
],
),
)
],
),
)),
),
);
}
}

View File

@@ -1,488 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class SideMenu extends StatefulWidget {
const SideMenu({super.key});
@override
State<SideMenu> createState() => _SideMenuState();
}
class _SideMenuState extends State<SideMenu> {
@override
void initState() {
// TODO: implement initState
super.initState();
}
final RxBool isPinned = false.obs;
List sideBarData = [
{
"imagePath": "assets/images/svg/sidemenu/Faq.svg",
"text": "FAQs",
},
{
"imagePath": "assets/images/svg/sidemenu/contact.svg",
"text": "Contact Us"
},
{
"imagePath": "assets/images/svg/sidemenu/rate.svg",
"text": "Rate this app"
},
{
"imagePath": "assets/images/svg/sidemenu/terms.svg",
"text": "Terms & Conditions"
},
{
"imagePath": "assets/images/svg/sidemenu/privacy.svg",
"text": "Privacy Policy"
},
{"imagePath": "assets/images/svg/sidemenu/about.svg", "text": "About Us"},
{
"imagePath": "assets/images/svg/sidemenu/settingmenu.svg",
"text": "Settings"
},
{"imagePath": "assets/images/svg/sidemenu/logout.svg", "text": "Logout"},
];
Color sideBarBackgroundColor = const Color(0xFF222935);
Color whitecolor = Colors.white;
var selectedIndices = <int>{}.obs;
void toggleSelectedIndex(int index) {
if (selectedIndices.contains(index)) {
selectedIndices.remove(index);
} else {
selectedIndices.add(index);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF222935),
body: Column(
children: [
sizedBoxHeight(50.h),
Expanded(
child: ListView(children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: commonGlassUI(
width: double.infinity,
height: 330.h,
borderRadius: BorderRadius.circular(10.r),
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.w, vertical: 12.h),
child: Row(
children: [
text16w400_FCFCFC("Pinned"),
Spacer(),
Icon(
Icons.arrow_drop_up,
color: Colors.white,
size: 25,
)
],
),
),
commonDivider(),
sizedBoxHeight(10.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 1),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 2),
firstRowTile(
text: "Crush",
leadingimage:
"assets/images/png/sidemenu/Vector (4).png",
index: 3),
ListTile(
leading: CircleAvatar(
radius: 15.r,
foregroundImage: AssetImage(
"assets/images/png/sidemenu/Ellipse 52.png"),
),
title: text14w400_FCFCFC("Ryan Dorwart"),
trailing: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19.w,
height: 19.h,
),
onTap: () {},
),
ListTile(
leading: CircleAvatar(
radius: 15.r,
foregroundImage: AssetImage(
"assets/images/png/sidemenu/Ellipse 53.png"),
),
title: text14w400_FCFCFC("Ahmad Rhiel Madsen"),
trailing: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19.w,
height: 19.h,
),
onTap: () {},
),
]),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Communities"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 4),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 5),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 6),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 7),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Watchlist"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.watchlist);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 8),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 9),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 10),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 11),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Recent"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 8),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 9),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 10),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 11),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
height: 1,
margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Color.fromRGBO(255, 255, 255, 0.3),
width: 1.w,
),
),
),
),
),
sizedBoxHeight(18.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
text16w400_FCFCFC("Users"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.mycommunity);
},
child: text14w400_FCFCFC("View all")),
],
),
),
sizedBoxHeight(20.h),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 8),
firstRowTile(
text: "Advice",
leadingimage:
"assets/images/png/sidemenu/solar_cloud-outline.png",
index: 9),
firstRowTile(
text: "Crush",
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
index: 10),
firstRowTile(
text: "Row bridge",
leadingimage:
"assets/images/png/sidemenu/rowing 1 (traced).png",
index: 11),
sizedBoxHeight(18.h),
sizedBoxHeight(80.h),
]),
),
],
));
}
Widget firstRowTile({
required String text,
required String leadingimage,
required int index,
}) {
return ListTile(
leading: commonContainer(
width: 29.w,
height: 29.h,
borderwidth: 0.9,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
leadingimage,
width: 13.w,
height: 13.h,
),
)),
title: text14w400_FCFCFC(text),
trailing: InkWell(
onTap: () {
toggleSelectedIndex(index);
},
child: Obx(
() {
return selectedIndices.contains(index)
? Image.asset(
"assets/images/png/sidemenu/f7_pin-fill.png",
width: 19,
height: 19,
)
: Image.asset(
"assets/images/png/sidemenu/f7_pin-fill (1).png",
width: 19,
height: 19,
);
},
),
),
onTap: () {},
);
}
// LogOutdialog(context) {
// return showDialog(
// // barrierDismissible: false,
// context: context,
// builder: (context) => Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// AlertDialog(
// insetPadding: EdgeInsets.symmetric(horizontal: 16.w),
// backgroundColor:
// Get.isDarkMode ? Colors.black : const Color(0XFF1B243D),
// contentPadding: EdgeInsets.fromLTRB(29.w, 44.h, 29.w, 35.h),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.all(Radius.circular(5.r)),
// ),
// content: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// height: 87.h,
// width: 80.w,
// decoration: const BoxDecoration(
// shape: BoxShape.circle, color: Color(0xFFC18948)),
// child: Align(
// alignment: Alignment.topLeft,
// child: Container(
// height: 79.h,
// width: 73.w,
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: const Color(0xFFE8C69F).withOpacity(0.5),
// ),
// child: Center(
// child: SvgPicture.asset(
// 'assets/images/svg/apps 1.svg',
// // fit: BoxFit.fill,
// ),
// ),
// ),
// ),
// ),
// sizedBoxHeight(30.h),
// Text(
// "Are you sure you want to logout ?",
// textAlign: TextAlign.center,
// style: TextStyle(
// fontFamily: "hiragino",
// fontWeight: FontWeight.w400,
// fontSize: 20.sp,
// color: const Color(0xFFFFFFFF)),
// ),
// sizedBoxHeight(40.h),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// SizedBox(
// width: 140.w,
// child: CommonYesNoBtn(
// yesonTap: () async {
// SharedPreferences prefs =
// await SharedPreferences.getInstance();
// await prefs.clear();
// Get.offNamed(RouteName.loginscreen);
// },
// )),
// SizedBox(
// width: 140.w,
// child: CommonYesNoBtn(
// noonTap: () {
// Get.back();
// },
// ),
// ),
// ],
// )
// ],
// ),
// ),
// ],
// ),
// );
// }
}

View File

@@ -0,0 +1,22 @@
import 'dart:developer';
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/sidemenu/Model/TagCommunityUserModel.dart';
TagCommunityUserModel? tagcommunityuserobj;
class Sidegetmethod {
Future<ResponseData<dynamic>> getJoinedusergroups(updata) async {
final response = await NetworkApiServices().getApi(
"${ApiUrls.tagcommunityuser}?=$updata",
// optionalpar: false
);
if (response.status == ResponseStatus.SUCCESS) {
tagcommunityuserobj = TagCommunityUserModel.fromJson(response.data);
log(tagcommunityuserobj!.data.toString());
}
return response;
}
}

View File

@@ -14,4 +14,8 @@ RxInt notification = 0.obs;
late Timer timerhomeglobal;
bool isTimerInitialize = false;
String? globalAccountType;
String? mainWelcomeName;
String userIdGlobal = "0";

View File

@@ -10,14 +10,14 @@ class LoginModel {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['status_code'] = this.statusCode;
data['message'] = this.message;
final Map<String, dynamic> data = <String, dynamic>{};
data['status'] = status;
data['status_code'] = statusCode;
data['message'] = message;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
@@ -34,15 +34,15 @@ class Data {
Data.fromJson(Map<String, dynamic> json) {
accessToken = json['access-token'];
userData = json['user_data'] != null
? new UserData.fromJson(json['user_data'])
? UserData.fromJson(json['user_data'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['access-token'] = this.accessToken;
if (this.userData != null) {
data['user_data'] = this.userData!.toJson();
final Map<String, dynamic> data = <String, dynamic>{};
data['access-token'] = accessToken;
if (userData != null) {
data['user_data'] = userData!.toJson();
}
return data;
}
@@ -188,51 +188,51 @@ class UserData {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['principal_type_xid'] = this.principalTypeXid;
data['principal_source_xid'] = this.principalSourceXid;
data['one_signal_player_id'] = this.oneSignalPlayerId;
data['google_id'] = this.googleId;
data['apple_id'] = this.appleId;
data['facebook_id'] = this.facebookId;
data['microsoft_id'] = this.microsoftId;
data['user_name'] = this.userName;
data['pin'] = this.pin;
data['full_name'] = this.fullName;
data['gender'] = this.gender;
data['date_of_birth'] = this.dateOfBirth;
data['phone_number'] = this.phoneNumber;
data['other_phone_number'] = this.otherPhoneNumber;
data['email_address'] = this.emailAddress;
data['address_line1'] = this.addressLine1;
data['address_line2'] = this.addressLine2;
data['city_xid'] = this.cityXid;
data['state_xid'] = this.stateXid;
data['country_xid'] = this.countryXid;
data['post_code'] = this.postCode;
data['last_login_datetime'] = this.lastLoginDatetime;
data['profile_photo'] = this.profilePhoto;
data['referral_code'] = this.referralCode;
data['description'] = this.description;
data['about'] = this.about;
data['position'] = this.position;
data['training_scores'] = this.trainingScores;
data['height'] = this.height;
data['weight'] = this.weight;
data['batting_average'] = this.battingAverage;
data['is_profile_updated'] = this.isProfileUpdated;
data['is_active'] = this.isActive;
data['group_notification'] = this.groupNotification;
data['community_notification'] = this.communityNotification;
data['follower_notification'] = this.followerNotification;
data['new_follower_notification'] = this.newFollowerNotification;
data['direct_message_notification'] = this.directMessageNotification;
data['created_by'] = this.createdBy;
data['modified_by'] = this.modifiedBy;
data['deleted_at'] = this.deletedAt;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['principal_type_xid'] = principalTypeXid;
data['principal_source_xid'] = principalSourceXid;
data['one_signal_player_id'] = oneSignalPlayerId;
data['google_id'] = googleId;
data['apple_id'] = appleId;
data['facebook_id'] = facebookId;
data['microsoft_id'] = microsoftId;
data['user_name'] = userName;
data['pin'] = pin;
data['full_name'] = fullName;
data['gender'] = gender;
data['date_of_birth'] = dateOfBirth;
data['phone_number'] = phoneNumber;
data['other_phone_number'] = otherPhoneNumber;
data['email_address'] = emailAddress;
data['address_line1'] = addressLine1;
data['address_line2'] = addressLine2;
data['city_xid'] = cityXid;
data['state_xid'] = stateXid;
data['country_xid'] = countryXid;
data['post_code'] = postCode;
data['last_login_datetime'] = lastLoginDatetime;
data['profile_photo'] = profilePhoto;
data['referral_code'] = referralCode;
data['description'] = description;
data['about'] = about;
data['position'] = position;
data['training_scores'] = trainingScores;
data['height'] = height;
data['weight'] = weight;
data['batting_average'] = battingAverage;
data['is_profile_updated'] = isProfileUpdated;
data['is_active'] = isActive;
data['group_notification'] = groupNotification;
data['community_notification'] = communityNotification;
data['follower_notification'] = followerNotification;
data['new_follower_notification'] = newFollowerNotification;
data['direct_message_notification'] = directMessageNotification;
data['created_by'] = createdBy;
data['modified_by'] = modifiedBy;
data['deleted_at'] = deletedAt;
data['created_at'] = createdAt;
data['updated_at'] = updatedAt;
return data;
}
}

View File

@@ -2,14 +2,14 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:logger/web.dart';
import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Login/ViewModel/LoginApi.dart';
import 'package:regroup/Main_Screens/Community/ViewModel/getmethod.dart';
import 'package:regroup/Utils/Common/AppleOAuthService.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/googleOAuthService.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
@@ -18,9 +18,6 @@ import 'package:regroup/Utils/texts.dart';
import 'package:regroup/onboarding/Signup/view_model/getUserprofile.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
import 'package:regroup/Common/global.dart' as global;
// import 'package:regroup/Common/global.dart' as global;
class LoginScreen extends StatefulWidget {
const LoginScreen({super.key});
@@ -30,11 +27,11 @@ class LoginScreen extends StatefulWidget {
}
class _LoginScreenState extends State<LoginScreen> {
AccessToken? _accessToken;
final TextEditingController _emailController = TextEditingController();
RxBool isObscured = true.obs;
final TextEditingController _passwordController = TextEditingController();
GoogleAuthService googleSigninController = Get.put(GoogleAuthService());
bool isLoading = false;
@override
void initState() {
@@ -74,21 +71,21 @@ class _LoginScreenState extends State<LoginScreen> {
);
// Get.toNamed(RouteName.mainscreen,arguments: 0);
await Getuserdetails().Getuser().then((value) {
if (getuserobj?.data?.userData?.isProfileUpdated == 0) {
String? accountype =
getuserobj?.data?.userData?.principalTypeXid.toString();
if (getuserobj?.data?.userData?.isProfileUpdated == 0) {
String? accountype =
getuserobj?.data?.userData?.principalTypeXid.toString();
if (accountype == "1") {
Get.toNamed(RouteName.tellusindividualscreen,
arguments: {'pageroute': "mainscreen"});
} else if (accountype == "2") {
Get.toNamed(RouteName.tellusbusinessscreen,
arguments: {'pageroute': "mainscreen"});
if (accountype == "1") {
Get.toNamed(RouteName.tellusindividualscreen,
arguments: {'pageroute': "mainscreen"});
} else if (accountype == "2") {
Get.toNamed(RouteName.tellusbusinessscreen,
arguments: {'pageroute': "mainscreen"});
}
} else {
Get.toNamed(RouteName.mainscreen, arguments: 0);
}
} else {
Get.toNamed(RouteName.mainscreen,arguments: 0);
}
});
});
logger.d("go to login");
}
} else {
@@ -123,8 +120,6 @@ class _LoginScreenState extends State<LoginScreen> {
final LoginResult result = await FacebookAuth.instance.login();
if (result.status == LoginStatus.success) {
_accessToken = result.accessToken;
final userData = await FacebookAuth.instance.getUserData();
logger.i(userData['email']);
logger.i(userData['id']);
@@ -140,7 +135,6 @@ class _LoginScreenState extends State<LoginScreen> {
_logout() async {
await FacebookAuth.instance.logOut();
_accessToken = null;
setState(() {});
}
@@ -221,7 +215,7 @@ class _LoginScreenState extends State<LoginScreen> {
context: context,
builder: (context) {
return AlertDialog(
backgroundColor: Color(0xff222935),
backgroundColor: const Color(0xff222935),
title: Text(
'Exit App',
style: TextStyle(
@@ -293,21 +287,21 @@ class _LoginScreenState extends State<LoginScreen> {
image: DecorationImage(
image:
AssetImage("assets/images/png/Choice screen.png"),
fit: BoxFit.cover)),
fit: BoxFit.fill)),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 150.h,
height: 130.h,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Align(
alignment: Alignment.center,
child: Container(
child: SizedBox(
width: 107.w,
height: 70.h,
height: 86.h,
child: SvgPicture.asset(
"assets/images/svg/onboarding2.svg",
fit: BoxFit.cover,
@@ -355,18 +349,6 @@ class _LoginScreenState extends State<LoginScreen> {
}
return null;
},
// onInput: (p0) {
// if (p0!.isEmpty) {
// errormsg.value = 'Enter your e-mail address';
// }
// if (!RegExp(
// r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
// .hasMatch(p0!)) {
// errormsg.value = 'Enter a valid e-mail address';
// }
// return null;
// },
// validatorText: "Email Id",
inputFormatters: [
LengthLimitingTextInputFormatter(30),
@@ -412,22 +394,72 @@ class _LoginScreenState extends State<LoginScreen> {
),
sizedBoxHeight(10.h),
Align(
alignment: Alignment.centerRight,
child: Padding(
padding: EdgeInsets.only(right: 6.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.forgotpass);
},
child:
text14400white('Forgot password ?')),
)),
alignment: Alignment.centerRight,
child: Padding(
padding: EdgeInsets.only(right: 6.w),
child: GestureDetector(
onTap: () {
Get.toNamed(RouteName.forgotpass);
},
child: text14400white('Forgot password ?'),
),
),
),
sizedBoxHeight(40.h),
CustomButton(
text: "Login",
onPressed: () {
_logincheck();
}),
Center(
child: SizedBox(
width: isLoading ? 50 : double.infinity,
height: 50,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFD90B2E),
padding: EdgeInsets.zero),
onPressed: () {
setState(
() {
isLoading = true;
},
);
Future.delayed(
const Duration(seconds: 1),
() {
setState(() {
isLoading = false;
});
_logincheck();
},
);
},
child: isLoading
? const Row(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
SizedBox(
width: 30,
height: 30,
child: CircularProgressIndicator(
color: Colors.white,
strokeWidth: 2,
),
),
],
)
: Text(
'Login',
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: "Helvetica",
fontWeight: FontWeight.w400,
fontSize: 16.sp,
color: const Color(0xFFFCFCFC),
),
),
),
),
),
sizedBoxHeight(20.h),
GestureDetector(
onTap: () {

View File

@@ -10,7 +10,7 @@ import 'package:regroup/Login/ViewModel/LoginApi.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomNextButton.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
@@ -52,7 +52,7 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
}
}
final Map<String, int> _accountTypeMap = {
final Map<String, int> _accountTypeMap = {
'Individual': 1,
'Business': 2,
};
@@ -68,12 +68,11 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
SharedPreferences prefs = await SharedPreferences.getInstance();
if (resp.status == ResponseStatus.SUCCESS) {
int accountTypeValue = _accountTypeMap[_selectedAccountType] ?? 0;
int accountTypeValue = _accountTypeMap[_selectedAccountType] ?? 0;
await prefs.setString('accountTypefromLogin',
accountTypeValue.toString());
await prefs.setString('accountTypeValue',
accountTypeValue.toString());
await prefs.setString(
'accountTypefromLogin', accountTypeValue.toString());
await prefs.setString('accountTypeValue', accountTypeValue.toString());
if (_selectedAccountType == 'Individual') {
Get.toNamed(RouteName.tellusindividualscreen);
@@ -102,45 +101,54 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
body: Stack(
children: [
const Positioned(
top: 310, right: -30, child: CommonBlurRightSecond()),
const Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
GlassmorphicContainer(
width: MediaQuery.of(context).size.width,
height:
// 500.h,
MediaQuery.of(context).size.height,
borderRadius: 2,
blur: 6,
alignment: Alignment.bottomLeft,
border: 2,
linearGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
const Color(0XFF222935).withOpacity(0.60),
const Color(0XFF222935).withOpacity(0.60),
const Color(0XFF222935).withOpacity(0.60),
const Color(0XFF222935).withOpacity(0.60),
// Positioned(
// top: 310, right: -30, child: CommonBlurRightSecond()),
// const Positioned(top: 510, left: -30, child: CommonBlurLeftBlue()),
// GlassmorphicContainer(
// width: MediaQuery.of(context).size.width,
// height:
// // 500.h,
// MediaQuery.of(context).size.height,
// borderRadius: 2,
// blur: 6,
// alignment: Alignment.bottomLeft,
// border: 2,
// linearGradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [
// const Color(0XFF222935).withOpacity(0.60),
// const Color(0XFF222935).withOpacity(0.60),
// const Color(0XFF222935).withOpacity(0.60),
// const Color(0XFF222935).withOpacity(0.60),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
],
),
borderGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
const Color(0XFF222935).withOpacity(0.60),
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// ],
// ),
// borderGradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// // Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
// const Color(0XFF222935).withOpacity(0.60),
const Color(0XFF222935).withOpacity(0.60),
],
),
child: Padding(
// const Color(0XFF222935).withOpacity(0.60),
// ],
// ),
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: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -234,10 +242,8 @@ class _VerifygoogleandappleState extends State<Verifygoogleandapple> {
],
),
),
)
],
),
),
);
] )
));
}
}

View File

@@ -4,6 +4,7 @@ import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Common/controller/data/network/network_api.dart';
import 'package:regroup/Global.dart';
import 'package:regroup/Login/Model/LoginModel.dart';
import 'package:regroup/Main_Screens/Community/ViewModel/getmethod.dart';
import 'package:regroup/onboarding/Signup/view_model/getUserprofile.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -19,6 +20,7 @@ class LoginAPI {
if (response.data['status'] == 'success') {
LoginModel loginObj = LoginModel.fromJson(response.data);
await prefs.setString('access-token', loginObj.data!.accessToken!);
await Communityallgetmethod().getLikeicons();
await prefs.setString(
'fullname', loginObj.data?.userData?.fullName ?? "");
await prefs.setString(
@@ -63,7 +65,7 @@ class LoginAPI {
);
}
} else {
Get.toNamed(RouteName.mainscreen);
Get.toNamed(RouteName.mainscreen,arguments: 0);
}
} else {
return ResponseData<dynamic>(
@@ -80,6 +82,7 @@ class LoginAPI {
.postApi(data, ApiUrls.googlelogin, optionalpar: true);
if (response.status == ResponseStatus.SUCCESS) {
await prefs.setString('access-token', response.data['data']['token']);
await Communityallgetmethod().getLikeicons();
if (response.data['data']['is_account_type_updated'] == 3) {
return ResponseData<dynamic>(
"go-to-signin-via-oauth", ResponseStatus.SUCCESS,
@@ -99,6 +102,7 @@ class LoginAPI {
.postApi(data, ApiUrls.applelogin, optionalpar: true);
if (response.status == ResponseStatus.SUCCESS) {
await prefs.setString('access-token', response.data['data']['token']);
await Communityallgetmethod().getLikeicons();
if (response.data['data']['is_account_type_updated'] == 3) {
Get.toNamed(RouteName.verifygoogleapplepage,
arguments: {"email": emailReceived});
@@ -118,7 +122,7 @@ class LoginAPI {
arguments: {'pageroute': "mainscreen"});
}
} else {
Get.toNamed(RouteName.mainscreen,arguments: 0);
Get.toNamed(RouteName.mainscreen, arguments: 0);
}
});
// Get.toNamed(RouteName.mainscreen);
@@ -136,6 +140,7 @@ class LoginAPI {
.postApi(data, ApiUrls.facebooklogin, optionalpar: true);
if (response.status == ResponseStatus.SUCCESS) {
await prefs.setString('access-token', response.data['data']['token']);
await Communityallgetmethod().getLikeicons();
if (response.data['data']['is_account_type_updated'] == 3) {
Get.toNamed(RouteName.verifygoogleapplepage,
arguments: {"email": emailReceived});
@@ -143,6 +148,7 @@ class LoginAPI {
"go-to-signin-via-oauth", ResponseStatus.SUCCESS);
} else {
// Get.toNamed(RouteName.mainscreen);
await Getuserdetails().Getuser().then((value) {
if (getuserobj?.data?.userData?.isProfileUpdated == 0) {
String? accountype =
@@ -156,7 +162,7 @@ class LoginAPI {
arguments: {'pageroute': "mainscreen"});
}
} else {
Get.toNamed(RouteName.mainscreen,arguments: 0);
Get.toNamed(RouteName.mainscreen, arguments: 0);
}
});
return ResponseData<dynamic>("go-to-login", ResponseStatus.SUCCESS);

View File

@@ -103,11 +103,11 @@ class _AddEventState extends State<AddEvent> {
borderType: BorderType.RRect,
radius: Radius.circular(14.r),
color: const Color(0xFF434A53),
child: commonGlassContainer(
border: 0,
child: commonGlassUI(
// border: 0,
width: double.infinity,
height: 130.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular( 10.r),
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(
@@ -160,10 +160,10 @@ class _AddEventState extends State<AddEvent> {
),
),
sizedBoxHeight(20.h),
commonGlassContainer(
commonGlassUI(
width: double.infinity,
height: 60.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular( 10.r),
customWidget: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
@@ -197,7 +197,7 @@ class _AddEventState extends State<AddEvent> {
]),
),
),
border: 1),
borderwidth: 1),
sizedBoxHeight(20.h),
text16400white("Type of event"),
sizedBoxHeight(14.h),
@@ -313,10 +313,10 @@ class _AddEventState extends State<AddEvent> {
});
}
},
child: commonGlassContainer(
child: commonGlassUI(
width: 174.w,
height: 50.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular( 30.r),
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
@@ -330,7 +330,7 @@ class _AddEventState extends State<AddEvent> {
formatTimeOfDay(starttime!)),
]),
),
border: 1),
borderwidth: 1),
)
],
),
@@ -351,10 +351,10 @@ class _AddEventState extends State<AddEvent> {
});
}
},
child: commonGlassContainer(
child: commonGlassUI(
width: 174.w,
height: 50.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular( 30.r),
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
@@ -368,7 +368,7 @@ class _AddEventState extends State<AddEvent> {
formatTimeOfDay(endtime!)),
]),
),
border: 1),
borderwidth: 1),
)
],
),
@@ -378,9 +378,9 @@ class _AddEventState extends State<AddEvent> {
Row(
children: [
Obx(() {
return commonGlassContainer(
border: 1,
borderradius: 2,
return commonGlassUI(
borderwidth: 1,
borderRadius: BorderRadius.circular( 2),
height: 23.h,
width: 23.w,
opacity1: 0.24,
@@ -474,19 +474,19 @@ class _AddEventState extends State<AddEvent> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
commonGlassContainer(
commonGlassUI(
height: 50.h,
width: 127.w,
borderradius: 30.r,
border: 1,
borderRadius: BorderRadius.circular( 30.r),
borderwidth: 1,
customWidget: Center(
child: text16400white("2"),
)),
commonGlassContainer(
commonGlassUI(
height: 50.h,
width: 215.w,
borderradius: 30.r,
border: 1,
borderRadius: BorderRadius.circular( 30.r),
borderwidth: 1,
customWidget: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -515,10 +515,10 @@ class _AddEventState extends State<AddEvent> {
required String imagePath,
required String title,
}) {
return commonGlassContainer(
return commonGlassUI(
width: double.infinity,
height: 50.h,
borderradius: 30,
borderRadius: BorderRadius.circular(30),
customWidget: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Center(
@@ -540,6 +540,6 @@ class _AddEventState extends State<AddEvent> {
),
),
),
border: 1);
borderwidth: 1);
}
}

View File

@@ -7,7 +7,6 @@ import 'package:regroup/Common/CommonTabBar.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';
@@ -139,10 +138,10 @@ class _AddUsersState extends State<AddUsers> {
children: [
text18w700_FCFCFC("Group members"),
const Spacer(),
commonGlassContainer(
commonGlassUI(
width: 35.w,
height: 35.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector (5)22.png",
@@ -150,12 +149,12 @@ class _AddUsersState extends State<AddUsers> {
width: 12.w,
),
),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(14.w),
commonGlassContainer(
commonGlassUI(
width: 35.w,
height: 35.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
"assets/images/png/bi_filter.png",
@@ -163,7 +162,7 @@ class _AddUsersState extends State<AddUsers> {
width: 18.w,
),
),
border: 0.5)
borderwidth: 0.5)
],
),
),
@@ -238,9 +237,9 @@ class _AddUsersState extends State<AddUsers> {
],
),
const Spacer(),
commonGlassContainer(
border: 1,
borderradius: 2,
commonGlassUI(
borderwidth: 1,
borderRadius: BorderRadius.circular( 2),
height: 23.h,
width: 23.w,
opacity1: 0.24,
@@ -281,32 +280,32 @@ class _AddUsersState extends State<AddUsers> {
sizedBoxHeight(16.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("M")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Tu")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("W")),
border: 0.5),
borderwidth: 0.5),
const Spacer(),
Row(
children: [
@@ -326,32 +325,32 @@ class _AddUsersState extends State<AddUsers> {
sizedBoxHeight(20.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Th")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("F")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Sa")),
border: 0.5),
borderwidth: 0.5),
const Spacer(),
Row(
children: [

View File

@@ -121,14 +121,15 @@ class _AvailabilityState extends State<Availability> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
commonGlassContainer(
commonGlassUI(
width: double.infinity,
height: 670.h,
borderradius: 1,
border: 0,
borderRadius: BorderRadius.circular(1),
// border: 0,
customWidget: SfCalendar(
view: CalendarView.timelineMonth,
appointmentTextStyle: const TextStyle(color: Colors.white),
appointmentTextStyle:
const TextStyle(color: Colors.white),
headerStyle: const CalendarHeaderStyle(
textStyle: TextStyle(
color: Colors.blue,

View File

@@ -177,10 +177,7 @@ class _CalenderTabState extends State<CalenderTab> {
// initialIndex: selectedIndex.value,
child: Column(
children: [
const CommonTabBar(
tabs: [
const CommonTabBar(tabs: [
Tab(
text: 'My sessions',
),
@@ -190,7 +187,6 @@ class _CalenderTabState extends State<CalenderTab> {
]),
Expanded(
child: TabBarView(
children: [
mySessionsTab(),
comSessionTab(),
@@ -215,10 +211,11 @@ class _CalenderTabState extends State<CalenderTab> {
sizedBoxHeight(20.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: commonGlassContainer(
child: commonGlassUI(
width: double.infinity,
height: 136.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular(10.r) ,
borderwidth: 1,
customWidget: Row(
children: [
Padding(
@@ -245,15 +242,15 @@ class _CalenderTabState extends State<CalenderTab> {
Image.asset("assets/images/png/Rectangle 45.png")
],
),
border: 1),
),
),
sizedBoxHeight(25.h),
Stack(children: [
commonGlassContainer(
commonGlassUI(
width: double.infinity,
height: 500.h,
borderradius: 1,
border: 0,
borderRadius: BorderRadius.circular(1),
// borderw: 0,
customWidget: SfCalendar(
view: CalendarView.month,
appointmentTextStyle: const TextStyle(color: Colors.white),
@@ -456,10 +453,11 @@ class _CalenderTabState extends State<CalenderTab> {
onTap: () {
Get.toNamed(RouteName.eventDetails);
},
child: commonGlassContainer(
child: commonGlassUI(
width: double.infinity,
height: 300.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular( 10.r),
borderwidth: 1.w,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -529,15 +527,15 @@ class _CalenderTabState extends State<CalenderTab> {
sizedBoxWidth(16.w),
CircleAvatar(
radius: 12.r,
backgroundImage:
const AssetImage("assets/images/png/Ellipse 52.png"),
backgroundImage: const AssetImage(
"assets/images/png/Ellipse 52.png"),
),
sizedBoxWidth(8.w),
text14w400_FCFCFC("Ryan dorwat"),
],
)
]),
border: 1),
),
)
],
),
@@ -551,11 +549,11 @@ class _CalenderTabState extends State<CalenderTab> {
sizedBoxHeight(25.h),
Stack(children: [
commonGlassContainer(
commonGlassUI(
width: double.infinity,
height: 530.h,
borderradius: 1,
border: 0,
borderRadius: BorderRadius.circular(1),
// border: 0,
customWidget: SfCalendar(
view: CalendarView.month,
appointmentTextStyle: const TextStyle(color: Colors.white),
@@ -730,10 +728,11 @@ class _CalenderTabState extends State<CalenderTab> {
children: [
text18w700_FCFCFC(title),
sizedBoxHeight(25.h),
commonGlassContainer(
commonGlassUI(
width: double.infinity,
height: 290.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular( 10.r),
borderwidth: 1,
customWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -810,7 +809,7 @@ class _CalenderTabState extends State<CalenderTab> {
),
],
),
border: 1)
)
],
),
);

View File

@@ -5,7 +5,6 @@ import 'package:regroup/Common/CommonButton.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
@@ -37,41 +36,44 @@ class _EventDetailsState extends State<EventDetails> {
onTap: () {
Get.toNamed(RouteName.addEvent);
},
child: commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset("assets/images/png/Vector536.png",
height: 17.h, width: 17.w),
),
border: 0.5),
),
sizedBoxWidth(12.w),
commonGlassContainer(
child: commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
borderwidth: 0.5,
customWidget: Center(
child: Image.asset("assets/images/png/Vector522.png",
child: Image.asset("assets/images/png/Vector536.png",
height: 17.h, width: 17.w),
),
border: 0.5),
),
),
sizedBoxWidth(12.w),
commonGlassUI(
width: 40.w,
height: 40.h,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
borderwidth: 0.5,
customWidget: Center(
child: Image.asset("assets/images/png/Vector522.png",
height: 17.h, width: 17.w),
),
),
],
),
),
body: Stack(children: [
Container(
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
), SingleChildScrollView(
child: Column(
),
SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
@@ -98,20 +100,21 @@ class _EventDetailsState extends State<EventDetails> {
sizedBoxHeight(22.h),
Row(
children: [
commonGlassContainer(
width: 35.w,
height: 35.h,
borderradius: 100,
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 17.h,
width: 17.w,
),
commonGlassUI(
width: 35.w,
height: 35.h,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
borderwidth: 0.5,
customWidget: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 17.h,
width: 17.w,
),
border: 0.5),
),
),
sizedBoxWidth(10.w),
text16400white("20th April 2024 - 21st April 2024"),
],
@@ -119,10 +122,10 @@ class _EventDetailsState extends State<EventDetails> {
sizedBoxHeight(16.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 35.w,
height: 35.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
@@ -132,7 +135,7 @@ class _EventDetailsState extends State<EventDetails> {
width: 17.w,
),
),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(10.w),
text16400white("3 hours"),
],
@@ -140,10 +143,10 @@ class _EventDetailsState extends State<EventDetails> {
sizedBoxHeight(16.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 35.w,
height: 35.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(
@@ -153,7 +156,7 @@ class _EventDetailsState extends State<EventDetails> {
width: 17.w,
),
),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(10.w),
text16400white("Elm street london, United Kingdom"),
],
@@ -172,26 +175,26 @@ class _EventDetailsState extends State<EventDetails> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
commonGlassContainer(
commonGlassUI(
width: 87.w,
height: 40.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular(30.r),
customWidget:
Center(child: text16w400_white("Yes")),
border: 1),
commonGlassContainer(
borderwidth: 1),
commonGlassUI(
width: 87.w,
height: 40.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular(30.r),
customWidget: Center(child: text16w400_white("No")),
border: 1),
commonGlassContainer(
borderwidth: 1),
commonGlassUI(
width: 154.w,
height: 40.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular(30.r),
customWidget: Center(
child: text16w400_white("Not yet decided")),
border: 1),
borderwidth: 1),
],
),
sizedBoxHeight(20.h),
@@ -207,13 +210,13 @@ class _EventDetailsState extends State<EventDetails> {
sizedBoxHeight(16.h),
text18w700white("Are you attending this event ?"),
sizedBoxHeight(20.h),
commonGlassContainer(
commonGlassUI(
width: 221.w,
height: 40.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular(30.r),
customWidget:
Center(child: text16w400_white("Request to join")),
border: 1),
borderwidth: 1),
sizedBoxHeight(20.h),
commonDivider(),
],
@@ -241,10 +244,10 @@ class _EventDetailsState extends State<EventDetails> {
sizedBoxHeight(20.h),
Visibility(
visible: adminView,
child: commonGlassContainer(
child: commonGlassUI(
width: double.infinity,
height: 251.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular(10.r),
customWidget: Padding(
padding: const EdgeInsets.symmetric(vertical: 20),
child: Column(
@@ -266,15 +269,15 @@ class _EventDetailsState extends State<EventDetails> {
],
),
),
border: 1),
borderwidth: 1),
),
sizedBoxHeight(30.h),
Visibility(
visible: memberView,
child: commonGlassContainer(
child: commonGlassUI(
width: double.infinity,
height: 65.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular(10.r),
customWidget: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@@ -294,7 +297,7 @@ class _EventDetailsState extends State<EventDetails> {
text18w400white("90 Attending")
],
),
border: 1)),
borderwidth: 1)),
text18w700white("Messages"),
sizedBoxHeight(20.h),
Row(
@@ -307,20 +310,20 @@ class _EventDetailsState extends State<EventDetails> {
sizedBoxWidth(10.w),
text16w400_white("Send message to invites"),
const Spacer(),
commonGlassContainer(
commonGlassUI(
width: 98.w,
height: 30.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular( 30.r),
customWidget:
Center(child: text14400white("Select")),
border: 1)
borderwidth: 1)
],
),
sizedBoxHeight(25.h),
commonGlassContainer(
commonGlassUI(
width: double.infinity,
height: 240.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular( 10.r),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 80.w),
child: Column(
@@ -354,7 +357,7 @@ class _EventDetailsState extends State<EventDetails> {
)
]),
),
border: 1),
borderwidth: 1),
sizedBoxHeight(50.h),
CommonBtn(text: "Join the event"),
sizedBoxHeight(40.h),

View File

@@ -189,12 +189,12 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
child: Center(child: text10400white("Attending")),
),
sizedBoxWidth(8.w),
commonGlassContainer(
commonGlassUI(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100.r,
borderRadius: BorderRadius.circular(100.r),
customWidget: Center(
child: Image.asset(
"assets/images/png/alarm 1 (traced).png",
@@ -202,14 +202,14 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
width: 13.w,
),
),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(8.w),
commonGlassContainer(
commonGlassUI(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100.r,
borderRadius: BorderRadius.circular( 100.r),
customWidget: Center(
child: Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
@@ -217,7 +217,7 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
width: 13.w,
),
),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(12.w)
],
),
@@ -244,32 +244,32 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
sizedBoxHeight(16.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("M")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Tu")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("W")),
border: 0.5),
borderwidth: 0.5),
const Spacer(),
Row(
children: [
@@ -289,32 +289,32 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
sizedBoxHeight(20.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Th")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular(100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("F")),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(15.w),
commonGlassContainer(
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
opacity1: 0.24,
opacity2: 0.24,
customWidget: Center(child: text16w400_FCFCFC("Sa")),
border: 0.5),
borderwidth: 0.5),
const Spacer(),
Row(
children: [
@@ -374,4 +374,6 @@ class _ManageMembersCalState extends State<ManageMembersCal> {
),
));
}
}

View File

@@ -89,10 +89,10 @@ class _ResourcePoolState extends State<ResourcePool> {
}
Widget resourceCard() {
return commonGlassContainer(
return commonGlassUI(
width: double.infinity,
height: 216.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular( 10.r),
customWidget: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child:
@@ -177,7 +177,7 @@ class _ResourcePoolState extends State<ResourcePool> {
),
]),
),
border: 1);
borderwidth: 1);
}
void inviteBottomSheet() {
@@ -258,9 +258,9 @@ class _ResourcePoolState extends State<ResourcePool> {
sizedBoxWidth(10.w),
text16w400_FCFCFC(title),
const Spacer(),
commonGlassContainer(
border: 1,
borderradius: 2,
commonGlassUI(
borderwidth: 1,
borderRadius: BorderRadius.circular( 2),
height: 23.h,
width: 23.w,
opacity1: 0.24,

View File

@@ -138,10 +138,10 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
children: [
text16400white("Start time"),
sizedBoxHeight(14.h),
commonGlassContainer(
commonGlassUI(
width: 174.w,
height: 50.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular(30.r),
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
@@ -154,7 +154,7 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
text16w400_white("3:00 pm")
]),
),
border: 1)
borderwidth: 1)
],
),
const Spacer(),
@@ -163,10 +163,10 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
children: [
text16400white("End time"),
sizedBoxHeight(14.h),
commonGlassContainer(
commonGlassUI(
width: 174.w,
height: 50.h,
borderradius: 30.r,
borderRadius: BorderRadius.circular( 30.r),
customWidget: Center(
child: Row(children: [
sizedBoxWidth(16.w),
@@ -179,7 +179,7 @@ class _SetAvailabillityState extends State<SetAvailabillity> {
text16w400_white("5:00 pm")
]),
),
border: 1)
borderwidth: 1)
],
),
],

View File

@@ -264,13 +264,13 @@ class _GroupChatPageState extends State<GroupChatPage> {
child: Row(
children: [
sizedBoxWidth(10.w),
commonGlassContainer(
border: 0.9,
commonGlassUI(
borderwidth: 0.9,
width: 40.w,
height: 40.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
customWidget: Center(
child: Image.asset(
'assets/images/png/appbararrowbutton.png')

View File

@@ -7,7 +7,7 @@ import 'package:glassmorphism/glassmorphism.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
@@ -266,13 +266,13 @@ class _UserChatPageState extends State<UserChatPage> {
child: Row(
children: [
sizedBoxWidth(10.w),
commonGlassContainer(
border: 0.9,
commonGlassUI(
borderwidth: 0.9,
width: 40.w,
height: 40.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
borderRadius: BorderRadius.circular( 100),
customWidget: Center(
child: Image.asset(
'assets/images/png/appbararrowbutton.png')
@@ -330,7 +330,7 @@ class _UserChatPageState extends State<UserChatPage> {
onTapDown: (details) {
_showContextMenu(context, details.globalPosition);
},
child: Container(
child: SizedBox(
width: 30,
height: 20,
child: Image.asset(
@@ -495,7 +495,7 @@ class _UserChatPageState extends State<UserChatPage> {
const Color(0xFFffffff).withOpacity(0.24),
const Color(0xFFFFFFFF).withOpacity(0.24),
],
stops: [
stops: const [
0.1,
1,
]),

View File

@@ -0,0 +1,252 @@
class CommonDatumObjModel {
CommonDatumObjModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<CommonDatumObjModelData> data;
factory CommonDatumObjModel.fromJson(Map<String, dynamic> json) {
return CommonDatumObjModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null
? []
: List<CommonDatumObjModelData>.from(
json["data"]!.map((x) => CommonDatumObjModelData.fromJson(x))),
);
}
}
class CommonDatumObjModelData {
CommonDatumObjModelData({
required this.id,
required this.likecount,
required this.isISaved,
required this.tagsXid,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.likeIcon,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.totalPopularScore,
required this.totalHoursAgo,
this.iamPrincipal,
this.community,
required this.attachTags,
});
final int? id;
final int? likecount;
final bool? isISaved;
final List<int> tagsXid;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final LikeIcon1? likeIcon;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag1> attachTags;
factory CommonDatumObjModelData.fromJson(Map<String, dynamic> json) {
return CommonDatumObjModelData(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
tagsXid: json["tags_xid"] == null
? []
: List<int>.from(json["tags_xid"]!.map((x) => x)),
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
likeIcon: json["likeIcon"] == null
? null
: LikeIcon1.fromJson(json["likeIcon"]),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null
? null
: IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null
? null
: Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null
? []
: List<AttachTag1>.from(
json["attach_tags"]!.map((x) => AttachTag1.fromJson(x))),
);
}
}
class AttachTag1 {
AttachTag1({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTagPopular? manageTag;
factory AttachTag1.fromJson(Map<String, dynamic> json) {
return AttachTag1(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null
? null
: ManageTagPopular.fromJson(json["manage_tag"]),
);
}
}
class ManageTagPopular {
ManageTagPopular({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTagPopular.fromJson(Map<String, dynamic> json) {
return ManageTagPopular(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json) {
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json) {
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon1 {
LikeIcon1({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass1? likeIcon;
factory LikeIcon1.fromJson(Map<String, dynamic> json) {
return LikeIcon1(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null
? null
: LikeIconClass1.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass1 {
LikeIconClass1({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass1.fromJson(Map<String, dynamic> json) {
return LikeIconClass1(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,276 @@
class FeedPostModel {
FeedPostModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final Data? data;
factory FeedPostModel.fromJson(Map<String, dynamic> json) {
return FeedPostModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? null : Data.fromJson(json["data"]),
);
}
}
class Data {
Data({
required this.pinnedCommunityPost,
required this.pinnedUserPost,
required this.pinnedTagsPost,
});
final List<PinnedPost> pinnedCommunityPost;
final List<PinnedPost> pinnedUserPost;
final List<PinnedPost> pinnedTagsPost;
factory Data.fromJson(Map<String, dynamic> json) {
return Data(
pinnedCommunityPost: json["pinned_community_post"] == null
? []
: List<PinnedPost>.from(json["pinned_community_post"]!
.map((x) => PinnedPost.fromJson(x))),
pinnedUserPost: json["pinned_user_post"] == null
? []
: List<PinnedPost>.from(
json["pinned_user_post"]!.map((x) => PinnedPost.fromJson(x))),
// pinnedTagsPost: json["pinned_tags_post"] == null ? [] : List<PinnedPost>.from(json["pinned_tags_post"]!.map((x) => PinnedPost.fromJson(x))),
pinnedTagsPost: json["pinned_tags_post"] == null
? []
:
List<PinnedPost>.from(
json["pinned_tags_post"]!.map((x) => PinnedPost.fromJson(x))),
// List<PinnedPost>.from(json["pinned_tags_post"]!
// .expand((x) => x as List)
// .map((x) => PinnedPost.fromJson(x))),
);
}
}
class PinnedPost {
PinnedPost({
required this.id,
required this.likecount,
required this.isISaved,
required this.tagsXid,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.likeIcon,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.totalPopularScore,
required this.totalHoursAgo,
required this.iamPrincipal,
required this.community,
required this.attachTags,
});
final int? id;
final int? likecount;
final bool? isISaved;
final List<int> tagsXid;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final LikeIcon? likeIcon;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag> attachTags;
factory PinnedPost.fromJson(Map<String, dynamic> json){
return PinnedPost(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null ? null : Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
);
}
}
class AttachTag {
AttachTag({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTag? manageTag;
factory AttachTag.fromJson(Map<String, dynamic> json){
return AttachTag(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
);
}
}
class ManageTag {
ManageTag({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTag.fromJson(Map<String, dynamic> json){
return ManageTag(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json){
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json){
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon {
LikeIcon({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass? likeIcon;
factory LikeIcon.fromJson(Map<String, dynamic> json){
return LikeIcon(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass {
LikeIconClass({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass.fromJson(Map<String, dynamic> json){
return LikeIconClass(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,242 @@
class LatestpostModel {
LatestpostModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<Datum> data;
factory LatestpostModel.fromJson(Map<String, dynamic> json){
return LatestpostModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
);
}
}
class Datum {
Datum({
required this.id,
required this.likecount,
required this.isISaved,
required this.tagsXid,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.likeIcon,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.totalPopularScore,
required this.totalHoursAgo,
required this.iamPrincipal,
required this.community,
required this.attachTags,
});
final int? id;
final int? likecount;
final bool? isISaved;
final List<int> tagsXid;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final LikeIcon? likeIcon;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag> attachTags;
factory Datum.fromJson(Map<String, dynamic> json){
return Datum(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null ? null : Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
);
}
}
class AttachTag {
AttachTag({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTag? manageTag;
factory AttachTag.fromJson(Map<String, dynamic> json){
return AttachTag(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
);
}
}
class ManageTag {
ManageTag({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTag.fromJson(Map<String, dynamic> json){
return ManageTag(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json){
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json){
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon {
LikeIcon({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass? likeIcon;
factory LikeIcon.fromJson(Map<String, dynamic> json){
return LikeIcon(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass {
LikeIconClass({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass.fromJson(Map<String, dynamic> json){
return LikeIconClass(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,242 @@
class PopularpostModel {
PopularpostModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<Datum> data;
factory PopularpostModel.fromJson(Map<String, dynamic> json){
return PopularpostModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
);
}
}
class Datum {
Datum({
required this.id,
required this.likecount,
required this.isISaved,
required this.tagsXid,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.likeIcon,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.totalPopularScore,
required this.totalHoursAgo,
required this.iamPrincipal,
required this.community,
required this.attachTags,
});
final int? id;
final int? likecount;
final bool? isISaved;
final List<int> tagsXid;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final LikeIcon? likeIcon;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag> attachTags;
factory Datum.fromJson(Map<String, dynamic> json){
return Datum(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null ? null : Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
);
}
}
class AttachTag {
AttachTag({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTagPopular? manageTag;
factory AttachTag.fromJson(Map<String, dynamic> json){
return AttachTag(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null ? null : ManageTagPopular.fromJson(json["manage_tag"]),
);
}
}
class ManageTagPopular {
ManageTagPopular({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTagPopular.fromJson(Map<String, dynamic> json){
return ManageTagPopular(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json){
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json){
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon {
LikeIcon({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass? likeIcon;
factory LikeIcon.fromJson(Map<String, dynamic> json){
return LikeIcon(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass {
LikeIconClass({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass.fromJson(Map<String, dynamic> json){
return LikeIconClass(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,64 @@
class FetchlikeIconsModel {
String? status;
int? statusCode;
String? message;
List<ReactionData>? data;
FetchlikeIconsModel({this.status, this.statusCode, this.message, this.data});
FetchlikeIconsModel.fromJson(Map<String, dynamic> json) {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
if (json['data'] != null) {
data = <ReactionData>[];
json['data'].forEach((v) {
data!.add(ReactionData.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['status'] = status;
data['status_code'] = statusCode;
data['message'] = message;
if (this.data != null) {
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
return data;
}
}
class ReactionData {
int? id;
String image = "";
ReactionData({this.id, required this.image});
ReactionData.fromJson(Map<String, dynamic> json) {
id = json['id'];
image = json['image'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['image'] = image;
return data;
}
}
// class ReactionData {
// final int id;
// final String image;
// ReactionData({required this.id, required this.image});
// factory ReactionData.fromJson(Map<String, dynamic> json) {
// return ReactionData(
// id: json['id'],
// image: json['image'],
// );
// }
// }

View File

@@ -0,0 +1,34 @@
// ignore_for_file: file_names
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/Main_Screens/Community/Model/FeedPostModel.dart';
FeedPostModel? feedpostobj;
class FeedpostApi {
FeedpostApi();
Future<ResponseData<dynamic>> getFeedPostApi() async {
final response = await NetworkApiServices().getApi(ApiUrls.getfeedpost);
if (response.status == ResponseStatus.SUCCESS) {
// dynamic responseData = response.data;
if (response.data["status"] == "success") {
feedpostobj = FeedPostModel.fromJson(response.data);
}
// if (responseData is Map<String, dynamic>) {
// feedpostobj = FeedPostModel.fromJson(responseData);
// }
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.SUCCESS,
data: response.data);
} else {
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.FAILED);
}
}
}

View File

@@ -0,0 +1,26 @@
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/Main_Screens/Community/Model/LatestPostModel.dart';
LatestpostModel? latestpostobj;
class LatespostApi {
LatespostApi();
Future<ResponseData<dynamic>> getLatestPostApi() async {
final response = await NetworkApiServices().getApi(ApiUrls.getlatestpost);
if (response.status == ResponseStatus.SUCCESS) {
if (response.data["status"] == "success") {
latestpostobj = LatestpostModel.fromJson(response.data);
}
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.SUCCESS,
data: response.data);
} else {
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.FAILED);
}
}
}

View File

@@ -0,0 +1,26 @@
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/Main_Screens/Community/Model/PopularPostModel.dart';
PopularpostModel? popularpostobj;
class PopularpostApi{
PopularpostApi();
Future<ResponseData<dynamic>> getPopularPostApi() async {
final response = await NetworkApiServices().getApi(ApiUrls.getpopularpost);
if (response.status == ResponseStatus.SUCCESS) {
if (response.data["status"] == "success") {
popularpostobj = PopularpostModel.fromJson(response.data);
}
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.SUCCESS,
data: response.data);
} else {
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.FAILED);
}
}
}

View File

@@ -0,0 +1,22 @@
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/Main_Screens/Community/Model/fetchicons.dart';
FetchlikeIconsModel? fetchlikeIconsModel;
class Communityallgetmethod {
Future<ResponseData<dynamic>> getLikeicons() async {
final response = await NetworkApiServices().getApi(
ApiUrls.getLikeicons,
// optionalpar: false
);
if (response.status == ResponseStatus.SUCCESS) {
fetchlikeIconsModel = FetchlikeIconsModel.fromJson(response.data);
// log(likeiconsobj!.data.toString());
}
return response;
}
}

View File

@@ -0,0 +1,15 @@
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>> postLikepost(updata) async {
final response = await NetworkApiServices().postApi(
updata,
ApiUrls.postLike,
);
return response;
}
}

View File

@@ -0,0 +1,911 @@
// ignore_for_file: unused_local_variable, non_constant_identifier_names, avoid_print, file_names
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonBottomNavigationBar.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/ConvertServerDateToUserDate.dart';
import 'package:regroup/Common/controller/NormalPostCard.dart';
import 'package:regroup/Common/controller/MainScreen.dart';
import 'package:regroup/Main_Screens/Community/Model/CommonDatumObjModel.dart';
import 'package:regroup/Main_Screens/Community/Model/FeedPostModel.dart'
as feedobj;
// import 'package:regroup/Main_Screens/Community/Model/PopularPostModel.dart';
// import 'package:regroup/Main_Screens/Community/Model/LatestPostModel.dart' as latest;
import 'package:regroup/Main_Screens/Community/Model/fetchicons.dart';
import 'package:regroup/Main_Screens/Community/ViewModel/FeedPost.dart';
import 'package:regroup/Main_Screens/Community/ViewModel/LatestPost.dart';
import 'package:regroup/Main_Screens/Community/ViewModel/PopularPost.dart';
import 'package:regroup/Main_Screens/Community/ViewModel/getmethod.dart';
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/View/ReactionView.dart';
import 'package:regroup/Utils/Common/ShimmerCommon.dart';
// import 'package:regroup/Feed%20Module/sidemenu/sidemenu.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:regroup/sidemenu/sidemenu.dart';
import 'view_model/CountersHelper.dart';
class CommunityScreen extends StatefulWidget {
const CommunityScreen({super.key});
@override
State<CommunityScreen> createState() => _CommunityScreenState();
}
class _CommunityScreenState extends State<CommunityScreen> {
final GlobalKey<ScaffoldState> _scaffoldKey1 = GlobalKey<ScaffoldState>();
final CountersHelper countersHelper = Get.put(CountersHelper());
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
key: _scaffoldKey1,
backgroundColor: const Color(0xFF222935),
drawer: SizedBox(width: 300.w, child: const SideMenu()),
extendBody: true,
appBar: AppBar(
scrolledUnderElevation: 0.0,
backgroundColor: const Color(0xff222935),
elevation: 0,
automaticallyImplyLeading: false,
titleSpacing: 0,
leading: InkWell(
onTap: () {
_scaffoldKey1.currentState?.openDrawer();
},
child: Center(
child: Image.asset(
'assets/images/png/menu.png',
height: 15.h,
width: 20.w,
),
),
),
title: Image.asset(
'assets/images/png/Group.png',
width: 26.w,
height: 25.h,
),
actions: [
GestureDetector(
onTap: () {
Get.toNamed(RouteName.explorescreen);
},
child: Image.asset(
'assets/images/png/ion_search-outline.png',
height: 25.h,
width: 25.w,
),
),
sizedBoxWidth(10.w),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.notificaationpage);
},
child: Image.asset(
'assets/images/png/Frame 9.png',
height: 25.h,
width: 25.w,
),
),
sizedBoxWidth(16.w),
],
),
body: Stack(clipBehavior: Clip.none, children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(
'assets/images/png/HomeScreenBackground.png',
))),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
child: Column(children: [
Expanded(
child: DefaultTabController(
length: 3,
child: Column(
children: [
const CommonTabBar(tabs: [
Tab(
text: 'Feed',
),
Tab(
text: 'Popular',
),
Tab(
text: 'Latest',
),
]),
const Expanded(
child: TabBarView(
children: [
FeedTab(),
PopularTab(),
LatestTab(),
],
),
),
sizedBoxHeight(90.h)
],
),
),
),
]))
]),
floatingActionButton: Container(
height: 40.h,
width: 164.w,
decoration: BoxDecoration(
// shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(30.r),
boxShadow: const [
BoxShadow(
color: Color(0x40000000),
offset: Offset(0, 6),
blurRadius: 8,
),
],
),
child: FloatingActionButton(
onPressed: () {
Get.toNamed(RouteName.postscreen);
},
backgroundColor: const Color(0xFFD90B2E),
autofocus: true,
// shape: const OvalBorder(),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.r),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// SvgPicture.asset('assets/images/svg/add 1.svg'),
Image.asset('assets/images/png/add 1.png'),
sizedBoxWidth(4.w),
text16400white('Create posts')
],
)
// Image.asset(
// "assets/images/png/iconamoon_edit-thin.png",
// height: 30.h,
// width: 30.w,
// ),
),
),
bottomNavigationBar: bottomnavigationbar(mainController),
);
}
}
class FeedTab extends StatefulWidget {
const FeedTab({super.key});
@override
State<FeedTab> createState() => _FeedTabState();
}
class _FeedTabState extends State<FeedTab> {
late Future feedfuture;
List<ReactionData> _reactions = [];
final Map<int, ReactionData?> _selectedReactions = {};
final CountersHelper countersHelper = Get.find<CountersHelper>();
int? likeIconIdnew;
List<feedobj.PinnedPost> combinedList = [];
@override
void initState() {
feedfuture = FeedpostApi().getFeedPostApi();
super.initState();
}
_fetchIcons() {
_reactions = fetchlikeIconsModel!.data ?? [];
for (var post in commonobjmodel!.data) {
//Check if post as a like icon
if (post.likeIcon?.likeIcon?.id != null) {
likeIconIdnew = post.likeIcon!.likeIconsXid;
final selectedReaction = _reactions.firstWhere(
(r) => r.id == likeIconIdnew,
orElse: () => _reactions.first,
);
_selectedReactions[post.id!] =
selectedReaction; // Set selected reaction for this post
} else {
_selectedReactions[post.id!] = null; // No reaction selected
print('No reaction selected for post $postId');
}
}
}
Future<void> setValues() async {
if (mounted) {
combinedList.clear();
combinedListGlobal.clear();
combinedList.addAll(feedpostobj!.data!.pinnedCommunityPost);
combinedList.addAll(feedpostobj!.data!.pinnedUserPost);
combinedList.addAll(feedpostobj!.data!.pinnedTagsPost);
combinedListGlobal.addAll(combinedList);
_setModel();
countersHelper.setListsPopular();
await _fetchIcons();
}
}
_sortTags(index) {
var tags = commonobjmodel!.data[index].attachTags
.where((tag) => tag.manageTag?.name?.isNotEmpty ?? false)
.map((tag) => tag.manageTag!)
.toList();
return tags;
}
_setModel() {
commonobjmodel = null;
commonobjmodel = CommonDatumObjModel(
status: feedpostobj!.status,
statusCode: feedpostobj!.statusCode,
message: feedpostobj!.message,
data: combinedList
.map((e) => CommonDatumObjModelData(
id: e.id,
likecount: e.likecount,
isISaved: e.isISaved,
tagsXid: e.tagsXid,
isILiked: e.isILiked,
totalComment: e.totalComment,
totalSave: e.totalSave,
iamPrincipalXid: e.iamPrincipalXid,
postIn: e.postIn,
caption: e.caption,
image: e.image,
manageTagsXids: e.manageTagsXids,
postAs: e.postAs,
ctaTitle: e.ctaTitle,
ctaLink: e.ctaLink,
createdAt: e.createdAt,
likeIcon: LikeIcon1(
likeIcon: LikeIconClass1(
id: e.likeIcon?.likeIcon?.id,
image: e.likeIcon?.likeIcon?.image),
likeIconsXid: e.likeIcon?.likeIconsXid,
),
totalViewCount: e.totalViewCount,
totalReactionCount: e.totalReactionCount,
totalCommentCount: e.totalCommentCount,
totalImpressionCount: e.totalImpressionCount,
totalPopularScore: e.totalPopularScore,
totalHoursAgo: e.totalHoursAgo,
iamPrincipal: IamPrincipal(
id: e.iamPrincipal!.id,
isUserPinned: e.iamPrincipal!.isUserPinned,
principalTypeXid: e.iamPrincipal!.principalTypeXid,
userName: e.iamPrincipal!.userName,
fullName: e.iamPrincipal!.fullName,
profilePhoto: e.iamPrincipal!.profilePhoto),
community: Community(
id: e.community!.id,
communityProfilePhoto: e.community!.communityProfilePhoto,
communityName: e.community!.communityName),
attachTags: e.attachTags
.map((e) => AttachTag1(
managePostXid: e.managePostXid,
manageTagXid: e.manageTagXid,
manageTag: ManageTagPopular(
id: e.manageTag?.id,
isPinned: e.manageTag?.isPinned,
name: e.manageTag?.name)))
.toList()))
.toList());
}
@override
Widget build(BuildContext context) {
return Obx(
() => countersHelper.updateFeedsPage.value
? FutureBuilder(
future: FeedpostApi().getFeedPostApi(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: ShimmerCommon());
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
setValues();
return Stack(
clipBehavior: Clip.none,
children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill),
),
),
combinedList.isEmpty
? Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"No posts are currently pinned",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w600),
)
],
),
)
: Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
shrinkWrap: true,
itemCount: commonobjmodel!.data.length,
itemBuilder: (context, index) {
var timeAgo = ConvertServerDateToUserDate()
.convertServerDateToReadableFormate(
commonobjmodel!
.data[index].createdAt
.toString());
return Column(
children: [
NormalCardTile(
tags: _sortTags(index),
createAt: timeAgo ?? '1 hour',
commonObj:
commonobjmodel!.data[index],
forWhichTab: 'feed',
reactions: _reactions,
selectedReactions:
_selectedReactions,
currentIndex: index,
),
sizedBoxHeight(20.h)
],
);
},
),
),
],
)
],
);
}
return Container();
},
)
: FutureBuilder(
future: FeedpostApi().getFeedPostApi(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: ShimmerCommon());
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
setValues();
return Stack(
clipBehavior: Clip.none,
children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill),
),
),
combinedList.isEmpty
? Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"No posts are currently pinned",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w600),
)
],
),
)
: Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
shrinkWrap: true,
itemCount: commonobjmodel!.data.length,
itemBuilder: (context, index) {
var timeAgo = ConvertServerDateToUserDate()
.convertServerDateToReadableFormate(
commonobjmodel!
.data[index].createdAt
.toString());
return Column(
children: [
NormalCardTile(
tags: _sortTags(index),
createAt: timeAgo ?? '1 hour',
commonObj:
commonobjmodel!.data[index],
forWhichTab: 'feed',
reactions: _reactions,
selectedReactions:
_selectedReactions,
currentIndex: index,
),
sizedBoxHeight(20.h)
],
);
},
),
),
],
)
],
);
}
return Container();
},
),
);
}
}
class PopularTab extends StatefulWidget {
const PopularTab({super.key});
@override
State<PopularTab> createState() => _PopularTabState();
}
class _PopularTabState extends State<PopularTab> {
List<ReactionData> _reactions = [];
final Map<int, ReactionData?> _selectedReactions = {};
final CountersHelper countersHelper = Get.find<CountersHelper>();
int? likeIconIdnew;
@override
void initState() {
super.initState();
}
Future<void> _fetchIcons() async {
_reactions = fetchlikeIconsModel!.data ?? [];
for (var post in commonobjmodel!.data) {
//Check if post as a like icon
if (post.likeIcon?.likeIcon?.id != null) {
likeIconIdnew = post.likeIcon!.likeIconsXid;
final selectedReaction = _reactions.firstWhere(
(r) => r.id == likeIconIdnew,
orElse: () => _reactions.first,
);
_selectedReactions[post.id!] =
selectedReaction; // Set selected reaction for this post
} else {
_selectedReactions[post.id!] = null; // No reaction selected
print('No reaction selected for post $postId');
}
}
}
Future<void> setValues() async {
if (mounted) {
_setModel();
countersHelper.setListsPopular();
await _fetchIcons();
}
}
Future<void> _initialize() async {
//api call here
await PopularpostApi().getPopularPostApi();
await setValues();
}
_sortTags(index) {
var tags = commonobjmodel!.data[index].attachTags
.where((tag) => tag.manageTag?.name?.isNotEmpty ?? false)
.map((tag) => tag.manageTag!)
.toList();
return tags;
}
_setModel() {
commonobjmodel = null;
commonobjmodel = CommonDatumObjModel(
status: popularpostobj!.status,
statusCode: popularpostobj!.statusCode,
message: popularpostobj!.message,
data: popularpostobj!.data
.map((e) => CommonDatumObjModelData(
id: e.id,
likecount: e.likecount,
isISaved: e.isISaved,
tagsXid: e.tagsXid,
isILiked: e.isILiked,
totalComment: e.totalComment,
totalSave: e.totalSave,
iamPrincipalXid: e.iamPrincipalXid,
postIn: e.postIn,
caption: e.caption,
image: e.image,
manageTagsXids: e.manageTagsXids,
postAs: e.postAs,
ctaTitle: e.ctaTitle,
ctaLink: e.ctaLink,
createdAt: e.createdAt,
likeIcon: LikeIcon1(
likeIcon: LikeIconClass1(
id: e.likeIcon?.likeIcon?.id,
image: e.likeIcon?.likeIcon?.image),
likeIconsXid: e.likeIcon?.likeIconsXid,
),
totalViewCount: e.totalViewCount,
totalReactionCount: e.totalReactionCount,
totalCommentCount: e.totalCommentCount,
totalImpressionCount: e.totalImpressionCount,
totalPopularScore: e.totalPopularScore,
totalHoursAgo: e.totalHoursAgo,
iamPrincipal: IamPrincipal(
id: e.iamPrincipal!.id,
isUserPinned: e.iamPrincipal!.isUserPinned,
principalTypeXid: e.iamPrincipal!.principalTypeXid,
userName: e.iamPrincipal!.userName,
fullName: e.iamPrincipal!.fullName,
profilePhoto: e.iamPrincipal!.profilePhoto),
community: Community(
id: e.community!.id,
communityProfilePhoto: e.community!.communityProfilePhoto,
communityName: e.community!.communityName),
attachTags: e.attachTags
.map((e) => AttachTag1(
managePostXid: e.managePostXid,
manageTagXid: e.manageTagXid,
manageTag: ManageTagPopular(
id: e.manageTag?.id,
isPinned: e.manageTag?.isPinned,
name: e.manageTag?.name)))
.toList()))
.toList());
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: _initialize(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: ShimmerCommon());
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done) {
return Stack(clipBehavior: Clip.none, children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill),
),
),
commonobjmodel!.data.isEmpty
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: Column(
children: [
Text(
"No Posts Available",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w600),
)
],
),
),
])
: Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
shrinkWrap: true,
itemCount: commonobjmodel!.data.length,
itemBuilder: (context, index) {
var timeAgo = ConvertServerDateToUserDate()
.convertServerDateToReadableFormate(
commonobjmodel!.data[index].createdAt
.toString());
return Column(
children: [
NormalCardTile(
tags: _sortTags(index),
createAt: timeAgo ?? '1 hour',
commonObj: commonobjmodel!.data[index],
forWhichTab: 'popular',
reactions: _reactions,
selectedReactions: _selectedReactions,
currentIndex: index,
),
sizedBoxHeight(20.h)
],
);
},
),
),
],
)
]);
}
return Container();
});
}
}
class LatestTab extends StatefulWidget {
const LatestTab({super.key});
@override
State<LatestTab> createState() => _LatestTabState();
}
class _LatestTabState extends State<LatestTab> {
@override
void initState() {
super.initState();
}
List<ReactionData> _reactions = [];
final Map<int, ReactionData?> _selectedReactions = {};
final CountersHelper countersHelper = Get.find<CountersHelper>();
int? likeIconIdnew;
_fetchIcons() {
_reactions = fetchlikeIconsModel!.data ?? [];
for (var post in commonobjmodel!.data) {
//Check if post as a like icon
if (post.likeIcon?.likeIcon?.id != null) {
likeIconIdnew = post.likeIcon!.likeIconsXid;
final selectedReaction = _reactions.firstWhere(
(r) => r.id == likeIconIdnew,
orElse: () => _reactions.first,
);
_selectedReactions[post.id!] =
selectedReaction; // Set selected reaction for this post
} else {
_selectedReactions[post.id!] = null; // No reaction selected
print('No reaction selected for post $postId');
}
}
}
bool _isDataInitialized = true;
Future<void> setValues() async {
if (_isDataInitialized) {
_setModel();
countersHelper.setListsPopular();
_fetchIcons();
_isDataInitialized = false;
}
}
_sortTags(index) {
var tags = commonobjmodel!.data[index].attachTags
.where((tag) => tag.manageTag?.name?.isNotEmpty ?? false)
.map((tag) => tag.manageTag!)
.toList();
return tags;
}
_setModel() {
commonobjmodel = null;
commonobjmodel = CommonDatumObjModel(
status: latestpostobj!.status,
statusCode: latestpostobj!.statusCode,
message: latestpostobj!.message,
data: latestpostobj!.data
.map((e) => CommonDatumObjModelData(
id: e.id,
likecount: e.likecount,
isISaved: e.isISaved,
tagsXid: e.tagsXid,
isILiked: e.isILiked,
totalComment: e.totalComment,
totalSave: e.totalSave,
iamPrincipalXid: e.iamPrincipalXid,
postIn: e.postIn,
caption: e.caption,
image: e.image,
manageTagsXids: e.manageTagsXids,
postAs: e.postAs,
ctaTitle: e.ctaTitle,
ctaLink: e.ctaLink,
createdAt: e.createdAt,
likeIcon: LikeIcon1(
likeIcon: LikeIconClass1(
id: e.likeIcon?.likeIcon?.id,
image: e.likeIcon?.likeIcon?.image),
likeIconsXid: e.likeIcon?.likeIconsXid,
),
totalViewCount: e.totalViewCount,
totalReactionCount: e.totalReactionCount,
totalCommentCount: e.totalCommentCount,
totalImpressionCount: e.totalImpressionCount,
totalPopularScore: e.totalPopularScore,
totalHoursAgo: e.totalHoursAgo,
iamPrincipal: IamPrincipal(
id: e.iamPrincipal!.id,
isUserPinned: e.iamPrincipal!.isUserPinned,
principalTypeXid: e.iamPrincipal!.principalTypeXid,
userName: e.iamPrincipal!.userName,
fullName: e.iamPrincipal!.fullName,
profilePhoto: e.iamPrincipal!.profilePhoto),
community: Community(
id: e.community!.id,
communityProfilePhoto: e.community!.communityProfilePhoto,
communityName: e.community!.communityName),
attachTags: e.attachTags
.map((e) => AttachTag1(
managePostXid: e.managePostXid,
manageTagXid: e.manageTagXid,
manageTag: ManageTagPopular(
id: e.manageTag?.id,
isPinned: e.manageTag?.isPinned,
name: e.manageTag?.name)))
.toList()))
.toList());
}
Future<void> _initialize() async {
//api call here
await LatespostApi().getLatestPostApi();
await setValues();
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: _initialize(),
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: ShimmerCommon());
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done) {
return Stack(
clipBehavior: Clip.none,
children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill),
),
),
commonobjmodel!.data.isEmpty
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(
child: Column(
children: [
Text(
"No Post Available",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w600),
)
],
),
),
],
)
: Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
shrinkWrap: true,
itemCount: commonobjmodel!.data.length,
itemBuilder: (context, index) {
var timeAgo = ConvertServerDateToUserDate()
.convertServerDateToReadableFormate(
commonobjmodel!.data[index].createdAt
.toString());
return Column(
children: [
NormalCardTile(
tags: _sortTags(index),
createAt: timeAgo ?? '1 hour',
commonObj: commonobjmodel!.data[index],
forWhichTab: 'latest',
reactions: _reactions,
selectedReactions: _selectedReactions,
currentIndex: index,
),
sizedBoxHeight(20.h)
],
);
},
),
),
],
),
],
);
}
return Container();
},
);
}
}

View File

@@ -0,0 +1,242 @@
class TagdetailsModel {
TagdetailsModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<Datum> data;
factory TagdetailsModel.fromJson(Map<String, dynamic> json){
return TagdetailsModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
);
}
}
class Datum {
Datum({
required this.id,
required this.likecount,
required this.isISaved,
required this.tagsXid,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.likeIcon,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.totalPopularScore,
required this.totalHoursAgo,
required this.iamPrincipal,
required this.community,
required this.attachTags,
});
final int? id;
final int? likecount;
final bool? isISaved;
final List<int> tagsXid;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final LikeIcon? likeIcon;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag> attachTags;
factory Datum.fromJson(Map<String, dynamic> json){
return Datum(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null ? null : Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
);
}
}
class AttachTag {
AttachTag({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTag? manageTag;
factory AttachTag.fromJson(Map<String, dynamic> json){
return AttachTag(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
);
}
}
class ManageTag {
ManageTag({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTag.fromJson(Map<String, dynamic> json){
return ManageTag(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json){
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json){
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon {
LikeIcon({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass? likeIcon;
factory LikeIcon.fromJson(Map<String, dynamic> json){
return LikeIcon(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass {
LikeIconClass({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass.fromJson(Map<String, dynamic> json){
return LikeIconClass(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,243 @@
class TagPopulardetailsModel {
TagPopulardetailsModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<Datum> data;
factory TagPopulardetailsModel.fromJson(Map<String, dynamic> json){
return TagPopulardetailsModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
);
}
}
class Datum {
Datum({
required this.id,
required this.likecount,
required this.isISaved,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.likeIcon,
required this.tagsXid,
required this.totalPopularScore,
required this.totalHoursAgo,
required this.iamPrincipal,
required this.community,
required this.attachTags,
});
final int? id;
final int? likecount;
final bool? isISaved;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final LikeIcon? likeIcon;
final List<int> tagsXid;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag> attachTags;
factory Datum.fromJson(Map<String, dynamic> json){
return Datum(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null ? null : Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
);
}
}
class AttachTag {
AttachTag({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTag? manageTag;
factory AttachTag.fromJson(Map<String, dynamic> json){
return AttachTag(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
);
}
}
class LikeIcon {
LikeIcon({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass? likeIcon;
factory LikeIcon.fromJson(Map<String, dynamic> json){
return LikeIcon(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass {
LikeIconClass({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass.fromJson(Map<String, dynamic> json){
return LikeIconClass(
id: json["id"],
image: json["image"],
);
}
}
class ManageTag {
ManageTag({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTag.fromJson(Map<String, dynamic> json){
return ManageTag(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json){
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json){
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}

View File

@@ -0,0 +1,97 @@
class LikepostModel {
LikepostModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<Datum> data;
factory LikepostModel.fromJson(Map<String, dynamic> json) {
return LikepostModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null
? []
: List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
);
}
}
class Datum {
Datum({
required this.id,
required this.managePostsXid,
required this.iamPrincipalXid,
required this.likeIconsXid,
required this.iamPrincipal,
required this.likeIcon,
});
final int? id;
final int? managePostsXid;
final int? iamPrincipalXid;
final int? likeIconsXid;
final IamPrincipal? iamPrincipal;
final LikeIcon? likeIcon;
factory Datum.fromJson(Map<String, dynamic> json) {
return Datum(
id: json["id"],
managePostsXid: json["manage_posts_xid"],
iamPrincipalXid: json["iam_principal_xid"],
likeIconsXid: json["like_icons_xid"],
iamPrincipal: json["iam_principal"] == null
? null
: IamPrincipal.fromJson(json["iam_principal"]),
likeIcon: json["like_icon"] == null
? null
: LikeIcon.fromJson(json["like_icon"]),
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json) {
return IamPrincipal(
id: json["id"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon {
LikeIcon({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIcon.fromJson(Map<String, dynamic> json) {
return LikeIcon(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,101 @@
class NestedCommentsModel {
NestedCommentsModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final List<Datum> data;
factory NestedCommentsModel.fromJson(Map<String, dynamic> json){
return NestedCommentsModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
);
}
}
class Datum {
Datum({
required this.id,
required this.managePostsXid,
required this.iamPrincipalXid,
required this.comment,
required this.userDetail,
required this.repliedComment,
});
final int? id;
final int? managePostsXid;
final int? iamPrincipalXid;
final String? comment;
final UserDetail? userDetail;
final List<RepliedComment> repliedComment;
factory Datum.fromJson(Map<String, dynamic> json){
return Datum(
id: json["id"],
managePostsXid: json["manage_posts_xid"],
iamPrincipalXid: json["iam_principal_xid"],
comment: json["comment"],
userDetail: json["user_detail"] == null ? null : UserDetail.fromJson(json["user_detail"]),
repliedComment: json["replied_comment"] == null ? [] : List<RepliedComment>.from(json["replied_comment"]!.map((x) => RepliedComment.fromJson(x))),
);
}
}
class RepliedComment {
RepliedComment({
required this.id,
required this.postsMasterCommentXid,
required this.iamPrincipalXid,
required this.comment,
required this.userDetail,
});
final int? id;
final int? postsMasterCommentXid;
final int? iamPrincipalXid;
final String? comment;
final UserDetail? userDetail;
factory RepliedComment.fromJson(Map<String, dynamic> json){
return RepliedComment(
id: json["id"],
postsMasterCommentXid: json["posts_master_comment_xid"],
iamPrincipalXid: json["iam_principal_xid"],
comment: json["comment"],
userDetail: json["user_detail"] == null ? null : UserDetail.fromJson(json["user_detail"]),
);
}
}
class UserDetail {
UserDetail({
required this.id,
required this.userName,
required this.profilePhoto,
});
final int? id;
final String? userName;
final String? profilePhoto;
factory UserDetail.fromJson(Map<String, dynamic> json){
return UserDetail(
id: json["id"],
userName: json["user_name"],
profilePhoto: json["profile_photo"],
);
}
}

View File

@@ -0,0 +1,245 @@
class PostDetailModel {
PostDetailModel({
required this.status,
required this.statusCode,
required this.message,
required this.data,
});
final String? status;
final int? statusCode;
final String? message;
final Data? data;
factory PostDetailModel.fromJson(Map<String, dynamic> json){
return PostDetailModel(
status: json["status"],
statusCode: json["status_code"],
message: json["message"],
data: json["data"] == null ? null : Data.fromJson(json["data"]),
);
}
}
class Data {
Data({
required this.id,
required this.likecount,
required this.isISaved,
required this.tagsXid,
required this.isILiked,
required this.totalComment,
required this.totalSave,
required this.iamPrincipalXid,
required this.postIn,
required this.caption,
required this.image,
required this.manageTagsXids,
required this.postAs,
required this.ctaTitle,
required this.ctaLink,
required this.createdAt,
required this.likeIcon,
required this.totalViewCount,
required this.totalReactionCount,
required this.totalCommentCount,
required this.totalImpressionCount,
required this.totalPopularScore,
required this.totalHoursAgo,
required this.iamPrincipal,
required this.community,
required this.attachTags,
required this.isIFollow,
});
final int? id;
final int? likecount;
final bool? isISaved;
final List<int> tagsXid;
final bool? isILiked;
final int? totalComment;
final int? totalSave;
final int? iamPrincipalXid;
final int? postIn;
final String? caption;
final String? image;
final String? manageTagsXids;
final String? postAs;
final String? ctaTitle;
final String? ctaLink;
final DateTime? createdAt;
final LikeIcon? likeIcon;
final int? totalViewCount;
final int? totalReactionCount;
final int? totalCommentCount;
final int? totalImpressionCount;
final int? totalPopularScore;
final int? totalHoursAgo;
final IamPrincipal? iamPrincipal;
final Community? community;
final List<AttachTag> attachTags;
final bool? isIFollow;
factory Data.fromJson(Map<String, dynamic> json){
return Data(
id: json["id"],
likecount: json["likecount"],
isISaved: json["is_i_saved"],
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
isILiked: json["is_i_liked"],
totalComment: json["total_comment"],
totalSave: json["total_save"],
iamPrincipalXid: json["iam_principal_xid"],
postIn: json["post_in"],
caption: json["caption"],
image: json["image"],
manageTagsXids: json["manage_tags_xids"],
postAs: json["post_as"],
ctaTitle: json["cta_title"],
ctaLink: json["cta_link"],
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
totalViewCount: json["totalViewCount"],
totalReactionCount: json["totalReactionCount"],
totalCommentCount: json["totalCommentCount"],
totalImpressionCount: json["totalImpressionCount"],
totalPopularScore: json["totalPopularScore"],
totalHoursAgo: json["totalHoursAgo"],
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
community: json["community"] == null ? null : Community.fromJson(json["community"]),
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
isIFollow: json["is_i_follow"],
);
}
}
class AttachTag {
AttachTag({
required this.managePostXid,
required this.manageTagXid,
required this.manageTag,
});
final int? managePostXid;
final int? manageTagXid;
final ManageTag? manageTag;
factory AttachTag.fromJson(Map<String, dynamic> json){
return AttachTag(
managePostXid: json["manage_post_xid"],
manageTagXid: json["manage_tag_xid"],
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
);
}
}
class ManageTag {
ManageTag({
required this.id,
required this.isPinned,
required this.name,
});
final int? id;
final bool? isPinned;
final String? name;
factory ManageTag.fromJson(Map<String, dynamic> json){
return ManageTag(
id: json["id"],
isPinned: json["is_pinned"],
name: json["name"],
);
}
}
class Community {
Community({
required this.id,
required this.communityProfilePhoto,
required this.communityName,
});
final int? id;
final String? communityProfilePhoto;
final String? communityName;
factory Community.fromJson(Map<String, dynamic> json){
return Community(
id: json["id"],
communityProfilePhoto: json["community_profile_photo"],
communityName: json["community_name"],
);
}
}
class IamPrincipal {
IamPrincipal({
required this.id,
required this.isUserPinned,
required this.principalTypeXid,
required this.userName,
required this.fullName,
required this.profilePhoto,
});
final int? id;
final bool? isUserPinned;
final int? principalTypeXid;
final String? userName;
final String? fullName;
final String? profilePhoto;
factory IamPrincipal.fromJson(Map<String, dynamic> json){
return IamPrincipal(
id: json["id"],
isUserPinned: json["is_user_pinned"],
principalTypeXid: json["principal_type_xid"],
userName: json["user_name"],
fullName: json["full_name"],
profilePhoto: json["profile_photo"],
);
}
}
class LikeIcon {
LikeIcon({
required this.likeIconsXid,
required this.likeIcon,
});
final int? likeIconsXid;
final LikeIconClass? likeIcon;
factory LikeIcon.fromJson(Map<String, dynamic> json){
return LikeIcon(
likeIconsXid: json["like_icons_xid"],
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
);
}
}
class LikeIconClass {
LikeIconClass({
required this.id,
required this.image,
});
final int? id;
final String? image;
factory LikeIconClass.fromJson(Map<String, dynamic> json){
return LikeIconClass(
id: json["id"],
image: json["image"],
);
}
}

View File

@@ -0,0 +1,530 @@
import 'package:flutter/material.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Common/controller/NormalPostCard.dart';
import 'package:regroup/Global.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_HomePage/PostDetailScreen/ViewModel/CommentsHelper.dart';
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/ViewModel/CommentsRepository.dart';
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/ViewModel/PostDetailApi.dart';
import 'package:regroup/Main_Screens/Community_HomePage/view_model/CountersHelper.dart';
import 'package:regroup/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/ShimmerCommon.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:async/async.dart';
class PostDetailsScreen extends StatefulWidget {
const PostDetailsScreen({super.key});
@override
State<PostDetailsScreen> createState() => _PostDetailsScreenState();
}
class _PostDetailsScreenState extends State<PostDetailsScreen> {
int? followunfollowid;
followUnfollowUploadata() async {
// utils.loader();
Map<String, dynamic> newupdata = {
"following_iam_principal_xid": followunfollowid,
};
final data = await Profilepostmethod().postunfollowuser(newupdata);
if (data.status == ResponseStatus.SUCCESS) {
PostDetailApi().getPostDetail(mainpostid).then((value) {});
} else {
Get.back();
return utils.showToast(data.message);
}
}
List<bool> hideReplies = [];
FutureGroup futureGroup = FutureGroup();
final FocusNode _focusNode = FocusNode();
final TextEditingController _controllerComments = TextEditingController();
final CommentsHelper _commentsHelper = Get.put(CommentsHelper());
final CountersHelper countersHelper = Get.find<CountersHelper>();
String? mainpostid;
List<ManageTagPopular>? tags;
String? create_at;
CommonDatumObjModelData? commonObj;
String? formWhichTab;
List<ReactionData>? reactions;
Map<int, ReactionData?>? selectedReactions;
int? currentIndex;
@override
void initState() {
mainpostid = Get.arguments['postId'].toString();
tags = Get.arguments['tagsList'];
create_at = Get.arguments['created_at'];
commonObj = Get.arguments['commonObj'];
formWhichTab = Get.arguments['fromWhichTab'];
reactions = Get.arguments['reactions'];
selectedReactions = Get.arguments['selectedReactions'];
currentIndex = Get.arguments['currentIndex'];
futureGroup.add(CommentsRepository().getAllComments(mainpostid));
futureGroup.add(PostDetailApi().getPostDetail(mainpostid));
futureGroup.close();
super.initState();
}
bool isOnce = true;
_setViewMoreList() {
if (isOnce) {
hideReplies = List.filled(nestedComments!.data.length, false);
isOnce = false;
}
}
_toggleReplies(index) {
setState(() {
hideReplies[index] = !hideReplies[index];
});
}
void _focusTextField() {
FocusScope.of(context).requestFocus(_focusNode);
}
_postComments() async {
var updata = {
"manage_posts_xid": mainpostid,
"comment": _controllerComments.text,
};
final result = await CommentsRepository().postComments(updata);
if (result.status == ResponseStatus.SUCCESS) {
countersHelper.commentsCounterPopular[currentIndex!]++;
CommentsRepository()
.getAllComments(mainpostid)
.then((value) => setState(() {
isOnce = true;
_commentsHelper.isLoading.value = false;
_controllerComments.clear();
}));
}
}
String repliedCommentId = "";
_postRepliesOnComment(repliedCommentId) async {
var updata = {
"manage_posts_xid": mainpostid,
"posts_master_comment_xid": repliedCommentId,
"comment": _controllerComments.text,
};
final result = await CommentsRepository().postRepliesOnComments(updata);
if (result.status == ResponseStatus.SUCCESS) {
CommentsRepository()
.getAllComments(mainpostid)
.then((value) => setState(() {
isOnce = true;
_commentsHelper.isLoading.value = false;
_controllerComments.clear();
}));
}
}
// _setComments(index) {
// List<Comment> repliedCommentsList = [];
// for (var i = 0;
// i < nestedComments!.data[index].repliedComment.length;
// i++) {
// repliedCommentsList.add(Comment(
// avatar: nestedComments!
// .data[index].repliedComment[i].userDetail?.profilePhoto,
// userName: nestedComments!
// .data[index].repliedComment[i].userDetail?.userName,
// content: nestedComments!.data[index].repliedComment[i].comment));
// }
// return repliedCommentsList;
// }
// bool _hideReplies = true;
_deleteComment(String commentId) async {
var updata = {"id": commentId};
final result = await CommentsRepository().deleteComments(updata);
if (result.status == ResponseStatus.SUCCESS) {
countersHelper.commentsCounterPopular[currentIndex!]--;
CommentsRepository()
.getAllComments(mainpostid)
.then((value) => setState(() {
isOnce = true;
}));
}
}
_deleteRepliedComment(String commentId) async {
var updata = {"id": commentId};
final result = await CommentsRepository().deleteRepliedComments(updata);
if (result.status == ResponseStatus.SUCCESS) {
CommentsRepository()
.getAllComments(mainpostid)
.then((value) => setState(() {
isOnce = true;
}));
}
}
//reacttionlikelogic
@override
Widget build(BuildContext context) {
return KeyboardVisibilityBuilder(builder: (context, isKeyboardVisible) {
return WillPopScope(
onWillPop: () async {
Get.back(result: true);
return false; // Prevent default back button action
},
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFF222935),
extendBody: true,
appBar: const CommonAppbar(
customBack: true,
// customRouteName: RouteName.communityScreen,
titleTxt: "Post",
),
body: FutureBuilder(
future: futureGroup.future,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: ShimmerCommon());
} else if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
} else if (snapshot.connectionState == ConnectionState.done) {
_setViewMoreList();
return _buildBody(isKeyboardVisible);
} else {
return const Center(child: Text('Something went wrong'));
}
},
)),
);
});
}
_buildBody(isKeyboardVisible) {
return 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: [
// sizedBoxHeight(35.h),
NormalCardTile(
tags: tags!,
createAt: create_at!,
commonObj: commonObj!,
forWhichTab: formWhichTab!,
reactions: reactions!,
selectedReactions: selectedReactions!,
currentIndex: currentIndex!,
showCommentButton: false,
),
sizedBoxHeight(35.h),
ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: nestedComments?.data.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
GestureDetector(
onLongPressStart: (details) {
nestedComments?.data[index].userDetail!.id
.toString() !=
userIdGlobal
? null
: showMenu(
context: context,
position: RelativeRect.fromLTRB(
details.globalPosition.dx,
details.globalPosition.dy,
details.globalPosition.dx + 1,
details.globalPosition.dy + 1,
),
items: [
const PopupMenuItem<int>(
value: 0,
child: Text("Delete"),
),
],
elevation: 8.0,
).then((value) {
if (value == 0) {
_deleteComment(nestedComments!
.data[index].id
.toString());
}
});
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
radius: 20.r,
foregroundImage: NetworkImage(
nestedComments!
.data[index].userDetail!.profilePhoto ??
"https://upload.wikimedia.org/wikipedia/commons/7/7c/Profile_avatar_placeholder_large.png?20150327203541",
),
),
sizedBoxWidth(15.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text12w400_FCFCFC_blur(nestedComments!
.data[index].userDetail!.userName ??
""),
text14w400_FCFCFC(
nestedComments!.data[index].comment ??
""),
SizedBox(height: 10.h),
GestureDetector(
onTap: () {
_focusTextField();
_controllerComments.text =
"@${nestedComments!.data[index].userDetail!.userName!}";
setState(() {
repliedCommentId = nestedComments!
.data[index].id
.toString();
});
},
child: text10w400_FCFCFC_blur("Reply")),
SizedBox(height: 20.h),
nestedComments!
.data[index].repliedComment.isEmpty
? const SizedBox()
: hideReplies[index]
? GestureDetector(
onTap: () {
_toggleReplies(index);
},
child: text10w400_FCFCFC_blur(
"Hide replies"),
)
: GestureDetector(
onTap: () {
_toggleReplies(index);
},
child: text10w400_FCFCFC_blur(
"View ${nestedComments!.data[index].repliedComment.length} more replies"),
),
SizedBox(height: 10.h),
!hideReplies[index]
? const SizedBox()
: ListView.builder(
physics:
const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: nestedComments!.data[index]
.repliedComment.length,
itemBuilder: (context, index2) {
return GestureDetector(
onLongPressStart:
(LongPressStartDetails
details) {
nestedComments
?.data[index]
.repliedComment[
index2]
.userDetail
?.id
.toString() !=
userIdGlobal
? null
: showMenu(
context: context,
position: RelativeRect
.fromLTRB(
details.globalPosition
.dx,
details.globalPosition
.dy,
details.globalPosition
.dx +
1,
details.globalPosition
.dy +
1,
),
items: [
const PopupMenuItem<
int>(
value: 0,
child:
Text("Delete"),
),
],
elevation: 8.0,
).then((value) {
if (value == 0) {
_deleteRepliedComment(
nestedComments!
.data[index]
.repliedComment[
index2]
.id
.toString());
}
});
},
child: ListTile(
leading: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
CircleAvatar(
radius: 13.r,
foregroundImage:
NetworkImage(
nestedComments!
.data[index]
.repliedComment[
index2]
.userDetail
?.profilePhoto ??
"https://upload.wikimedia.org/wikipedia/commons/7/7c/Profile_avatar_placeholder_large.png?20150327203541",
),
),
],
),
title: text12w400_FCFCFC_blur(
nestedComments!
.data[index]
.repliedComment[
index2]
.userDetail
?.userName ??
""),
subtitle: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
text14w400_FCFCFC(
nestedComments!
.data[index]
.repliedComment[
index2]
.comment ??
""),
SizedBox(height: 10.h),
GestureDetector(
onTap: () {
_focusTextField();
_controllerComments
.text =
"@${nestedComments!.data[index].repliedComment[index2].userDetail!.userName!}";
setState(() {
repliedCommentId =
nestedComments!
.data[index]
.repliedComment[
index2]
.postsMasterCommentXid
.toString();
});
},
child:
text10w400_FCFCFC_blur(
"Reply")),
],
),
),
);
})
],
),
),
],
),
),
sizedBoxHeight(20.h),
//sizedBoxHeight(85.h)
],
));
}),
sizedBoxHeight(50.h),
])),
Positioned.fill(
top: 625.h - MediaQuery.of(context).viewInsets.bottom,
// isKeyboardVisible ? 270.h : 625.h,
right: 16.0,
left: 16.0,
child: Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: const EdgeInsets.only(top: 15, bottom: 15),
child: Row(
children: <Widget>[
Obx(() {
return Expanded(
child: CustomTextFormField(
textEditingController: _controllerComments,
focusNode: _focusNode,
hintText: "Add comment",
suffixIcon: GestureDetector(
onTap: () {
FocusScope.of(context).unfocus();
if (_controllerComments.text.isEmpty) {
print("Enter some text");
} else {
_commentsHelper.isLoading.value = true;
if (repliedCommentId != "") {
_postRepliesOnComment(repliedCommentId);
} else {
_postComments();
}
}
},
child: _commentsHelper.isLoading.value
? Container(
padding: const EdgeInsets.all(10),
height: 10.h,
width: 10.w,
child: const CircularProgressIndicator())
: SizedBox(
height: 20.h,
width: 25.w,
child: Center(
child: Image.asset(
"assets/images/png/iconoir_send.png",
height: 20.h,
width: 25.w,
),
),
),
),
),
);
})
],
),
)),
),
]);
}
}

View File

@@ -0,0 +1,486 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/ViewModel/LikePost.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
String? postId;
class ReactionView extends StatefulWidget {
const ReactionView({super.key});
@override
State<ReactionView> createState() => _ReactionViewState();
}
class _ReactionViewState extends State<ReactionView> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFF222935),
extendBody: true,
appBar: const 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: [
const Tab(
text: 'All',
),
Tab(
child: Row(children: [
commonGlassUI(
borderColor: const Color(0xFF1E3A46),
opacity1: 0.05,
opacity2: 0.06,
width: 30.w,
height: 30.h,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
"assets/images/png/f7_hand-thumbsup.png",
height: 17.h,
width: 17.w,
),
),
borderwidth: 1.71),
const Spacer(),
text14400white("110K"),
]),
),
Tab(
child: Row(children: [
commonGlassUI(
borderColor: const Color(0xFF1E3A46),
opacity1: 0.05,
opacity2: 0.06,
width: 30.w,
height: 30.h,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
"assets/images/png/heart 2.png",
height: 17.h,
width: 17.w,
),
),
borderwidth: 1.71),
const Spacer(),
text14400white("9.7K"),
]),
),
Tab(
child: Row(children: [
commonGlassUI(
borderColor: const Color(0xFF1E3A46),
opacity1: 0.05,
opacity2: 0.06,
width: 30.w,
height: 30.h,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
"assets/images/png/party-popper 2.png",
height: 17.h,
width: 17.w,
),
),
borderwidth: 1.71),
const Spacer(),
text14400white("7.4K"),
]),
),
]),
const Expanded(
child: TabBarView(
children: [
AllTabs(),
LikeTabs(),
FavouriteTabs(),
PartyTabs(),
],
),
),
sizedBoxHeight(20.h)
],
),
),
),
],
),
],
),
);
}
}
class AllTabs extends StatefulWidget {
const AllTabs({super.key});
@override
State<AllTabs> createState() => _AllTabsState();
}
class _AllTabsState extends State<AllTabs> {
late Future alltabfuture;
@override
void initState() {
postId = Get.arguments['postId'].toString();
alltabfuture = LikePostApi().postLike({'manage_posts_xid': postId});
super.initState();
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: alltabfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: likepostobj!.data.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: likepostobj!
.data[index].iamPrincipal!.profilePhoto ??
'',
reactionimg:
likepostobj!.data[index].likeIcon!.image ??
'',
title: likepostobj!
.data[index].iamPrincipal!.fullName ??
''),
if (likepostobj!.data.length - 1 != index)
commonDivider(),
],
);
},
),
)
],
);
}
return Container();
});
}
}
class LikeTabs extends StatefulWidget {
const LikeTabs({super.key});
@override
State<LikeTabs> createState() => _LikeTabsState();
}
class _LikeTabsState extends State<LikeTabs> {
late Future liketabfuture;
@override
void initState() {
postId = Get.arguments['postId'].toString();
liketabfuture = LikePostApi()
.postLike({'manage_posts_xid': postId, 'like_icons_xid': 1});
super.initState();
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: liketabfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: likepostobj!.data.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: likepostobj!
.data[index].iamPrincipal!.profilePhoto ??
'',
reactionimg:
likepostobj!.data[index].likeIcon!.image ??
'',
title: likepostobj!
.data[index].iamPrincipal!.fullName ??
''),
if (likepostobj!.data.length - 1 != index)
commonDivider(),
],
);
},
),
)
],
);
}
return Container();
});
}
}
class FavouriteTabs extends StatefulWidget {
const FavouriteTabs({super.key});
@override
State<FavouriteTabs> createState() => _FavouriteTabsState();
}
class _FavouriteTabsState extends State<FavouriteTabs> {
late Future favouritetabfuture;
@override
void initState() {
postId = Get.arguments['postId'].toString();
favouritetabfuture = LikePostApi()
.postLike({'manage_posts_xid': postId, 'like_icons_xid': 2});
super.initState();
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: favouritetabfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: likepostobj!.data.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: likepostobj!
.data[index].iamPrincipal!.profilePhoto ??
'',
reactionimg:
likepostobj!.data[index].likeIcon!.image ??
'',
title: likepostobj!
.data[index].iamPrincipal!.fullName ??
''),
if (likepostobj!.data.length - 1 != index)
commonDivider(),
],
);
},
),
)
],
);
}
return Container();
});
}
}
class PartyTabs extends StatefulWidget {
const PartyTabs({super.key});
@override
State<PartyTabs> createState() => _PartyTabsState();
}
class _PartyTabsState extends State<PartyTabs> {
late Future partytabfuture;
@override
void initState() {
postId = Get.arguments['postId'].toString();
partytabfuture = LikePostApi()
.postLike({'manage_posts_xid': postId, 'like_icons_xid': 3});
super.initState();
}
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: partytabfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
return Column(
children: [
sizedBoxHeight(20.h),
Expanded(
child: ListView.builder(
itemCount: likepostobj!.data.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return Column(
children: [
commonReaction(
imagePath: likepostobj!
.data[index].iamPrincipal!.profilePhoto ??
'',
reactionimg:
likepostobj!.data[index].likeIcon!.image ??
'',
title: likepostobj!
.data[index].iamPrincipal!.fullName ??
''),
if (likepostobj!.data.length - 1 != index)
commonDivider(),
],
);
},
),
)
],
);
}
return Container();
});
}
}
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: NetworkImage(imagePath),
),
Positioned(
bottom: 0,
right: 0,
child: Container(
height: 22.h,
width: 22.w,
decoration: BoxDecoration(
shape: BoxShape.circle,
// color: const Color(0xFF1E3A46),
border: Border.all(
color: const Color(0xFFFCFCFC).withOpacity(0.18),
width: 0.6),
image: DecorationImage(
image: NetworkImage(reactionimg),
),
),
)),
]),
sizedBoxWidth(10.w),
text17400white(title),
],
),
);
}

View File

@@ -0,0 +1,5 @@
import 'package:get/get.dart';
class CommentsHelper extends GetxController {
RxBool isLoading = false.obs;
}

View File

@@ -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/Main_Screens/Community_HomePage/PostDetailScreen/Model/LikePostModel.dart';
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/Model/NestedCommentsModel.dart';
NestedCommentsModel? nestedComments;
class CommentsRepository {
Future<ResponseData<dynamic>> getAllComments(updata) async {
final response = await NetworkApiServices().getApi(
"${ApiUrls.getComments}?manage_posts_xid=$updata",
);
if (response.status == ResponseStatus.SUCCESS) {
nestedComments = NestedCommentsModel.fromJson(response.data);
}
return response;
}
Future<ResponseData<dynamic>> postComments(updata) async {
final response = await NetworkApiServices().postApi(
updata,
ApiUrls.storeComments,
);
return response;
}
Future<ResponseData<dynamic>> postRepliesOnComments(updata) async {
final response = await NetworkApiServices().postApi(
updata,
ApiUrls.storeRepliesOnComments,
);
return response;
}
Future<ResponseData<dynamic>> deleteComments(updata) async {
final response = await NetworkApiServices().postApi(
updata,
ApiUrls.deleteComments,
);
return response;
}
Future<ResponseData<dynamic>> deleteRepliedComments(updata) async {
final response = await NetworkApiServices().postApi(
updata,
ApiUrls.deleteRepliesComments,
);
return response;
}
}

View File

@@ -0,0 +1,27 @@
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/Main_Screens/Community_HomePage/PostDetailScreen/Model/LikePostModel.dart';
LikepostModel? likepostobj;
class LikePostApi {
Future<ResponseData<dynamic>> postLike(updata) async {
print("updata is $updata");
final response = await NetworkApiServices().postApi(
updata,
ApiUrls.postlike,
);
if (response.status == ResponseStatus.SUCCESS) {
if (response.data["status"] == "success") {
likepostobj = LikepostModel.fromJson(response.data);
}
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.SUCCESS,
data: response.data);
} else {
return ResponseData<dynamic>(
response.data['message'], ResponseStatus.FAILED);
}
}
}

Some files were not shown because too many files have changed in this diff Show More