overflow changes and leave community api completed

This commit is contained in:
jayesh
2024-08-22 18:59:09 +05:30
parent c07af14fed
commit e84bd1b5da
4 changed files with 567 additions and 509 deletions

View File

@@ -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,

File diff suppressed because it is too large Load Diff

View File

@@ -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';
@@ -94,7 +91,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: "",
@@ -604,15 +601,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(
@@ -736,7 +733,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,
),
@@ -843,7 +839,6 @@ class _PostsTabState extends State<PostsTab> {
reactions: _reactions,
selectedReactions: _selectedReactions,
currentIndex: index,
coachbool: true,
),
sizedBoxHeight(20.h)
],

View File

@@ -186,8 +186,7 @@ class _MyCommunityState extends State<MyCommunity> {
}
}
return myCommunityobj!.data!.isEmpty
return myCommunityobj!.data.isEmpty
? _buildNoDataBody(context)
: _buildBody(context);
},
@@ -302,6 +301,8 @@ class _MyCommunityState extends State<MyCommunity> {
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
// Container(
// // width: 250.w,
@@ -315,16 +316,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
@@ -517,7 +546,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: