diff --git a/lib/Common/CommonGlassmorphism.dart b/lib/Common/CommonGlassmorphism.dart index 0163d9f..0faa4c9 100644 --- a/lib/Common/CommonGlassmorphism.dart +++ b/lib/Common/CommonGlassmorphism.dart @@ -12,7 +12,10 @@ Widget commonGlassContainer({ double opacity2 = 0.05, Color borderColor = const Color(0xff434A53), }) { - return GlassmorphicContainer( + return + + + GlassmorphicContainer( width: width, height: height, borderRadius: borderradius, diff --git a/lib/Common/CommonTabBar.dart b/lib/Common/CommonTabBar.dart index b5b8751..90b1596 100644 --- a/lib/Common/CommonTabBar.dart +++ b/lib/Common/CommonTabBar.dart @@ -10,6 +10,7 @@ class CommonTabBar extends StatelessWidget { @override Widget build(BuildContext context) { return TabBar( + dividerColor: Color(0xFFFFFFFF).withOpacity(0.07), labelStyle: TextStyle( fontSize: 14.sp, diff --git a/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart b/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart index c857f56..fb9f5e6 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart @@ -59,6 +59,8 @@ class _AddUsersState extends State { List isCheckedList = [false, false, false, false, false, false, false]; + + @override Widget build(BuildContext context) { return Scaffold( @@ -99,10 +101,12 @@ class _AddUsersState extends State { ), sizedBoxHeight(16.h), DefaultTabController( + length: 3, // initialIndex: selectedIndex.value, child: Column(children: [ - CommonTabBar(tabs: const [ + CommonTabBar( + tabs: const [ Tab( text: 'Group', ), diff --git a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart index a7bc2b9..ff04ce0 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart @@ -179,7 +179,10 @@ class _CalenderTabState extends State { // initialIndex: selectedIndex.value, child: Column( children: [ - CommonTabBar(tabs: const [ + CommonTabBar( + + + tabs: const [ Tab( text: 'My sessions', ), @@ -189,6 +192,7 @@ class _CalenderTabState extends State { ]), Expanded( child: TabBarView( + children: [ MySessionsTab(), ComSessionTab(), diff --git a/lib/Feed Module/Main_Screens/Community/PostScreen.dart b/lib/Feed Module/Main_Screens/Community/PostScreen.dart index 18cbe83..a4f69e2 100644 --- a/lib/Feed Module/Main_Screens/Community/PostScreen.dart +++ b/lib/Feed Module/Main_Screens/Community/PostScreen.dart @@ -92,11 +92,11 @@ class _PostScreenState extends State { borderType: BorderType.RRect, radius: Radius.circular(14.r), color: Color(0xFF434A53), - child: commonGlassContainer( - border: 0, + child: commonGlassUI( width: double.infinity, height: 130.h, - borderradius: 10.r, + borderRadius: BorderRadius.circular(10.r), + borderColor: Colors.transparent, customWidget: bannerPath.isNotEmpty && isbannerAdded ? Stack(children: [ Image.file( diff --git a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart index c134233..20a07ed 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart @@ -12,6 +12,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewMo import 'package:regroup/Utils/Common/CommonAppbar.dart'; import 'package:regroup/Utils/Common/CommonDropdown.dart'; import 'package:regroup/Utils/Common/ImageUpload.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'; @@ -160,11 +161,13 @@ class _BusEditProfileState extends State { future: myfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + + // Center( + // child: CircularProgressIndicator( + // color: Colors.blue, + // ), + // ); } if (snapshot.hasError) { diff --git a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart index 7644a59..8f3ca26 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart @@ -10,7 +10,7 @@ import 'package:regroup/Common/controller/MainScreen.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart'; -import 'package:regroup/Utils/Common/blureffect.dart'; +import 'package:regroup/Utils/Common/ShimmerCommon.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/dialogs.dart'; @@ -181,11 +181,13 @@ class _ProfileTabState extends State { future: individualfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + + // Center( + // child: CircularProgressIndicator( + // color: Colors.blue, + // ), + // ); } if (snapshot.hasError) { @@ -409,7 +411,6 @@ class _ProfileTabState extends State { ], ), sizedBoxHeight(20.h), - getEditProfileIndi!.data!.timelines!.isEmpty ? Center( child: @@ -575,10 +576,12 @@ class _ProfileTabState extends State { // RemoveTimelineUploadata(); // }); - Get.toNamed(RouteName.addtimeline, arguments: { - 'id': getEditProfileIndi!.data!.timelines![index].id, - 'edit': true, - }); + Get.toNamed( + RouteName.addtimeline, + arguments: { + 'id': getEditProfileIndi!.data!.timelines![index].id, + 'edit': true, + }); }, child: SizedBox( @@ -634,18 +637,16 @@ class _ProfileTabState extends State { .teamName!), sizedBoxHeight( 10.h), - - startToEnd - .isEmpty + startToEnd + .isEmpty ? text12400white( 'No date') : text12400white( startToEnd), sizedBoxHeight( 10.h), - - abilities - .isEmpty + abilities + .isEmpty ? text10400whiteblur( 'No data') : @@ -699,12 +700,10 @@ class _ProfileTabState extends State { }, )), sizedBoxHeight(30.h), - ]), ), Padding( padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ @@ -720,15 +719,12 @@ class _ProfileTabState extends State { shrinkWrap: true, scrollDirection: Axis.horizontal, padding: EdgeInsets.only(left: 16.w), - itemCount: getEditProfileIndi! .data!.myJoinedSubgroups!.length, - itemBuilder: (context, index) { return Padding( padding: EdgeInsets.only(right: 20.w), child: profilecardtile( - imagePath: getEditProfileIndi! .data! .myJoinedSubgroups![index] @@ -748,7 +744,6 @@ class _ProfileTabState extends State { }, ), ), - normalcardtile( profileImg: 'assets/images/png/Ellipse 48.png', title: 'Jocelyn Dokidis', @@ -811,11 +806,8 @@ class _ProfileTabState extends State { future: businessfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + } if (snapshot.hasError) { @@ -1190,7 +1182,6 @@ class _ProfileTabState extends State { ); } - Widget commonTimelineCard({ required String? imagePath, required String? title, @@ -1200,7 +1191,6 @@ class _ProfileTabState extends State { required int? id, required List>? abilities, }) { - return Row( children: [ Container( diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart b/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart index b28155e..d2910c5 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart @@ -156,7 +156,8 @@ class _FollowersState extends State { if (snapshot.connectionState == ConnectionState.waiting) { // Display shimmer effect while waiting for data - return const Center(child: CircularProgressIndicator()); + return const Center( + child: CircularProgressIndicator()); } else if (snapshot.hasError) { // Handle error state return Center( @@ -210,9 +211,11 @@ class _FollowersState extends State { return commonDivider(); }, itemBuilder: (context, index) { + var mainFollowersData = + followersobj!.data![index]; return GestureDetector( onTap: () { - followersobj!.data![index].follower! + mainFollowersData.follower! .principleTypeXid == 1 ? Get.toNamed( @@ -220,8 +223,7 @@ class _FollowersState extends State { .profiletabindguest, arguments: { "FolloweridIndex": - followersobj! - .data![index] + mainFollowersData .iamPrincipalXid!, }) : Get.toNamed( @@ -229,8 +231,7 @@ class _FollowersState extends State { .profiletabbusguest, arguments: { "FolloweridIndex": - followersobj! - .data![index] + mainFollowersData .iamPrincipalXid!, }); }, @@ -242,14 +243,10 @@ class _FollowersState extends State { horizontal: 16.w), child: Row( children: [ - followersobj! - .data![ - index] - .follower! + mainFollowersData.follower! .profilePhoto == null || - followersobj! - .data![index] + mainFollowersData .follower! .profilePhoto! .isEmpty @@ -260,13 +257,10 @@ class _FollowersState extends State { radius: 25.r, ) : CircleAvatar( - backgroundImage: - NetworkImage( - followersobj! - .data![ - index] - .follower! - .profilePhoto!), + backgroundImage: NetworkImage( + mainFollowersData + .follower! + .profilePhoto!), radius: 25.r, ), sizedBoxWidth(10.w), @@ -275,15 +269,11 @@ class _FollowersState extends State { CrossAxisAlignment .start, children: [ - followersobj! - .data![ - index] + mainFollowersData .follower! .fullName == null || - followersobj! - .data![ - index] + mainFollowersData .follower! .fullName! .isEmpty == @@ -291,21 +281,15 @@ class _FollowersState extends State { ? text16w400_FCFCFC( "Regroup") : text16w400_FCFCFC( - followersobj! - .data![ - index] + mainFollowersData .follower! .fullName!), sizedBoxHeight(4.h), - followersobj! - .data![ - index] + mainFollowersData .follower! .userName == null || - followersobj! - .data![ - index] + mainFollowersData .follower! .userName! .isEmpty == @@ -313,9 +297,7 @@ class _FollowersState extends State { ? text12w400_FCFCFC_blur( "regroup") : text12w400_FCFCFC_blur( - followersobj! - .data![ - index] + mainFollowersData .follower! .userName!) ], @@ -323,15 +305,17 @@ class _FollowersState extends State { const Spacer(), PopupMenuButton( surfaceTintColor: - const Color(0xFF222935), + const Color( + 0xFF222935), constraints: BoxConstraints .tightFor( width: 176.w), - offset: const Offset(0, 20), - color: - const Color(0xFF222935), + offset: + const Offset(0, 20), + color: const Color( + 0xFF222935), tooltip: "", itemBuilder: (BuildContext @@ -517,7 +501,8 @@ class _FollowersState extends State { if (snapshot.connectionState == ConnectionState.waiting) { // Display shimmer effect while waiting for data - return const Center(child: CircularProgressIndicator()); + return const Center( + child: CircularProgressIndicator()); } else if (snapshot.hasError) { // Handle error state return Center( @@ -540,11 +525,11 @@ class _FollowersState extends State { return commonDivider(); }, itemBuilder: (context, index) { + var guestFollowerData = + getguestfollowersobj!.data![index]; return GestureDetector( onTap: () { - getguestfollowersobj! - .data![index] - .follower! + guestFollowerData.follower! .principleTypeXid == 1 ? Get.toNamed( @@ -552,8 +537,7 @@ class _FollowersState extends State { .profiletabindguest, arguments: { "FolloweridIndex": - getguestfollowersobj! - .data![index] + guestFollowerData .iamPrincipalXid, }) : Get.toNamed( @@ -561,8 +545,7 @@ class _FollowersState extends State { .profiletabbusguest, arguments: { "FolloweridIndex": - getguestfollowersobj! - .data![index] + guestFollowerData .iamPrincipalXid, }); }, @@ -574,14 +557,10 @@ class _FollowersState extends State { horizontal: 16.w), child: Row( children: [ - getguestfollowersobj! - .data![ - index] - .follower! + guestFollowerData.follower! .profilePhoto == null || - getguestfollowersobj! - .data![index] + guestFollowerData .follower! .profilePhoto! .isEmpty @@ -593,9 +572,7 @@ class _FollowersState extends State { ) : CircleAvatar( backgroundImage: NetworkImage( - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .profilePhoto!), radius: 25.r, @@ -606,15 +583,11 @@ class _FollowersState extends State { CrossAxisAlignment .start, children: [ - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .fullName == null || - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .fullName! .isEmpty == @@ -622,21 +595,15 @@ class _FollowersState extends State { ? text16w400_FCFCFC( "Regroup") : text16w400_FCFCFC( - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .fullName!), sizedBoxHeight(4.h), - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .userName == null || - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .userName! .isEmpty == @@ -644,9 +611,7 @@ class _FollowersState extends State { ? text12w400_FCFCFC_blur( "regroup") : text12w400_FCFCFC_blur( - getguestfollowersobj! - .data![ - index] + guestFollowerData .follower! .userName!) ], @@ -654,15 +619,17 @@ class _FollowersState extends State { const Spacer(), PopupMenuButton( surfaceTintColor: - const Color(0xFF222935), + const Color( + 0xFF222935), constraints: BoxConstraints .tightFor( width: 176.w), - offset: const Offset(0, 20), - color: - const Color(0xFF222935), + offset: + const Offset(0, 20), + color: const Color( + 0xFF222935), tooltip: "", itemBuilder: (BuildContext @@ -672,16 +639,16 @@ class _FollowersState extends State { // onTap: () {}, onTap: () async { - setState( - () { - removeid = - getguestfollowersobj!.data![index].follower!.id ?? - 0; - getguestfollowersobj!.data!.removeWhere((item) => - item.follower!.id == - removeid); - RemoveUploadata(); - }); + // setState( + // () { + // removeid = + // getguestfollowersobj!.data![index].follower!.id ?? + // 0; + // getguestfollowersobj!.data!.removeWhere((item) => + // item.follower!.id == + // removeid); + // RemoveUploadata(); + // }); }, child: Padding( @@ -692,7 +659,7 @@ class _FollowersState extends State { Row( children: [ text14400white( - "Remove user"), + ""), const Spacer(), Image .asset( @@ -737,16 +704,16 @@ class _FollowersState extends State { PopupMenuItem( onTap: () async { - setState( - () { - blockid = - getguestfollowersobj!.data![index].follower!.id ?? - 0; - getguestfollowersobj!.data!.removeWhere((item) => - item.follower!.id == - blockid); - BlockUploadata(); - }); + // setState( + // () { + // blockid = + // getguestfollowersobj!.data![index].follower!.id ?? + // 0; + // getguestfollowersobj!.data!.removeWhere((item) => + // item.follower!.id == + // blockid); + // BlockUploadata(); + // }); }, child: Padding( diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart b/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart index c7d5e87..31bc182 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart @@ -167,6 +167,8 @@ class _FollowingState extends State { return commonDivider(); }, itemBuilder: (context, index) { + var mainFollowing = + followingobj!.data![index]; return // Column( // children: [ @@ -190,21 +192,19 @@ class _FollowingState extends State { // ); GestureDetector( onTap: () { - followingobj!.data![index].following! + mainFollowing.following! .principleTypeXid == 1 ? Get.toNamed( RouteName.profiletabindguest, arguments: { - "FollowingidIndex": followingobj! - .data![index] + "FollowingidIndex": mainFollowing .followingIamPrincipalXid!, }) : Get.toNamed( RouteName.profiletabbusguest, arguments: { - "FollowingidIndex": followingobj! - .data![index] + "FollowingidIndex": mainFollowing .followingIamPrincipalXid!, }); }, @@ -215,26 +215,21 @@ class _FollowingState extends State { vertical: 16.h, horizontal: 16.w), child: Row( children: [ - followingobj! - .data![index] - .following! + mainFollowing.following! .profilePhoto == null || - followingobj! - .data![index] - .following! - .profilePhoto! - .isEmpty + mainFollowing.following! + .profilePhoto!.isEmpty ? CircleAvatar( - backgroundImage: const AssetImage( - 'assets/images/png/Ellipse 43.png'), + backgroundImage: + const AssetImage( + 'assets/images/png/Ellipse 43.png'), radius: 25.r, ) : CircleAvatar( backgroundImage: NetworkImage( - followingobj! - .data![index] + mainFollowing .following! .profilePhoto!), radius: 25.r, @@ -244,39 +239,31 @@ class _FollowingState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - followingobj! - .data![index] - .following! + mainFollowing.following! .fullName == null || - followingobj! - .data![index] + mainFollowing .following! .fullName! .isEmpty ? text16w400_FCFCFC( "Regroup") : text16w400_FCFCFC( - followingobj! - .data![index] + mainFollowing .following! .fullName!), sizedBoxHeight(4.h), - followingobj! - .data![index] - .following! + mainFollowing.following! .userName == null || - followingobj! - .data![index] + mainFollowing .following! .userName! .isEmpty ? text12w400_FCFCFC_blur( "regroup") : text12w400_FCFCFC_blur( - followingobj! - .data![index] + mainFollowing .following! .userName!) ], @@ -289,7 +276,8 @@ class _FollowingState extends State { BoxConstraints.tightFor( width: 176.w), offset: const Offset(0, 20), - color: const Color(0xFF222935), + color: + const Color(0xFF222935), tooltip: "", itemBuilder: (BuildContext context) => @@ -297,12 +285,11 @@ class _FollowingState extends State { PopupMenuItem( onTap: () async { setState(() { - unfollowid = followingobj! - .data![ - index] - .following! - .id ?? - 0; + unfollowid = + mainFollowing + .following! + .id ?? + 0; // followingobj!.data!.removeAt(index); followingobj! .data! @@ -436,7 +423,8 @@ class _FollowingState extends State { if (snapshot.connectionState == ConnectionState.waiting) { // Display shimmer effect while waiting for data - return const Center(child: CircularProgressIndicator()); + return const Center( + child: CircularProgressIndicator()); } else if (snapshot.hasError) { // Handle error state return Center( @@ -459,11 +447,11 @@ class _FollowingState extends State { return commonDivider(); }, itemBuilder: (context, index) { + var guestFollowing = + getguestfollowingobj!.data![index]; return GestureDetector( onTap: () { - getguestfollowingobj! - .data![index] - .following! + guestFollowing.following! .principleTypeXid == 1 ? Get.toNamed( @@ -471,8 +459,7 @@ class _FollowingState extends State { .profiletabindguest, arguments: { "FollowingidIndex": - getguestfollowingobj! - .data![index] + guestFollowing .followingIamPrincipalXid!, }) : Get.toNamed( @@ -480,8 +467,7 @@ class _FollowingState extends State { .profiletabbusguest, arguments: { "FollowingidIndex": - getguestfollowingobj! - .data![index] + guestFollowing .followingIamPrincipalXid!, }, ); @@ -494,14 +480,10 @@ class _FollowingState extends State { horizontal: 16.w), child: Row( children: [ - getguestfollowingobj! - .data![ - index] - .following! + guestFollowing.following! .profilePhoto == null || - getguestfollowingobj! - .data![index] + guestFollowing .following! .profilePhoto! .isEmpty @@ -512,12 +494,11 @@ class _FollowingState extends State { radius: 25.r, ) : CircleAvatar( - backgroundImage: NetworkImage( - getguestfollowingobj! - .data![ - index] - .following! - .profilePhoto!), + backgroundImage: + NetworkImage( + guestFollowing + .following! + .profilePhoto!), radius: 25.r, ), sizedBoxWidth(10.w), @@ -526,45 +507,31 @@ class _FollowingState extends State { CrossAxisAlignment .start, children: [ - getguestfollowingobj! - .data![ - index] - .following! + guestFollowing.following! .fullName == null || - getguestfollowingobj! - .data![ - index] + guestFollowing .following! .fullName! .isEmpty ? text16w400_FCFCFC( "Regroup") : text16w400_FCFCFC( - getguestfollowingobj! - .data![ - index] + guestFollowing .following! .fullName!), sizedBoxHeight(4.h), - getguestfollowingobj! - .data![ - index] - .following! + guestFollowing.following! .userName == null || - getguestfollowingobj! - .data![ - index] + guestFollowing .following! .userName! .isEmpty ? text12w400_FCFCFC_blur( "regroup") : text12w400_FCFCFC_blur( - getguestfollowingobj! - .data![ - index] + guestFollowing .following! .userName!) ], @@ -572,15 +539,17 @@ class _FollowingState extends State { const Spacer(), PopupMenuButton( surfaceTintColor: - const Color(0xFF222935), + const Color( + 0xFF222935), constraints: BoxConstraints .tightFor( width: 176.w), - offset: const Offset(0, 20), - color: - const Color(0xFF222935), + offset: + const Offset(0, 20), + color: const Color( + 0xFF222935), tooltip: "", itemBuilder: (BuildContext @@ -589,17 +558,17 @@ class _FollowingState extends State { PopupMenuItem( onTap: () async { - setState( - () { - unfollowid = - getguestfollowingobj!.data![index].following!.id ?? - 0; - // followingobj!.data!.removeAt(index); - getguestfollowingobj!.data!.removeWhere((item) => - item.following!.id == - unfollowid); - Uploadata(); - }); + // setState( + // () { + // unfollowid = + // getguestfollowingobj!.data![index].following!.id ?? + // 0; + // // followingobj!.data!.removeAt(index); + // getguestfollowingobj!.data!.removeWhere((item) => + // item.following!.id == + // unfollowid); + // Uploadata(); + // }); }, child: Padding( @@ -610,7 +579,7 @@ class _FollowingState extends State { Row( children: [ text14400white( - "Unfollow user"), + ""), const Spacer(), Image .asset( diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart index ba8c3f2..5559c40 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart @@ -6,6 +6,7 @@ import 'package:regroup/Common/CommonGlassmorphism.dart'; import 'package:regroup/Common/CommonWidget.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart'; +import 'package:regroup/Utils/Common/ShimmerCommon.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/texts.dart'; import 'package:regroup/resources/routes/route_name.dart'; @@ -44,11 +45,13 @@ class _profiletabBusGestState extends State { future: guestBusfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + + // Center( + // child: CircularProgressIndicator( + // color: Colors.blue, + // ), + // ); } if (snapshot.hasError) { @@ -297,7 +300,9 @@ class _profiletabBusGestState extends State { )), ), sizedBoxWidth(12.w), - text14400whiteblur("James Bothman"), + text14400whiteblur(guestGetProfileBus! + .data!.businessOwnerName ?? + "James Bothman"), ], ), sizedBoxHeight(20.h), @@ -319,7 +324,8 @@ class _profiletabBusGestState extends State { ), sizedBoxWidth(12.w), text14400whiteblur( - "www.exampledummywebsite.com"), + guestGetProfileBus!.data!.websiteLink ?? + "www.exampledummywebsite.com"), ], ), sizedBoxHeight(20.h), @@ -340,7 +346,8 @@ class _profiletabBusGestState extends State { )), ), sizedBoxWidth(12.w), - text14400whiteblur( + text14400whiteblur(guestGetProfileBus! + .data!.businessLocation ?? "Elm street london, United Kingdom"), ], ), @@ -365,7 +372,13 @@ class _profiletabBusGestState extends State { // text14400whiteblur(getEditProfileIndi! // .data!.interest! // .join(', ')), - text14400whiteblur("Founded at : 2010"), + guestGetProfileBus!.data!.businessType! + .createdAt != + null + ? text14400whiteblur( + ' Founded at : ${guestGetProfileBus!.data!.businessType!.createdAt}') + : text14400whiteblur( + "Founded at : 2010") ], ), sizedBoxHeight(30.h), @@ -402,6 +415,25 @@ class _profiletabBusGestState extends State { sizedBoxHeight(20.h), Row( children: [ + GestureDetector( + onTap: () { + Get.back(); + }, + child: commonContainer( + width: 40.w, + height: 40.h, + borderwidth: 0.5, + boxShape: BoxShape.circle, + opacity1: 0.5, + opacity2: 0.6, + customWidget: Center( + child: Image.asset( + 'assets/images/png/ph_arrow-up-thin.png', + height: 25.h, + width: 25.w, + ), + )), + ), Spacer(), commonContainer( width: 40.w, diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart index 1fef178..a44a330 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart @@ -498,38 +498,48 @@ class _ProfileTabIndGuestState extends State { ], ), sizedBoxHeight(20.h), - SizedBox( - height: 300.h, - child: ListView.builder( - shrinkWrap: true, - itemCount: guestGetProfileInd! - .data!.timelines!.length, - itemBuilder: (context, index) { - var abilities; - abilities = guestGetProfileInd!.data! - .timelines![index].abilities! - .map((e) => e.name) - .join(', '); - return commonTimelineCard( - imagePath: timeline[index] - ["imagePath"], - title: guestGetProfileInd! - .data! - .timelines![index] - .teamName ?? - '', - teamName: guestGetProfileInd! - .data! - .timelines![index] - .teamName ?? - '', - abilities: abilities, - startendDate: - "${guestGetProfileInd!.data!.timelines![index].startDate} - ${guestGetProfileInd!.data!.timelines![index].endDate} " ?? + guestGetProfileInd!.data!.timelines!.isEmpty + ? Padding( + padding: EdgeInsets.symmetric( + vertical: 30.h), + child: Center( + child: text18w700white( + "No Timeline Found")), + ) + : SizedBox( + height: 300.h, + child: ListView.builder( + shrinkWrap: true, + itemCount: guestGetProfileInd! + .data!.timelines!.length, + itemBuilder: (context, index) { + var abilities; + abilities = guestGetProfileInd! + .data! + .timelines![index] + .abilities! + .map((e) => e.name) + .join(', '); + return commonTimelineCard( + imagePath: timeline[index] + ["imagePath"], + title: guestGetProfileInd! + .data! + .timelines![index] + .teamName ?? '', - ); - }, - )), + teamName: guestGetProfileInd! + .data! + .timelines![index] + .teamName ?? + '', + abilities: abilities, + startendDate: + "${guestGetProfileInd!.data!.timelines![index].startDate} - ${guestGetProfileInd!.data!.timelines![index].endDate} " ?? + '', + ); + }, + )), sizedBoxHeight(30.h), Row( children: [ @@ -544,67 +554,89 @@ class _ProfileTabIndGuestState extends State { ], ), sizedBoxHeight(20.h), - SizedBox( - height: 85.h, - child: ListView.builder( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - itemCount: guestGetProfileInd! - .data!.certifications!.length ?? - certificationData.length, - itemBuilder: (context, index) { - var certifiData = guestGetProfileInd! - .data!.certifications![index]; - return Padding( - padding: EdgeInsets.only(right: 20.w), - child: certificationCardTile( - imagePath: certifiData - .certificationImage ?? - certificationData[index] - ["imagePath"], - title: certifiData - .certificationName ?? - certificationData[index] - ["title"], - subtitle: certifiData - .certificationReason ?? - certificationData[index] - ["subtitle"], - date: - ("Issued ${certifiData.certificationDate}") ?? - (certificationData[index] - ["date"])), - ); - }, - ), - ), + guestGetProfileInd! + .data!.certifications!.isEmpty + ? Padding( + padding: EdgeInsets.symmetric( + vertical: 30.h), + child: Center( + child: text18w700white( + "No Certifications Found")), + ) + : SizedBox( + height: 85.h, + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.horizontal, + itemCount: guestGetProfileInd!.data! + .certifications!.length ?? + certificationData.length, + itemBuilder: (context, index) { + var certifiData = + guestGetProfileInd!.data! + .certifications![index]; + return Padding( + padding: EdgeInsets.only( + right: 20.w), + child: certificationCardTile( + imagePath: certifiData + .certificationImage ?? + certificationData[index] + ["imagePath"], + title: certifiData + .certificationName ?? + certificationData[index] + ["title"], + subtitle: certifiData + .certificationReason ?? + certificationData[index] + ["subtitle"], + date: + ("Issued ${certifiData.certificationDate}") ?? + (certificationData[ + index] + ["date"])), + ); + }, + ), + ), sizedBoxHeight(30.h), text18w400white("Subgroups"), ]), ), sizedBoxHeight(20.h), - SizedBox( - height: 190.h, - child: ListView.builder( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - padding: EdgeInsets.only(left: 16.w), - itemCount: guestGetProfileInd! - .data!.myJoinedSubgroups!.length, - itemBuilder: (context, index) { - var subGroupData = guestGetProfileInd!.data! - .myJoinedSubgroups![index].subGroupData!; - return Padding( - padding: EdgeInsets.only(right: 20.w), - child: profilecardtile( - imagePath: subGroupData.subGroupImage ?? - cardtile[index]["imagePath"], - title: subGroupData.title ?? - cardtile[index]["title"]), - ); - }, - ), - ), + guestGetProfileInd!.data!.myJoinedSubgroups!.isEmpty + ? Padding( + padding: EdgeInsets.symmetric(vertical: 30.h), + child: Center( + child: text18w700white( + "No Subgroups Found")), + ) + : SizedBox( + height: 190.h, + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.horizontal, + padding: EdgeInsets.only(left: 16.w), + itemCount: guestGetProfileInd! + .data!.myJoinedSubgroups!.length, + itemBuilder: (context, index) { + var subGroupData = guestGetProfileInd! + .data! + .myJoinedSubgroups![index] + .subGroupData!; + return Padding( + padding: EdgeInsets.only(right: 20.w), + child: profilecardtile( + imagePath: subGroupData + .subGroupImage ?? + cardtile[index]["imagePath"], + title: subGroupData.title ?? + cardtile[index]["title"]), + ); + }, + ), + ), sizedBoxHeight(20.h), Padding( padding: EdgeInsets.only(left: 16.w), @@ -635,6 +667,25 @@ class _ProfileTabIndGuestState extends State { sizedBoxHeight(20.h), Row( children: [ + GestureDetector( + onTap: () { + Get.back(); + }, + child: commonContainer( + width: 40.w, + height: 40.h, + borderwidth: 0.5, + boxShape: BoxShape.circle, + opacity1: 0.5, + opacity2: 0.6, + customWidget: Center( + child: Image.asset( + 'assets/images/png/ph_arrow-up-thin.png', + height: 25.h, + width: 25.w, + ), + )), + ), const Spacer(), commonContainer( width: 40.w, diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index f932031..013f769 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -6,6 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:glassmorphism/glassmorphism.dart'; +import 'package:glassmorphism_ui/glassmorphism_ui.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; @@ -79,32 +80,24 @@ class _CustomTextFormFieldState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GlassmorphicContainer( + GlassContainer( + height: 50.h, width: double.infinity, - height: 50, - borderRadius: 30, - blur: 6, - alignment: Alignment.bottomCenter, - border: 0.8, - linearGradient: LinearGradient( + gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ const Color(0xFFffffff).withOpacity(widget.opacity1), - const Color(0xFFFFFFFF).withOpacity(widget.opacity2), + const Color(0xFFFFFFFF).withOpacity(widget.opacity1), ], stops: const [ 0.1, 1, ]), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff434A53), - Color(0xFF434A53), - ], - ), + blur: 6, + opacity: 1, + borderRadius: BorderRadius.circular(30.r), + border: Border.all(color: Color(0xff434A53), width: 0.8), child: TextFormField( style: TextStyle( fontSize: 16.sp, color: Colors.white, fontFamily: 'Helvetica'), @@ -254,14 +247,10 @@ class _CustomTextFormField2State extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GlassmorphicContainer( - width: double.infinity, + GlassContainer( height: 100.h, - borderRadius: 10, - blur: 6, - alignment: Alignment.bottomCenter, - border: 0.8, - linearGradient: LinearGradient( + width: double.infinity, + gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ @@ -272,14 +261,10 @@ class _CustomTextFormField2State extends State { 0.1, 1, ]), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff434A53), - Color(0xFF434A53), - ], - ), + blur: 6, + opacity: 1, + borderRadius: BorderRadius.circular(10.r), + border: Border.all(color: Color(0xff434A53), width: 0.8), child: TextFormField( cursorColor: Colors.red, initialValue: widget.value,