Merge pull request #145 from WDI-Ideas/dipti
overflow changes and leave community api completed
This commit is contained in:
@@ -12,8 +12,7 @@ Widget commonGlassContainer({
|
||||
double opacity2 = 0.05,
|
||||
Color borderColor = const Color(0xff434A53),
|
||||
}) {
|
||||
return
|
||||
GlassmorphicContainer(
|
||||
return GlassmorphicContainer(
|
||||
width: width,
|
||||
height: height,
|
||||
borderRadius: borderradius,
|
||||
@@ -83,7 +82,7 @@ Widget commonGlassContainerblue({
|
||||
|
||||
Widget commonGlassUIBlue({
|
||||
required double width,
|
||||
required double height,
|
||||
required double? height,
|
||||
required Widget customWidget,
|
||||
// required double border,
|
||||
double mainOpacity = 1,
|
||||
@@ -114,7 +113,7 @@ Widget commonGlassUIBlue({
|
||||
|
||||
Widget commonGlassUI({
|
||||
required double width,
|
||||
required double height,
|
||||
required double? height,
|
||||
// required double border,
|
||||
double mainOpacity = 1,
|
||||
double opacity1 = 0.04,
|
||||
@@ -148,7 +147,7 @@ Widget commonGlassUI({
|
||||
|
||||
Widget commonContainer({
|
||||
required double width,
|
||||
required double height,
|
||||
required double? height,
|
||||
// required double border,
|
||||
// double mainOpacity = 1,
|
||||
double opacity1 = 0.04,
|
||||
|
||||
@@ -174,489 +174,507 @@ class _NormalCardTileState extends State<NormalCardTile> {
|
||||
.split(
|
||||
"https://regroup.betadelivery.com/storage/app/public/uploads/post_image/")
|
||||
.last;
|
||||
return commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 765,
|
||||
mainOpacity: 1,
|
||||
borderRadius: BorderRadius.circular(1),
|
||||
customWidget: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundImage: widget
|
||||
.commonObj.iamPrincipal?.profilePhoto !=
|
||||
null
|
||||
? NetworkImage(
|
||||
widget.commonObj.iamPrincipal!.profilePhoto!)
|
||||
as ImageProvider<Object>
|
||||
: const AssetImage('assets/images/default_profile.png')
|
||||
as ImageProvider<Object>,
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(
|
||||
widget.commonObj.iamPrincipal!.fullName ??
|
||||
"Regroup"),
|
||||
sizedBoxWidth(10.w),
|
||||
widget.coachbool == true
|
||||
? Container(
|
||||
width: 75.w,
|
||||
height: 25.h,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: const Color(0xFFD90B2E),
|
||||
width: 1.w,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
child:
|
||||
Center(child: text12w400_FCFCFC("Coach")),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC(
|
||||
widget.commonObj.community!.communityName ?? ""),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC(widget.createAt!),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
pinunpinUser(widget.commonObj.iamPrincipal!.id!);
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
countersHelper
|
||||
.pinButtonPopular[widget.currentIndex]
|
||||
? Text(
|
||||
'Unpin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
countersHelper
|
||||
.pinButtonPopular[widget.currentIndex]
|
||||
? Image.asset(
|
||||
"assets/images/png/PinnedIcon.png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
bool result = await Get.toNamed(RouteName.postdetailsScreen,
|
||||
arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
'tagsList': widget.tags,
|
||||
'created_at': widget.createAt,
|
||||
'commonObj': widget.commonObj,
|
||||
'fromWhichTab': widget.forWhichTab,
|
||||
'reactions': widget.reactions,
|
||||
'selectedReactions': widget.selectedReactions,
|
||||
'currentIndex': widget.currentIndex
|
||||
});
|
||||
if (result) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 360,
|
||||
width: double.infinity,
|
||||
child: CachedNetworkImage(
|
||||
cacheKey: imgUrl,
|
||||
imageUrl: widget.commonObj.image!,
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) => const Center(
|
||||
child:
|
||||
CircularProgressIndicator()), // Optional: shows a loading indicator while the image is loading
|
||||
errorWidget: (context, url, error) => const Center(
|
||||
child: Icon(Icons
|
||||
.error)), // Optional: shows an error icon if the image fails to load
|
||||
),
|
||||
)),
|
||||
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: widget.tags.length,
|
||||
itemBuilder: (context, index) {
|
||||
var manageTag = widget.tags[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.tagdetailscreen, arguments: {
|
||||
'tagid': manageTag.id,
|
||||
'tagname': manageTag.name,
|
||||
'ispinnedtag': manageTag.isPinned,
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
commonContainer(
|
||||
width: 130.w,
|
||||
height: 30.h,
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
borderColor: const Color(0xFFD90B2E),
|
||||
opacity1: 0.04,
|
||||
opacity2: 0.05,
|
||||
customWidget: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
'#${manageTag.name}',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
SizedBox(
|
||||
height: 80.h,
|
||||
width: double.infinity,
|
||||
child: SingleChildScrollView(
|
||||
child: text16w400_FCFCFC(widget.commonObj.caption ?? "")),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(children: [
|
||||
Obx(
|
||||
() => InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.reactionview, arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
});
|
||||
},
|
||||
child: stackReaction(
|
||||
number: countersHelper
|
||||
.likesCounterPopular[widget.currentIndex]
|
||||
.toString(),
|
||||
containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderColor: const Color(0xFF434A53),
|
||||
borderwidth: 0.43,
|
||||
opacity1: 0.2,
|
||||
opacity2: 0.2,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC(
|
||||
widget.commonObj.totalCommentCount.toString()),
|
||||
sizedBoxWidth(20.w),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderColor: const Color(0xFF434A53),
|
||||
borderwidth: 0.43,
|
||||
opacity1: 0.2,
|
||||
opacity2: 0.2,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Obx(
|
||||
() => text14w400_FCFCFC(countersHelper
|
||||
.savePostCounterPopular[widget.currentIndex]
|
||||
.toString()),
|
||||
),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
|
||||
return ConstrainedBox(
|
||||
constraints: BoxConstraints(minHeight: 750.h),
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 600.h,
|
||||
mainOpacity: 1,
|
||||
borderRadius: BorderRadius.circular(1),
|
||||
customWidget: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundImage:
|
||||
widget.commonObj.iamPrincipal?.profilePhoto != null
|
||||
? NetworkImage(widget.commonObj.iamPrincipal!
|
||||
.profilePhoto!) as ImageProvider<Object>
|
||||
: const AssetImage(
|
||||
'assets/images/default_profile.png')
|
||||
as ImageProvider<Object>,
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ReactionButton<String>(
|
||||
onReactionChanged: (reaction) async {
|
||||
_handleReactionChange(reaction);
|
||||
Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(
|
||||
widget.commonObj.iamPrincipal!.fullName ??
|
||||
"Regroup"),
|
||||
sizedBoxWidth(10.w),
|
||||
widget.coachbool == true
|
||||
? Container(
|
||||
width: 75.w,
|
||||
height: 25.h,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: const Color(0xFFD90B2E),
|
||||
width: 1.w,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
|
||||
),
|
||||
child: Center(
|
||||
child: text12w400_FCFCFC("Coach")),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC(
|
||||
widget.commonObj.community!.communityName ??
|
||||
""),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC(widget.createAt!),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
pinunpinUser(widget.commonObj.iamPrincipal!.id!);
|
||||
},
|
||||
reactions: widget.reactions
|
||||
.map((reaction) => Reaction<String>(
|
||||
value: reaction.id.toString(),
|
||||
previewIcon: Image.network(reaction.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover),
|
||||
icon: Image.network(reaction.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover),
|
||||
))
|
||||
.toList(),
|
||||
selectedReaction: widget
|
||||
.selectedReactions[widget.commonObj.id] !=
|
||||
null
|
||||
? Reaction<String>(
|
||||
value: widget
|
||||
.selectedReactions[widget.commonObj.id]!
|
||||
.id
|
||||
.toString(),
|
||||
icon: Image.network(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
countersHelper
|
||||
.pinButtonPopular[widget.currentIndex]
|
||||
? Text(
|
||||
'Unpin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
const Spacer(),
|
||||
countersHelper
|
||||
.pinButtonPopular[widget.currentIndex]
|
||||
? Image.asset(
|
||||
"assets/images/png/PinnedIcon.png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
bool result = await Get.toNamed(RouteName.postdetailsScreen,
|
||||
arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
'tagsList': widget.tags,
|
||||
'created_at': widget.createAt,
|
||||
'commonObj': widget.commonObj,
|
||||
'fromWhichTab': widget.forWhichTab,
|
||||
'reactions': widget.reactions,
|
||||
'selectedReactions': widget.selectedReactions,
|
||||
'currentIndex': widget.currentIndex
|
||||
});
|
||||
if (result) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 360,
|
||||
width: double.infinity,
|
||||
child: CachedNetworkImage(
|
||||
cacheKey: imgUrl,
|
||||
imageUrl: widget.commonObj.image!,
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) => const Center(
|
||||
child:
|
||||
CircularProgressIndicator()), // Optional: shows a loading indicator while the image is loading
|
||||
errorWidget: (context, url, error) => const Center(
|
||||
child: Icon(Icons
|
||||
.error)), // Optional: shows an error icon if the image fails to load
|
||||
),
|
||||
)),
|
||||
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: widget.tags.length,
|
||||
itemBuilder: (context, index) {
|
||||
var manageTag = widget.tags[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.tagdetailscreen,
|
||||
arguments: {
|
||||
'tagid': manageTag.id,
|
||||
'tagname': manageTag.name,
|
||||
'ispinnedtag': manageTag.isPinned,
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
commonContainer(
|
||||
width: 130.w,
|
||||
height: 30.h,
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
borderColor: const Color(0xFFD90B2E),
|
||||
opacity1: 0.04,
|
||||
opacity2: 0.05,
|
||||
customWidget: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(
|
||||
child: text14w400_FCFCFC(
|
||||
'#${manageTag.name}',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: Text(
|
||||
widget.commonObj.caption ?? "",
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
maxLines: 2, // Set the maximum number of lines
|
||||
overflow: TextOverflow
|
||||
.ellipsis, // Truncate the text with an ellipsis
|
||||
),
|
||||
),
|
||||
// sizedBoxHeight(20.h),
|
||||
Row(children: [
|
||||
Obx(
|
||||
() => InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.reactionview, arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
});
|
||||
},
|
||||
child: stackReaction(
|
||||
number: countersHelper
|
||||
.likesCounterPopular[widget.currentIndex]
|
||||
.toString(),
|
||||
containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderColor: const Color(0xFF434A53),
|
||||
borderwidth: 0.43,
|
||||
opacity1: 0.2,
|
||||
opacity2: 0.2,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC(
|
||||
widget.commonObj.totalCommentCount.toString()),
|
||||
sizedBoxWidth(20.w),
|
||||
commonContainer(
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderColor: const Color(0xFF434A53),
|
||||
borderwidth: 0.43,
|
||||
opacity1: 0.2,
|
||||
opacity2: 0.2,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Obx(
|
||||
() => text14w400_FCFCFC(countersHelper
|
||||
.savePostCounterPopular[widget.currentIndex]
|
||||
.toString()),
|
||||
),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ReactionButton<String>(
|
||||
onReactionChanged: (reaction) async {
|
||||
_handleReactionChange(reaction);
|
||||
},
|
||||
reactions: widget.reactions
|
||||
.map((reaction) => Reaction<String>(
|
||||
value: reaction.id.toString(),
|
||||
previewIcon: Image.network(reaction.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover),
|
||||
icon: Image.network(reaction.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover),
|
||||
))
|
||||
.toList(),
|
||||
selectedReaction: widget.selectedReactions[
|
||||
widget.commonObj.id] !=
|
||||
null
|
||||
? Reaction<String>(
|
||||
value: widget
|
||||
.selectedReactions[widget.commonObj.id]!
|
||||
.id
|
||||
.toString(),
|
||||
icon: Image.network(
|
||||
widget
|
||||
.selectedReactions[
|
||||
widget.commonObj.id]!
|
||||
.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 9,
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 20,
|
||||
itemScale: 0.3,
|
||||
itemSize: const Size(30, 30),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
child: widget.selectedReactions[
|
||||
widget.commonObj.id] !=
|
||||
null
|
||||
? Image.network(
|
||||
widget
|
||||
.selectedReactions[widget.commonObj.id]!
|
||||
.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 9,
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 20,
|
||||
itemScale: 0.3,
|
||||
itemSize: const Size(30, 30),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
child: widget
|
||||
.selectedReactions[widget.commonObj.id] !=
|
||||
null
|
||||
? Image.network(
|
||||
widget.selectedReactions[widget.commonObj.id]!
|
||||
.image,
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/uiw_like-o.png',
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Like'),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
bool result = await Get.toNamed(
|
||||
RouteName.postdetailsScreen,
|
||||
arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
'tagsList': widget.tags,
|
||||
'created_at': widget.createAt,
|
||||
'commonObj': widget.commonObj,
|
||||
'fromWhichTab': widget.forWhichTab,
|
||||
'reactions': widget.reactions,
|
||||
'selectedReactions': widget.selectedReactions,
|
||||
'currentIndex': widget.currentIndex
|
||||
});
|
||||
if (result) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => Column(
|
||||
//here
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async =>
|
||||
await saveunsavepost(widget.commonObj.id!),
|
||||
child: countersHelper
|
||||
.saveButtonPopular[widget.currentIndex]
|
||||
? Image.asset(
|
||||
'assets/images/png/postSaved.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
'assets/images/png/uiw_like-o.png',
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
text11w400_FCFCFC('Like'),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
bool result = await Get.toNamed(
|
||||
RouteName.postdetailsScreen,
|
||||
arguments: {
|
||||
'postId': widget.commonObj.id,
|
||||
'tagsList': widget.tags,
|
||||
'created_at': widget.createAt,
|
||||
'commonObj': widget.commonObj,
|
||||
'fromWhichTab': widget.forWhichTab,
|
||||
'reactions': widget.reactions,
|
||||
'selectedReactions': widget.selectedReactions,
|
||||
'currentIndex': widget.currentIndex
|
||||
});
|
||||
if (result) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => Column(
|
||||
//here
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async =>
|
||||
await saveunsavepost(widget.commonObj.id!),
|
||||
child: countersHelper
|
||||
.saveButtonPopular[widget.currentIndex]
|
||||
? Image.asset(
|
||||
'assets/images/png/postSaved.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,10 @@ import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/ConvertServerDateToUserDate.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
|
||||
import 'package:regroup/Common/controller/NormalPostCard.dart';
|
||||
|
||||
import 'package:regroup/Main_Screens/Community/Model/CommonDatumObjModel.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Model/fetchicons.dart';
|
||||
import 'package:regroup/Main_Screens/Community/ViewModel/getmethod.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/Community.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/view_model/CountersHelper.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
@@ -100,7 +97,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
titleTxt: "",
|
||||
customActionWidget: PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 190.w),
|
||||
constraints: BoxConstraints.tightFor(width: 180.w),
|
||||
offset: const Offset(0, 40),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
@@ -618,15 +615,15 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
borderwidth: 1),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
// Container(
|
||||
// height: 40.h,
|
||||
// width: 200.w,
|
||||
// decoration: BoxDecoration(
|
||||
// color: const Color(0xFFD90B2E),
|
||||
// borderRadius: BorderRadius.circular(30.r)),
|
||||
// child: Center(
|
||||
// child: text14w400white("Leave the community")),
|
||||
// ),
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 200.w,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFD90B2E),
|
||||
borderRadius: BorderRadius.circular(30.r)),
|
||||
child: Center(
|
||||
child: text14w400white("Leave the community")),
|
||||
),
|
||||
sizedBoxHeight(50.h),
|
||||
])),
|
||||
DefaultTabController(
|
||||
@@ -750,7 +747,6 @@ class _PostsTabState extends State<PostsTab> {
|
||||
likeIcon: LikeIcon1(
|
||||
likeIcon: LikeIconClass1(
|
||||
id: e.likeIcon?.likeIcon?.id,
|
||||
// likeIcon?.id,
|
||||
image: e.likeIcon?.likeIcon?.image),
|
||||
likeIconsXid: e.likeIcon?.likeIconsXid,
|
||||
),
|
||||
@@ -857,7 +853,6 @@ class _PostsTabState extends State<PostsTab> {
|
||||
reactions: _reactions,
|
||||
selectedReactions: _selectedReactions,
|
||||
currentIndex: index,
|
||||
coachbool: true,
|
||||
),
|
||||
sizedBoxHeight(20.h)
|
||||
],
|
||||
|
||||
@@ -198,8 +198,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
}
|
||||
}
|
||||
|
||||
return myCommunityobj!.data!.isEmpty
|
||||
|
||||
return myCommunityobj!.data.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
},
|
||||
@@ -320,6 +319,8 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
// Container(
|
||||
// // width: 250.w,
|
||||
@@ -333,16 +334,44 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityName!
|
||||
.isEmpty
|
||||
? text18w700_FCFCFC('Regroup')
|
||||
: SizedBox(
|
||||
width: 200.w,
|
||||
child: text18w700_FCFCFC(
|
||||
? SizedBox(
|
||||
// width: double.infinity,
|
||||
child: Text(
|
||||
"Regroup",
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
maxLines:
|
||||
2, // Set the maximum number of lines
|
||||
overflow: TextOverflow
|
||||
.ellipsis, // Truncate the text with an ellipsis
|
||||
),
|
||||
)
|
||||
: Wrap(children: [
|
||||
SizedBox(
|
||||
// width: double.infinity,
|
||||
child: Text(
|
||||
joinnedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityName!),
|
||||
),
|
||||
.communityName!,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontFamily:
|
||||
"Nunito Sans",
|
||||
),
|
||||
maxLines:
|
||||
2, // Set the maximum number of lines
|
||||
overflow: TextOverflow
|
||||
.ellipsis, // Truncate the text with an ellipsis
|
||||
),
|
||||
),
|
||||
]),
|
||||
|
||||
// ),
|
||||
sizedBoxHeight(10.h),
|
||||
// sizedBoxHeight(10.h),
|
||||
joinnedComData.totalCommunityMember ==
|
||||
null ||
|
||||
joinnedComData
|
||||
@@ -535,7 +564,28 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () async {
|
||||
await leaveCommunity();
|
||||
utils.loader();
|
||||
Map<String, dynamic>
|
||||
updata = {};
|
||||
final data =
|
||||
await CommunityDetail()
|
||||
.postLeaveCommunity(
|
||||
updata,
|
||||
CommunityId);
|
||||
if (data.status ==
|
||||
ResponseStatus
|
||||
.SUCCESS) {
|
||||
setState(() {
|
||||
myCommunityobj!.data
|
||||
.removeAt(index);
|
||||
});
|
||||
return utils.showToast(
|
||||
data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(
|
||||
data.message);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
|
||||
Reference in New Issue
Block a user