diff --git a/assets/images/png/Frame 1000004082.png b/assets/images/png/Frame 1000004082.png new file mode 100644 index 0000000..204a009 Binary files /dev/null and b/assets/images/png/Frame 1000004082.png differ diff --git a/assets/images/png/Rectangle 46.png b/assets/images/png/Rectangle 46.png new file mode 100644 index 0000000..969ceff Binary files /dev/null and b/assets/images/png/Rectangle 46.png differ diff --git a/assets/images/png/Rectangle 60.png b/assets/images/png/Rectangle 60.png new file mode 100644 index 0000000..f2fe3f8 Binary files /dev/null and b/assets/images/png/Rectangle 60.png differ diff --git a/assets/images/png/Rectangle 65.png b/assets/images/png/Rectangle 65.png new file mode 100644 index 0000000..f2fe3f8 Binary files /dev/null and b/assets/images/png/Rectangle 65.png differ diff --git a/assets/images/png/Rectangle 66.png b/assets/images/png/Rectangle 66.png new file mode 100644 index 0000000..dc4ed62 Binary files /dev/null and b/assets/images/png/Rectangle 66.png differ diff --git a/assets/images/png/Rectangle 68.png b/assets/images/png/Rectangle 68.png new file mode 100644 index 0000000..f1f2ca3 Binary files /dev/null and b/assets/images/png/Rectangle 68.png differ diff --git a/lib/Common/CommonButton.dart b/lib/Common/CommonButton.dart new file mode 100644 index 0000000..3e0a685 --- /dev/null +++ b/lib/Common/CommonButton.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +Widget CommonBtn({void Function()? onTap, required String text}) { + return InkWell( + onTap: onTap, + child: Container( + width: double.infinity, + height: 50.h, + decoration: BoxDecoration( + color: Color(0xFFD90B2E), borderRadius: BorderRadius.circular(30)), + child: Center( + child: Text( + text, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontFamily: 'Helvetica', + fontWeight: FontWeight.w400, + ), + ), + ), + )); +} \ No newline at end of file diff --git a/lib/Common/CommonDropDown.dart b/lib/Common/CommonDropDown.dart index 0e28d6b..b171bb6 100644 --- a/lib/Common/CommonDropDown.dart +++ b/lib/Common/CommonDropDown.dart @@ -6,6 +6,9 @@ import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:get/get.dart'; +import 'package:regroup/Common/CommonWidget.dart'; +import 'package:regroup/Utils/Common/sized_box.dart'; class CommonDropdownBtn extends StatefulWidget { const CommonDropdownBtn({ @@ -163,7 +166,410 @@ class _CommonDropdownBtnState extends State { menuItemStyleData: const MenuItemStyleData( height: 40, padding: EdgeInsets.only(left: 14, right: 14), - + ), + ), + ), + ], + ), + ); + } +} + +class CommonDropdownradioBtn extends StatefulWidget { + const CommonDropdownradioBtn({ + required this.hint, + required this.items, + this.isEnabled = true, + this.islocation = false, + this.textcolor = false, + this.onItemSelected, + bool showAddButton = false, + super.key, + }); + + final String hint; + final List? items; + final void Function(String)? onItemSelected; + final bool isEnabled; + final bool islocation; + final bool textcolor; + + @override + State createState() => _CommonDropdownradioBtnState(); +} + +class _CommonDropdownradioBtnState extends State { + var selectedValue = ''.obs; + @override + Widget build(BuildContext context) { + return DropdownButtonHideUnderline( + child: Row( + children: [ + widget.islocation + ? Padding( + padding: EdgeInsets.only(left: 4.w), + child: SvgPicture.asset("assets/svg/location.svg"), + ) + : SizedBox(), + Expanded( + child: DropdownButton2( + isExpanded: true, + hint: Obx(() { + return Row( + children: [ + Expanded( + child: Text( + selectedValue.isEmpty + ? widget.hint + : selectedValue.value, + style: TextStyle( + fontSize: 12.sp, + fontFamily: 'hiragino', + color: Colors.white, + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ); + }), + items: widget.items!.asMap().entries.map((entry) { + int index = entry.key; + String item = entry.value; + return DropdownMenuItem( + value: item, + child: Column( + children: [ + InkWell( + onTap: () { + selectedValue.value = item; + if (widget.onItemSelected != null) { + widget.onItemSelected!(item); + } + }, + child: Row( + children: [ + Obx(() { + return Radio( + value: item, + activeColor: Colors.white, + groupValue: selectedValue.value, + onChanged: (value) { + selectedValue.value = value!; + if (widget.onItemSelected != null) { + widget.onItemSelected!(value); + } + }, + ); + }), + SizedBox(width: 8.w), + Text( + item, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontFamily: 'hiragino', + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ), + ], + ), + ), + if (index != widget.items!.length - 1) commonDivider(), + ], + ), + ); + }).toList(), + value: null, + onChanged: (value) {}, + selectedItemBuilder: (BuildContext context) { + return widget.items!.map((item) { + return Row( + children: [ + Expanded( + child: Obx(() { + return Text( + selectedValue.value, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontFamily: 'hiragino', + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ); + }), + ), + ], + ); + }).toList(); + }, + buttonStyleData: ButtonStyleData( + height: 50.h, + width: double.infinity, + padding: EdgeInsets.only(left: 12.w, right: 4.w), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFffffff).withOpacity(0.8), + Color(0xFFFFFFFF).withOpacity(0.8), + ], + stops: [0.1, 1], + ), + borderRadius: BorderRadius.circular(30.r), + border: Border.all( + color: Color(0xff434A53), + ), + color: Color(0xFFFFFFFF).withOpacity(0.05), + ), + elevation: 0, + ), + iconStyleData: IconStyleData( + icon: Icon( + Icons.keyboard_arrow_down, + ), + iconSize: 23.sp, + iconEnabledColor: Color(0xFFFFFFFF), + iconDisabledColor: Color(0xFFFFFFFF), + ), + dropdownStyleData: DropdownStyleData( + maxHeight: 200, + width: 400, + padding: null, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: Color(0xFF222935), + ), + elevation: 0, + scrollbarTheme: ScrollbarThemeData( + radius: const Radius.circular(40), + thickness: MaterialStateProperty.all(6), + thumbVisibility: MaterialStateProperty.all(true), + ), + ), + menuItemStyleData: const MenuItemStyleData( + height: 50, + padding: EdgeInsets.only(left: 14, right: 14), + ), + ), + ), + ], + ), + ); + } +} + +class CommonDropdownCheckbox extends StatefulWidget { + const CommonDropdownCheckbox({ + required this.hint, + required this.items, + required this.images, + this.isEnabled = true, + this.islocation = false, + this.textcolor = false, + this.onItemSelected, + bool showAddButton = false, + super.key, + }); + final String hint; + final List? items; + final List? images; + final void Function(String)? onItemSelected; + final bool isEnabled; + final bool islocation; + final bool textcolor; + + @override + State createState() => _CommonDropdownCheckboxState(); +} + +class _CommonDropdownCheckboxState extends State { + var selectedValues = [].obs; + @override + Widget build(BuildContext context) { + return DropdownButtonHideUnderline( + child: Row( + children: [ + widget.islocation + ? Padding( + padding: EdgeInsets.only(left: 4.w), + child: SvgPicture.asset("assets/svg/location.svg"), + ) + : SizedBox(), + Expanded( + child: DropdownButton2( + isExpanded: true, + hint: Obx(() { + return Row( + children: [ + Expanded( + child: Text( + selectedValues.isEmpty + ? widget.hint + : selectedValues.join(', '), + style: TextStyle( + fontSize: 12.sp, + fontFamily: 'hiragino', + color: Colors.white, + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ), + ), + ], + ); + }), + items: widget.items!.asMap().entries.map((entry) { + int index = entry.key; + String item = entry.value; + String image = widget.images![index]; + return DropdownMenuItem( + value: item, + child: InkWell( + onTap: () { + selectedValues.contains(item) + ? selectedValues.remove(item) + : selectedValues.add(item); + + if (widget.onItemSelected != null) { + widget.onItemSelected!(selectedValues.join(', ')); + } + }, + child: Column( + children: [ + Row( + children: [ + Container( + width: 40.w, + height: 40.h, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.r), + image: DecorationImage( + image: AssetImage(image), + fit: BoxFit.cover, + ), + ), + ), + SizedBox(width: 8.w), + Expanded( + child: Text( + item, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontFamily: 'hiragino', + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ), + ), + Obx(() { + return Transform.scale( + scale: 1, + child: Checkbox( + side: BorderSide(color: Color(0xFF434A53)), + value: selectedValues.contains(item), + activeColor: Color(0xFF434A53), + checkColor: Colors.white, + onChanged: (bool? value) { + if (value == true) { + selectedValues.add(item); + } else { + selectedValues.remove(item); + } + if (widget.onItemSelected != null) { + widget.onItemSelected!( + selectedValues.join(', ')); + } + }, + ), + ); + }), + ], + ), + SizedBox(height: 5.h), + if (index != widget.items!.length - 1) commonDivider() + ], + ), + ), + ); + }).toList(), + value: null, // Set to null to avoid the duplicate value issue + onChanged: (value) {}, + selectedItemBuilder: (BuildContext context) { + return widget.items!.map((item) { + return Row( + children: [ + Expanded( + child: Obx(() { + return Text( + selectedValues.join(', '), + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontFamily: 'hiragino', + fontWeight: FontWeight.w500, + ), + overflow: TextOverflow.ellipsis, + ); + }), + ), + ], + ); + }).toList(); + }, + buttonStyleData: ButtonStyleData( + height: 50.h, + width: double.infinity, + padding: EdgeInsets.only(left: 12.w, right: 4.w), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFFffffff).withOpacity(0.8), + Color(0xFFFFFFFF).withOpacity(0.8), + ], + stops: [0.1, 1], + ), + borderRadius: BorderRadius.circular(30.r), + border: Border.all( + color: Color(0xff434A53), + ), + color: Color(0xFFFFFFFF).withOpacity(0.05), + ), + elevation: 0, + ), + iconStyleData: IconStyleData( + icon: Icon( + Icons.keyboard_arrow_down, + ), + iconSize: 23.sp, + iconEnabledColor: Color(0xFFFFFFFF), + iconDisabledColor: Color(0xFFFFFFFF), + ), + dropdownStyleData: DropdownStyleData( + maxHeight: 200, + width: 400, + padding: null, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + color: Color(0xFF222935), + ), + elevation: 0, + scrollbarTheme: ScrollbarThemeData( + radius: Radius.circular(40), + thickness: MaterialStateProperty.all(6), + thumbVisibility: MaterialStateProperty.all(true), + ), + ), + menuItemStyleData: const MenuItemStyleData( + height: 60, + padding: EdgeInsets.only(left: 14, right: 14), ), ), ), diff --git a/lib/Common/CommonWidget.dart b/lib/Common/CommonWidget.dart index f677ead..690620c 100644 --- a/lib/Common/CommonWidget.dart +++ b/lib/Common/CommonWidget.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:regroup/Common/CommonGlassmorphism.dart'; +import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/texts.dart'; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; @@ -202,26 +204,36 @@ Widget stackContainers({ ); } -Widget popupMenuItemWidget({ - required void Function()? ontap, - required String text, - required String imageIcon, +Widget stackReaction({ + required String number, + required List containerImages, }) { - return PopupMenuItem( - onTap: ontap, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 12.w), - child: Row( - children: [ - text14w400white(text), - Spacer(), - Image.asset( - imageIcon, - height: 25.h, - width: 25.w, - ) - ], + return Row(children: [ + SizedBox( + height: 50, + width: 50, + child: Stack( + clipBehavior: Clip.none, + children: List.generate(containerImages.length, (index) { + return Positioned( + top: 6.h, + left: index * 23.w, + child: commonGlassContainer( + width: 30.w, + height: 30.h, + borderradius: 100, + customWidget: Center( + child: Image.asset( + containerImages[index], + height: 18.h, + width: 18.w, + ), + ), + border: 1.71)); + }), ), ), - ); + sizedBoxWidth(40.w), + text12w400_FCFCFC(number), + ]); } diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index 6c63ab8..8b868c3 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -4,6 +4,7 @@ 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/CommonWidget.dart'; import 'package:regroup/Common/controller/MainScreen.dart'; import 'package:regroup/Feed%20Module/sidemenu/sidemenu.dart'; import 'package:regroup/Utils/Common/blureffect.dart'; @@ -142,17 +143,42 @@ Widget feedTab() { return SingleChildScrollView( child: Column( children: [ - normalcardtile(), + normalcardtile( + 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), tagCardTile(), sizedBoxHeight(20.h), - normalcardtile(), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Ryan Dorwat', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]) ], ), ); } -Widget normalcardtile() { +Widget normalcardtile({ + required String profileImg, + required String title, + required String mainImg, + required List containerTitle, +}) { var mainImage = 'assets/images/png/uiw_like-o.png'.obs; void updateImage(String reaction) { if (reaction == 'like') { @@ -163,6 +189,7 @@ Widget normalcardtile() { mainImage.value = 'assets/images/png/party-popper 2.png'; } } + return Column( children: [ sizedBoxHeight(25.h), @@ -172,14 +199,14 @@ Widget normalcardtile() { crossAxisAlignment: CrossAxisAlignment.start, children: [ CircleAvatar( - foregroundImage: AssetImage('assets/images/png/Ellipse 43.png'), + foregroundImage: AssetImage(profileImg), radius: 25.r, ), sizedBoxWidth(12.w), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - text16w400_FCFCFC('Edward Hackket'), + text16w400_FCFCFC(title), sizedBoxHeight(5.h), Row( children: [ @@ -290,7 +317,7 @@ Widget normalcardtile() { ], child: Image.asset( 'assets/images/png/Group 1000004071.png', - width: 4.w, + width: 16.w, height: 18.h, ), ), @@ -303,7 +330,14 @@ Widget normalcardtile() { onTap: () { Get.toNamed(RouteName.postdetailsScreen); }, - child: Image.asset('assets/images/png/Rectangle 22.png')), + 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), @@ -313,7 +347,7 @@ Widget normalcardtile() { child: ListView.builder( scrollDirection: Axis.horizontal, shrinkWrap: true, - itemCount: titles.length, + itemCount: containerTitle.length, itemBuilder: (context, index) { return Padding( padding: EdgeInsets.only(right: 12.w), @@ -321,7 +355,7 @@ Widget normalcardtile() { onTap: () { Get.toNamed(RouteName.cyclescreen); }, - child: containertile(text: titles[index])), + child: containertile(text: containerTitle[index])), ); }, ), @@ -330,6 +364,11 @@ Widget normalcardtile() { text16w400_FCFCFC( "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."), Row(children: [ + stackReaction(number: '20', containerImages: [ + 'assets/images/png/f7_hand-thumbsup.png', + 'assets/images/png/heart 2.png', + 'assets/images/png/party-popper 2.png' + ]), Spacer(), commonGlassContainer( border: 0.9, @@ -427,11 +466,6 @@ Widget normalcardtile() { 'assets/images/png/party-popper 2.png'), ), ], - // placeholder: Reaction( - // value: 'like', - // icon: _buildReactionsIcon( - // 'assets/images/png/f7_hand-thumbsup.png'), - // ), selectedReaction: Reaction( value: 'like', icon: _buildReactionsIcon( @@ -461,16 +495,21 @@ Widget normalcardtile() { text11w400_FCFCFC('Like') ], ), - Column( - children: [ - Image.asset( - 'assets/images/png/Vector.png', - height: 19.h, - width: 19.w, - ), - sizedBoxHeight(8.h), - text11w400_FCFCFC('Comment') - ], + GestureDetector( + onTap: () { + Get.toNamed(RouteName.postdetailsScreen); + }, + child: Column( + children: [ + Image.asset( + 'assets/images/png/Vector.png', + height: 19.h, + width: 19.w, + ), + sizedBoxHeight(8.h), + text11w400_FCFCFC('Comment') + ], + ), ), Column( children: [ @@ -489,7 +528,6 @@ Widget normalcardtile() { ), ], ); - } Widget _buildReactionsPreviewIcon(String assetPath) { @@ -525,7 +563,17 @@ Widget tagCardTile() { padding: EdgeInsets.only(left: 16.w), child: text16w400_FCFCFC('#Announcement'), ), - normalcardtile(), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 48.png', + title: 'Jocelyn Dokidis', + mainImg: 'assets/images/png/Rectangle 46.png', + containerTitle: [ + 'Race', + 'Swimming', + 'Events', + 'Marathon', + 'Events' + ]), ], )); } @@ -548,9 +596,29 @@ Widget popularTab() { children: [ Column( children: [ - normalcardtile(), + normalcardtile( + 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), - normalcardtile(), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Edward Hackket', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]) ], ), ], diff --git a/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart b/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart index ffdd57f..a4b3407 100644 --- a/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart +++ b/lib/Feed Module/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart @@ -37,8 +37,17 @@ class _PostDetailsScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - sizedBoxHeight(16.h), - postCards(), + 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(30.h), commonDivider(), sizedBoxHeight(30.h), @@ -92,31 +101,40 @@ class _PostDetailsScreenState extends State { ])); } - Widget postCards() { - final List titles = [ - 'Cycle', - 'Marathon', - 'Events', - 'Swimming', - 'Events', - ]; + Widget postCards({ + required String profileImg, + required String title, + required String mainImg, + required List 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(16.h), + sizedBoxHeight(25.h), Padding( padding: EdgeInsets.symmetric(horizontal: 16.w), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ CircleAvatar( - foregroundImage: AssetImage('assets/images/png/Ellipse 43.png'), + foregroundImage: AssetImage(profileImg), radius: 25.r, ), sizedBoxWidth(12.w), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - text16w400_FCFCFC('Edward Hackket'), + text16w400_FCFCFC(title), sizedBoxHeight(5.h), Row( children: [ @@ -227,7 +245,7 @@ class _PostDetailsScreenState extends State { ], child: Image.asset( 'assets/images/png/Group 1000004071.png', - width: 4.w, + width: 16.w, height: 18.h, ), ), @@ -238,9 +256,16 @@ class _PostDetailsScreenState extends State { sizedBoxHeight(20.h), GestureDetector( onTap: () { - // Get.toNamed(RouteName.postdetailsScreen); + Get.toNamed(RouteName.postdetailsScreen); }, - child: Image.asset('assets/images/png/Rectangle 22.png')), + 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), @@ -250,7 +275,7 @@ class _PostDetailsScreenState extends State { child: ListView.builder( scrollDirection: Axis.horizontal, shrinkWrap: true, - itemCount: titles.length, + itemCount: containerTitle.length, itemBuilder: (context, index) { return Padding( padding: EdgeInsets.only(right: 12.w), @@ -258,7 +283,7 @@ class _PostDetailsScreenState extends State { onTap: () { Get.toNamed(RouteName.cyclescreen); }, - child: containertile(text: titles[index])), + child: containertile(text: containerTitle[index])), ); }, ), @@ -267,6 +292,11 @@ class _PostDetailsScreenState extends State { text16w400_FCFCFC( "Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."), Row(children: [ + stackReaction(number: '20', containerImages: [ + 'assets/images/png/f7_hand-thumbsup.png', + 'assets/images/png/heart 2.png', + 'assets/images/png/party-popper 2.png' + ]), Spacer(), commonGlassContainer( border: 0.9, @@ -334,63 +364,58 @@ class _PostDetailsScreenState extends State { Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - ReactionButton( - onReactionChanged: (reaction) { - debugPrint( - 'Selected value: ${reaction?.value}'); - }, - reactions: ?>[ - Reaction( + 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', - 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'), - ), - - // Add more reactions here if needed - ], - placeholder: Reaction( - value: 'like', - icon: _buildReactionsIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - ), - selectedReaction: Reaction( - value: 'like', - icon: _buildReactionsIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - ), - boxColor: Colors.white, - boxElevation: 5, - boxRadius: 50, - itemsSpacing: 8, - itemScale: 0.3, - itemSize: Size(40.w, 40.h), - boxPadding: EdgeInsets.all(4), - boxAnimationDuration: Duration(milliseconds: 200), - itemAnimationDuration: - Duration(milliseconds: 100), - hoverDuration: Duration(milliseconds: 400), - toggle: false, - direction: ReactionsBoxAlignment.ltr, - child: _buildReactionsIcon( - 'assets/images/png/uiw_like-o.png', - ), - ), + boxColor: Colors.white, + boxElevation: 5, + boxRadius: 50, + itemsSpacing: 8, + itemScale: 0.3, + itemSize: Size(40.0, 40.0), + boxPadding: EdgeInsets.all(4), + boxAnimationDuration: + Duration(milliseconds: 200), + itemAnimationDuration: + Duration(milliseconds: 100), + hoverDuration: Duration(milliseconds: 400), + toggle: false, + direction: ReactionsBoxAlignment.ltr, + child: _buildReactionsIcon(mainImage.value), + ); + }) ], ), ], @@ -399,17 +424,6 @@ class _PostDetailsScreenState extends State { text11w400_FCFCFC('Like') ], ), - Column( - children: [ - Image.asset( - 'assets/images/png/Vector.png', - height: 19.h, - width: 19.w, - ), - sizedBoxHeight(8.h), - text11w400_FCFCFC('Comment') - ], - ), Column( children: [ Image.asset( diff --git a/lib/Feed Module/Main_Screens/Community/PostScreen.dart b/lib/Feed Module/Main_Screens/Community/PostScreen.dart index 2cba896..32a1d80 100644 --- a/lib/Feed Module/Main_Screens/Community/PostScreen.dart +++ b/lib/Feed Module/Main_Screens/Community/PostScreen.dart @@ -2,13 +2,16 @@ 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/CommonButton.dart'; import 'package:regroup/Common/CommonDropDown.dart'; import 'package:regroup/Common/CommonGlassmorphism.dart'; import 'package:regroup/Utils/Common/CommonAppbar.dart'; +import 'package:regroup/Utils/Common/CommonDropdown.dart'; import 'package:regroup/Utils/Common/CustomTextformfield.dart'; import 'package:regroup/Utils/Common/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 PostScreen extends StatefulWidget { const PostScreen({super.key}); @@ -121,26 +124,96 @@ class _PostScreenState extends State { sizedBoxHeight(25.h), text16w400_FCFCFC("Post as"), sizedBoxHeight(18.h), - CommonDropdownBtn(hint: '', items: [ - 'Active alliance network', - 'Fitfam federation', - 'The athletic town' - ]), + CommonDropdownradioBtn( + hint: '', items: ['Individual', 'Anonymous']), + sizedBoxHeight(18.h), + + // CommonDropdownBtn(hint: '', items: [ + // 'Active alliance network', + // 'Fitfam federation', + // 'The athletic town' + // ]), sizedBoxHeight(25.h), text16w400_FCFCFC("Post in"), sizedBoxHeight(18.h), - CommonDropdownBtn(hint: '', items: [ - 'Active alliance network', - 'Fitfam federation', - 'The athletic town' - ]), - sizedBoxHeight(100.h), + CommonDropdownCheckbox( + hint: '', + items: [ + 'Active alliance network', + 'Fitfam federation', + 'The athletic town', + 'Football fever' + ], + images: [ + 'assets/images/png/Rectangle 65.png', + 'assets/images/png/Rectangle 66.png', + 'assets/images/png/Rectangle 60.png', + 'assets/images/png/Rectangle 68.png' + ], + ), + sizedBoxHeight(40.h), + CommonBtn( + text: 'Submit post', + onTap: () { + successBottomsheet(); + }, + ), + + sizedBoxHeight(150.h), ]), ), )) ])); } + void successBottomsheet() { + Get.bottomSheet(Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(14.r), + color: Color(0xFF222935)), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 30.w), + child: Column(mainAxisSize: MainAxisSize.min, children: [ + sizedBoxHeight(20.h), + Image.asset( + 'assets/images/png/Frame 1000004082.png', + width: 199.w, + height: 158.h, + ), + sizedBoxHeight(20.h), + text18w500Center_FCFCFC( + 'Your post has been succesfully uploaded'), + sizedBoxHeight(20.h), + InkWell( + onTap: () { + Get.toNamed(RouteName.mainscreen); + }, + child: Container( + height: 35.h, + width: 216.w, + decoration: BoxDecoration( + border: Border.all(color: Color(0xFF434A53), width: 1), + gradient: const LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color.fromRGBO(255, 255, 255, 0.054), + Color.fromRGBO(255, 255, 255, 0.072), + ], + stops: [0.0233, 1.0], + transform: GradientRotation(271.14 * + (3.141592653589793 / + 180)), // Converting degrees to radians + ), + borderRadius: BorderRadius.circular(30.r), + ), + child: Center(child: text14w400_FCFCFC('Check out')), + ), + ), + sizedBoxHeight(40.h) + ])))); + } + Widget containerTile({ required String text, required int index, diff --git a/lib/Login/View/loginscreen.dart b/lib/Login/View/loginscreen.dart index eb4d896..cc95d91 100644 --- a/lib/Login/View/loginscreen.dart +++ b/lib/Login/View/loginscreen.dart @@ -316,7 +316,7 @@ class _LoginScreenState extends State { // ], // ); // }), - CustomTextFormFieldPassword( + CustomTextFormField( isInputPassword: true, textEditingController: _password, hintText: 'Enter your password', @@ -326,7 +326,7 @@ class _LoginScreenState extends State { height: 17.h, ), // const Icon(Icons.lock_outline), - validatorText: "Enter your password", + validationMessage: "Enter your password", validator: (val) { if (val == null || val.isEmpty) { return 'Please enter your password'; diff --git a/lib/Utils/Common/CommonDropdown.dart b/lib/Utils/Common/CommonDropdown.dart index 67e1e48..1d3724f 100644 --- a/lib/Utils/Common/CommonDropdown.dart +++ b/lib/Utils/Common/CommonDropdown.dart @@ -70,6 +70,7 @@ class _CustomDropDownWidgetSignupState // Image.asset( // 'assets/images/png/user.png', // ), + widget.leadingImage!, SizedBox(width: 16.w), Text( diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index 7539624..d5c0e1c 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -5,12 +5,10 @@ import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; - import 'package:glassmorphism/glassmorphism.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; - class CustomTextFormField extends StatefulWidget { CustomTextFormField({ Key? key, diff --git a/lib/Utils/texts.dart b/lib/Utils/texts.dart index 7e60dd7..2825105 100644 --- a/lib/Utils/texts.dart +++ b/lib/Utils/texts.dart @@ -19,7 +19,6 @@ Widget text22400white(String text) { color: AppColors.white, fontWeight: FontWeight.w400, fontFamily: 'Helvetica'), - ); } @@ -67,7 +66,6 @@ Widget text14700white(String text) { color: AppColors.white, fontWeight: FontWeight.w700, fontFamily: 'Helvetica'), - ); } @@ -143,6 +141,7 @@ Widget text16400Black(String text, {TextAlign? textAlign}) { ), ); } + Widget text16w400white(String text, {TextAlign? textAlign}) { return Text( text, @@ -155,6 +154,7 @@ Widget text16w400white(String text, {TextAlign? textAlign}) { ), ); } + Widget text14w400white(String text, {TextAlign? textAlign}) { return Text( text, @@ -314,6 +314,29 @@ Widget text18w400_FCFCFC(String text) { ); } +Widget text18w500_FCFCFC(String text) { + return Text( + text, + style: TextStyle( + fontSize: 18.sp, + color: Color(0xFFFCFCFC), + fontFamily: 'Helvetica', + fontWeight: FontWeight.w500), + ); +} + +Widget text18w500Center_FCFCFC(String text) { + return Text( + text, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.sp, + color: Color(0xFFFCFCFC), + fontFamily: 'Helvetica', + fontWeight: FontWeight.w500), + ); +} + Widget text18w700_FCFCFC(String text) { return Text( text, diff --git a/lib/onboarding/Signup/View/signupscreen.dart b/lib/onboarding/Signup/View/signupscreen.dart index f9271f2..34023c8 100644 --- a/lib/onboarding/Signup/View/signupscreen.dart +++ b/lib/onboarding/Signup/View/signupscreen.dart @@ -146,7 +146,7 @@ class _SignupScreenState extends State { sizedBoxHeight(10.h), text16400white('Password'), sizedBoxHeight(10.h), - CustomTextFormFieldPassword( + CustomTextFormField( isInputPassword: true, textEditingController: _password, hintText: 'Enter your password', @@ -156,7 +156,7 @@ class _SignupScreenState extends State { height: 17.h, ), // const Icon(Icons.lock_outline), - validatorText: "Enter your password", + validationMessage: "Enter your password", validator: (val) { if (val == null || val.isEmpty) { return 'Please enter your password';