From 86b93fef5fb58040a690f353fec189e652dc8fa9 Mon Sep 17 00:00:00 2001 From: cj201199 Date: Mon, 8 Jul 2024 13:48:26 +0530 Subject: [PATCH] changes in community tab --- lib/Common/CommonGlassmorphism.dart | 35 + lib/Common/CommonWidget.dart | 24 +- .../Main_Screens/Community/Community.dart | 1222 ++++++++--------- .../Main_Screens/ProfileTab/ProfileTab.dart | 20 +- 4 files changed, 660 insertions(+), 641 deletions(-) diff --git a/lib/Common/CommonGlassmorphism.dart b/lib/Common/CommonGlassmorphism.dart index e1f4ee7..1513d1a 100644 --- a/lib/Common/CommonGlassmorphism.dart +++ b/lib/Common/CommonGlassmorphism.dart @@ -144,3 +144,38 @@ Widget commonGlassUI({ border: Border.all(color: borderColor, width: borderwidth), child: customWidget); } + +Widget commonContainer({ + required double width, + required double height, + // required double border, + // double mainOpacity = 1, + double opacity1 = 0.04, + double opacity2 = 0.05, + Color borderColor = const Color(0xff434A53), + double borderwidth = 1.0, + BorderRadius? borderRadius, + required Widget customWidget, + BoxShape boxShape = BoxShape.rectangle, +}) { + return Container( + width: width, + height: height, + decoration: BoxDecoration( + borderRadius: borderRadius, + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFFFFFFF).withOpacity(opacity1), + const Color(0xFFFFFFFF).withOpacity(opacity2), + ], + stops: const [ + 0.1, + 1, + ], + ), + shape: boxShape, + border: Border.all(color: borderColor, width: borderwidth)), + child: customWidget); +} diff --git a/lib/Common/CommonWidget.dart b/lib/Common/CommonWidget.dart index 9a2bf5c..e6cceea 100644 --- a/lib/Common/CommonWidget.dart +++ b/lib/Common/CommonWidget.dart @@ -312,15 +312,25 @@ Widget stackReaction({ return Positioned( top: 6.h, left: index * 23.w, - child: commonGlassUI( + child: Container( width: 30.w, height: 30.h, - mainOpacity: 1, - opacity1: 0.05, - opacity2: 0.06, - borderRadius: BorderRadius.circular(100), - - customWidget: Center( + decoration: BoxDecoration( + shape: BoxShape.circle, + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFFFFFFF).withOpacity(0.1), + const Color(0xFFFFFFFF).withOpacity(0.06), + ], + stops: const [ + 0.1, + 1, + ], + ), + border: Border.all(color: Color(0xFF1E3A46), width: 1.71)), + child: Center( child: Image.asset( containerImages[index], height: 18.h, diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index fabfb95..eaf2ade 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -166,249 +166,110 @@ class _CommunityScreenState extends State { } Widget feedTab() { - return SingleChildScrollView( - child: Column(children: [ + List feedTabData = [ + { + "profileImg": "assets/images/png/Ellipse 43.png", + "title": "Edward Hackket", + "mainImg": "assets/images/png/Rectangle 24.png", + "containerTitle": ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events'], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + ]; + + return Column(children: [ sizedBoxHeight(16.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 43.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 24.png', - containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), - sizedBoxHeight(20.h), - announcecardtile( - profileImg: 'assets/images/png/Ellipse 48.png', - title: 'Jocelyn Dokidis', - mainImg: 'assets/images/png/Rectangle 46.png', - containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - ])); + Expanded( + child: ListView.builder( + shrinkWrap: true, + itemCount: feedTabData.length, + itemBuilder: (context, index) { + if (index == 1) { + return announcecardtile( + profileImg: 'assets/images/png/Ellipse 48.png', + title: 'Jocelyn Dokidis', + mainImg: 'assets/images/png/Rectangle 46.png', + containerTitle: [ + 'Race', + 'Swimming', + 'Events', + 'Marathon', + 'Events' + ]); + } else { + return Column( + children: [ + normalcardtile2( + profileImg: feedTabData[index]["profileImg"], + title: feedTabData[index]["title"], + mainImg: feedTabData[index]["mainImg"], + containerTitle: feedTabData[index]["containerTitle"]), + sizedBoxHeight(20.h) + ], + ); + } + }, + ), + ), + // normalcardtile2( + // profileImg: 'assets/images/png/Ellipse 43.png', + // title: 'Edward Hackket', + // mainImg: 'assets/images/png/Rectangle 24.png', + // containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), + // sizedBoxHeight(20.h), + // announcecardtile( + // profileImg: 'assets/images/png/Ellipse 48.png', + // title: 'Jocelyn Dokidis', + // mainImg: 'assets/images/png/Rectangle 46.png', + // containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), + // sizedBoxHeight(20.h), + // normalcardtile2( + // profileImg: 'assets/images/png/Ellipse 52.png', + // title: 'Ryan Dorwat', + // mainImg: 'assets/images/png/Rectangle 25.png', + // containerTitle: [ + // 'Football', + // 'Teams player', + // 'Events', + // 'Marathon', + // 'Events' + // ]), + // sizedBoxHeight(20.h), + ]); } Widget normalcardtile2({ @@ -619,13 +480,14 @@ Widget normalcardtile2({ ]), ), const Spacer(), - commonGlassUI( + commonContainer( width: 30.w, height: 30.h, - borderRadius: BorderRadius.circular(100), - mainOpacity: 0.4, - opacity1: 0.5, - opacity2: 0.6, + borderColor: 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', @@ -637,13 +499,14 @@ Widget normalcardtile2({ sizedBoxWidth(12.w), text14w400_FCFCFC('20'), sizedBoxWidth(20.w), - commonGlassUI( + commonContainer( width: 30.w, height: 30.h, - borderRadius: BorderRadius.circular(100), - mainOpacity: 0.4, - opacity1: 0.5, - opacity2: 0.6, + borderColor: 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', @@ -1121,336 +984,345 @@ Widget announcecardtile({ } // MediaQuery.of(context).size.height - return commonGlassUIBlue( - width: double.infinity, - height: 610.h, - mainOpacity: 1, - borderRadius: BorderRadius.circular(1), - customWidget: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - sizedBoxHeight(25.h), - Padding( - padding: EdgeInsets.only(left: 16.w), - child: text16w700_FCFCFC("#Announcement"), - ), - 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( + return Column( + children: [ + commonGlassUIBlue( + width: double.infinity, + height: 610.h, + mainOpacity: 1, + borderRadius: BorderRadius.circular(1), + customWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + sizedBoxHeight(25.h), + Padding( + padding: EdgeInsets.only(left: 16.w), + child: text16w700_FCFCFC("#Announcement"), + ), + sizedBoxHeight(25.h), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - text16w400_FCFCFC(title), - sizedBoxHeight(5.h), - Row( + CircleAvatar( + foregroundImage: AssetImage(profileImg), + radius: 25.r, + ), + sizedBoxWidth(12.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, 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'), + 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) => [ + 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) ], ), - 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) => [ - 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: Container( - height: 163.h, - width: double.infinity, - child: Image.asset( - mainImg, - fit: BoxFit.cover, - ), - )), - sizedBoxHeight(20.h), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: Column(children: [ - SizedBox( - height: 30.h, - child: ListView.builder( - scrollDirection: Axis.horizontal, - shrinkWrap: true, - itemCount: containerTitle.length, - itemBuilder: (context, index) { - return Padding( - padding: EdgeInsets.only(right: 12.w), - child: GestureDetector( - onTap: () { - // Get.toNamed(RouteName.cyclescreen); - }, - child: containertile(text: containerTitle[index])), - ); - }, - ), ), sizedBoxHeight(20.h), - text16w400_FCFCFC( - "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."), - Row(children: [ - InkWell( + GestureDetector( onTap: () { - // Get.toNamed(RouteName.reactionview); + // Get.toNamed(RouteName.postdetailsScreen); }, - 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: Container( + height: 163.h, + width: double.infinity, child: Image.asset( - 'assets/images/png/Frame 1000004088.png', - height: 13.h, - width: 13.w, + mainImg, + fit: BoxFit.cover, ), - ), - ), - 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( - onReactionChanged: (reaction) { - updateImage(reaction?.value ?? 'like'); - debugPrint('Selected value: ${reaction?.value}'); - }, - reactions: ?>[ - Reaction( - value: 'like', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - icon: _buildReactionsIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - ), - Reaction( - value: 'heart', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/heart 2.png'), - icon: _buildReactionsIcon( - 'assets/images/png/heart 2.png'), - ), - Reaction( - value: 'party', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/party-popper 2.png'), - icon: _buildReactionsIcon( - 'assets/images/png/party-popper 2.png'), - ), - ], - selectedReaction: Reaction( - 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), + )), + 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: + containertile2(text: containerTitle[index])), ); - }) - ], - ), - 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(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(), + commonContainer( + width: 30.w, + height: 30.h, + borderColor: 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, + ), ), - sizedBoxHeight(8.h), - text11w400_FCFCFC('Save') + ), + sizedBoxWidth(12.w), + text14w400_FCFCFC('20'), + sizedBoxWidth(20.w), + commonContainer( + width: 30.w, + height: 30.h, + borderColor: 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), + text14w400_FCFCFC('10'), + ]), + sizedBoxHeight(12.h), + commonDivider(), + sizedBoxHeight(12.h), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Obx(() { + return ReactionButton( + onReactionChanged: (reaction) { + updateImage(reaction?.value ?? 'like'); + debugPrint( + 'Selected value: ${reaction?.value}'); + }, + reactions: ?>[ + Reaction( + value: 'like', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + icon: _buildReactionsIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + ), + Reaction( + value: 'heart', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/heart 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/heart 2.png'), + ), + Reaction( + value: 'party', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/party-popper 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/party-popper 2.png'), + ), + ], + selectedReaction: Reaction( + 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), + ]), ), - sizedBoxHeight(12.h), - commonDivider(), - sizedBoxHeight(12.h), - ]), - ), - ], - )); + ], + )), + sizedBoxHeight(20.h), + ], + ); } Widget _buildReactionsPreviewIcon(String assetPath) { @@ -1492,14 +1364,13 @@ Widget containertile({required String text}) { } Widget containertile2({required String text}) { - return commonGlassUI( + return commonContainer( width: 130.w, height: 30.h, - // mainOpacity: 0.2, - opacity1: 0.5, - opacity2: 0.6, - borderColor: const Color(0xFFD90B2E), borderRadius: BorderRadius.circular(30.r), + borderColor: Color(0xFFD90B2E), + opacity1: 0.04, + opacity2: 0.05, customWidget: Padding( padding: EdgeInsets.symmetric(horizontal: 10.w), child: Center(child: text14w400_FCFCFC(text)), @@ -1507,65 +1378,168 @@ Widget containertile2({required String text}) { } Widget popularTab() { - return SingleChildScrollView( - child: Column( - children: [ - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 43.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 24.png', - containerTitle: [ - 'Race', - 'Swimming', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), + List popularTabData = [ + { + "profileImg": "assets/images/png/Ellipse 43.png", + "title": "Edward Hackket", + "mainImg": "assets/images/png/Rectangle 24.png", + "containerTitle": ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events'], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' ], - ), + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + ]; + + return Column( + children: [ + sizedBoxHeight(20.h), + Expanded( + child: ListView.builder( + shrinkWrap: true, + itemCount: popularTabData.length, + itemBuilder: (context, index) { + return Column( + children: [ + normalcardtile2( + profileImg: popularTabData[index]["profileImg"], + title: popularTabData[index]["title"], + mainImg: popularTabData[index]["mainImg"], + containerTitle: popularTabData[index]["containerTitle"]), + sizedBoxHeight(20.h) + ], + ); + }, + ), + ), + ], ); } Widget latestTab() { - return SingleChildScrollView( - child: Column(children: [ + List latestTabData = [ + { + "profileImg": "assets/images/png/Ellipse 43.png", + "title": "Edward Hackket", + "mainImg": "assets/images/png/Rectangle 24.png", + "containerTitle": ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events'], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + { + "profileImg": "'assets/images/png/Ellipse 52.png'", + "title": "Ryan Dorwat", + "mainImg": "assets/images/png/Rectangle 25.png", + "containerTitle": [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ], + }, + ]; + + return Column(children: [ sizedBoxHeight(16.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 43.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 24.png', - containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), - sizedBoxHeight(20.h), - announcecardtile( - profileImg: 'assets/images/png/Ellipse 48.png', - title: 'Jocelyn Dokidis', - mainImg: 'assets/images/png/Rectangle 46.png', - containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - ])); + Expanded( + child: ListView.builder( + shrinkWrap: true, + itemCount: latestTabData.length, + itemBuilder: (context, index) { + if (index == 1) { + return announcecardtile( + profileImg: 'assets/images/png/Ellipse 48.png', + title: 'Jocelyn Dokidis', + mainImg: 'assets/images/png/Rectangle 46.png', + containerTitle: [ + 'Race', + 'Swimming', + 'Events', + 'Marathon', + 'Events' + ]); + } else { + return Column( + children: [ + normalcardtile2( + profileImg: latestTabData[index]["profileImg"], + title: latestTabData[index]["title"], + mainImg: latestTabData[index]["mainImg"], + containerTitle: latestTabData[index]["containerTitle"]), + sizedBoxHeight(20.h) + ], + ); + } + }, + ), + ), + + // normalcardtile2( + // profileImg: 'assets/images/png/Ellipse 43.png', + // title: 'Edward Hackket', + // mainImg: 'assets/images/png/Rectangle 24.png', + // containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), + // sizedBoxHeight(20.h), + // announcecardtile( + // profileImg: 'assets/images/png/Ellipse 48.png', + // title: 'Jocelyn Dokidis', + // mainImg: 'assets/images/png/Rectangle 46.png', + // containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), + // sizedBoxHeight(20.h), + ]); } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart b/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart index 59700f6..462869a 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart @@ -749,13 +749,13 @@ class _ProfileTabState extends State { 'assets/images/png/party-popper 2.png' ]), Spacer(), - commonGlassUI( + commonContainer( width: 30.w, height: 30.h, - opacity1: 0.05, - opacity2: 0.06, + opacity1: 0.2, + opacity2: 0.2, borderwidth: 0.43, - borderRadius: BorderRadius.circular(100), + boxShape: BoxShape.circle, customWidget: Center( child: Image.asset( 'assets/images/png/Frame 1000004088.png', @@ -767,13 +767,13 @@ class _ProfileTabState extends State { sizedBoxWidth(12.w), text14w400_FCFCFC('20'), sizedBoxWidth(20.w), - commonGlassUI( + commonContainer( width: 30.w, height: 30.h, - opacity1: 0.05, - opacity2: 0.06, + opacity1: 0.2, + opacity2: 0.2, borderwidth: 0.43, - borderRadius: BorderRadius.circular(100), + boxShape: BoxShape.circle, customWidget: Center( child: Image.asset( 'assets/images/png/Vector (1).png', @@ -904,12 +904,12 @@ class _ProfileTabState extends State { } Widget containertile({required String text}) { - return commonGlassUI( + return commonContainer( width: 100.w, height: 30.h, + borderRadius: BorderRadius.circular(30.r), borderColor: Color(0xFFD90B2E), borderwidth: 0.9, - borderRadius: BorderRadius.circular(30.r), customWidget: Padding( padding: EdgeInsets.symmetric(horizontal: 10.w), child: Center(child: text14w400_FCFCFC(text)),