minor bug fixing of null check
This commit is contained in:
@@ -123,6 +123,8 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
final data = await Onboard().PostIndividualActivity(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
controller.selectedIndices.clear();
|
||||
otheractivitycontroller.clear();
|
||||
print("Activities selected");
|
||||
// Get.toNamed(RouteName.individualgroupstep3);
|
||||
Get.toNamed(RouteName.findcommunitypage);
|
||||
@@ -147,7 +149,7 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
onPressed: () {
|
||||
if (controller.selectedIndices.isEmpty &&
|
||||
otheractivitycontroller.text.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
utils.showToast('Please select interests');
|
||||
} else {
|
||||
print(controller.selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
@@ -292,11 +294,12 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
text20400white(
|
||||
'What are your interests?'),
|
||||
// sizedBoxHeight(5.w),
|
||||
controller.isFirstSelectionActive.value
|
||||
? text13400A7A7A7(
|
||||
'Select your secondary interests')
|
||||
: text13400A7A7A7(
|
||||
'Select your primary interest'),
|
||||
Obx(() {
|
||||
return text13400A7A7A7(controller
|
||||
.isFirstSelectionActive.value
|
||||
? 'Select your secondary interests'
|
||||
: 'Select your primary interest');
|
||||
}),
|
||||
|
||||
// Container(
|
||||
// width: 154.w,
|
||||
|
||||
@@ -301,7 +301,7 @@ class _SelectIndividualGroupState extends State<SelectIndividualGroup> {
|
||||
onPressed: () {
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
if (_selectedIndices.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
utils.showToast('Please select group');
|
||||
} else {
|
||||
print(_selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
|
||||
@@ -65,13 +65,14 @@ class _SelectIndividualCommunityState extends State<SelectIndividualCommunity> {
|
||||
print('Payload: $updata');
|
||||
|
||||
final data = await Onboard().postCommunities(updata);
|
||||
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
// Get.back();
|
||||
print("groups selected");
|
||||
Get.back();
|
||||
// Get.toNamed(RouteName.communitycommitscreen);
|
||||
Get.toNamed(RouteName.individualgroupstep3);
|
||||
|
||||
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
@@ -305,7 +306,7 @@ class _SelectIndividualCommunityState extends State<SelectIndividualCommunity> {
|
||||
onPressed: () {
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
if (_selectedIndices.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
utils.showToast('Please select community');
|
||||
} else {
|
||||
print(_selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
@@ -389,8 +390,6 @@ a collection of groups, individuals and businesses that share common interests.
|
||||
// sizedBoxHeight(40.h)
|
||||
]))));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class CommunitySelect extends StatelessWidget {
|
||||
|
||||
@@ -152,6 +152,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
Get.back();
|
||||
mainWelcomeName = fullNameController.text;
|
||||
Get.toNamed(RouteName.individualactivitystep2);
|
||||
editProfileImage.profilePicPath.value = '';
|
||||
} else {
|
||||
Get.back();
|
||||
utils.showToast(data.message);
|
||||
@@ -424,15 +425,19 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
CustomButton(
|
||||
text: "Continue",
|
||||
onPressed: () {
|
||||
if (fullNameController.text.isBlank! ||
|
||||
userNameController.text.isBlank! ||
|
||||
datecontroller.text.isBlank! ||
|
||||
_selectedgendertype.isEmpty ||
|
||||
locationcontroller.text.isBlank! ||
|
||||
// imageFile.text.isBlank! ||
|
||||
editProfileImage.profilePicPath.value == '') {
|
||||
if (editProfileImage.profilePicPath.value == '') {
|
||||
utils
|
||||
.showToast('Please Upload Profile Picture');
|
||||
} else if (fullNameController.text.isBlank!) {
|
||||
utils.showToast('Please enter full name');
|
||||
} else if (userNameController.text.isBlank!) {
|
||||
utils.showToast('Please enter user name');
|
||||
} else if (datecontroller.text.isBlank!) {
|
||||
utils.showToast('Please select date of birth');
|
||||
} else if (_selectedgendertype.isEmpty) {
|
||||
utils.showToast('Please select gender');
|
||||
} else if (locationcontroller.text.isBlank!) {
|
||||
utils.showToast('Please enter location');
|
||||
} else {
|
||||
TellusUploadData();
|
||||
}
|
||||
|
||||
@@ -122,6 +122,8 @@ class UserLinkInCommunity {
|
||||
UserLinkInCommunity({
|
||||
required this.id,
|
||||
required this.iamPrincipalXid,
|
||||
required this.totalCommunityMember,
|
||||
required this.fourMemberImages,
|
||||
required this.manageCommunityXid,
|
||||
required this.joinedAt,
|
||||
required this.userTypeXid,
|
||||
@@ -131,6 +133,8 @@ class UserLinkInCommunity {
|
||||
|
||||
final int? id;
|
||||
final int? iamPrincipalXid;
|
||||
final int? totalCommunityMember;
|
||||
final List<FourMemberImage> fourMemberImages;
|
||||
final int? manageCommunityXid;
|
||||
final DateTime? joinedAt;
|
||||
final AccessType? userTypeXid;
|
||||
@@ -141,6 +145,8 @@ class UserLinkInCommunity {
|
||||
return UserLinkInCommunity(
|
||||
id: json["id"],
|
||||
iamPrincipalXid: json["iam_principal_xid"],
|
||||
totalCommunityMember: json["total_community_member"],
|
||||
fourMemberImages: json["four_member_images"] == null ? [] : List<FourMemberImage>.from(json["four_member_images"]!.map((x) => FourMemberImage.fromJson(x))),
|
||||
manageCommunityXid: json["manage_community_xid"],
|
||||
joinedAt: DateTime.tryParse(json["joined_at"] ?? ""),
|
||||
userTypeXid: json["user_type_xid"] == null ? null : AccessType.fromJson(json["user_type_xid"]),
|
||||
@@ -150,3 +156,54 @@ class UserLinkInCommunity {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class FourMemberImage {
|
||||
FourMemberImage({
|
||||
required this.iamPrincipalXid,
|
||||
required this.manageCommunityXid,
|
||||
required this.iamPrincipal,
|
||||
});
|
||||
|
||||
final int? iamPrincipalXid;
|
||||
final int? manageCommunityXid;
|
||||
final IamPrincipal? iamPrincipal;
|
||||
|
||||
factory FourMemberImage.fromJson(Map<String, dynamic> json){
|
||||
return FourMemberImage(
|
||||
iamPrincipalXid: json["iam_principal_xid"],
|
||||
manageCommunityXid: json["manage_community_xid"],
|
||||
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class IamPrincipal {
|
||||
IamPrincipal({
|
||||
required this.id,
|
||||
required this.principalTypeXid,
|
||||
required this.userName,
|
||||
required this.fullName,
|
||||
required this.profilePhoto,
|
||||
required this.isUserPinned,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? principalTypeXid;
|
||||
final String? userName;
|
||||
final String? fullName;
|
||||
final String? profilePhoto;
|
||||
final bool? isUserPinned;
|
||||
|
||||
factory IamPrincipal.fromJson(Map<String, dynamic> json){
|
||||
return IamPrincipal(
|
||||
id: json["id"],
|
||||
principalTypeXid: json["principal_type_xid"],
|
||||
userName: json["user_name"],
|
||||
fullName: json["full_name"],
|
||||
profilePhoto: json["profile_photo"],
|
||||
isUserPinned: json["is_user_pinned"],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -111,8 +111,9 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) {
|
||||
bool isMember =
|
||||
comdetailobj?.data?.userLinkInCommunity?.userTypeXid?.name == "Member";
|
||||
bool isMember = comdetailobj
|
||||
?.data?.userLinkInCommunity?.userTypeXid?.name ==
|
||||
"Member";
|
||||
// => <PopupMenuEntry>
|
||||
return <PopupMenuEntry<Object>>[
|
||||
PopupMenuItem(
|
||||
@@ -571,18 +572,58 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
child: Row(
|
||||
children: [
|
||||
sizedBoxWidth(16.w),
|
||||
stackContainers(
|
||||
number: "+2",
|
||||
containerImages: [
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
],
|
||||
stackContainersGroups(
|
||||
number:
|
||||
" +${comdetailobj!.data!.userLinkInCommunity!.totalCommunityMember! - 3}",
|
||||
// containerImages: joinnedComData
|
||||
// .fourMemberImages!
|
||||
// .map((photo) => photo
|
||||
// .iamPrincipal!.profilePhoto!)
|
||||
// .toList(),
|
||||
containerImages: comdetailobj!
|
||||
.data!
|
||||
.userLinkInCommunity!
|
||||
.fourMemberImages
|
||||
?.map((photo) => photo
|
||||
.iamPrincipal
|
||||
?.profilePhoto)
|
||||
.where((profilePhoto) =>
|
||||
profilePhoto !=
|
||||
null)
|
||||
.map((profilePhoto) =>
|
||||
profilePhoto!) // Cast from String? to String
|
||||
.toList() ??
|
||||
[],
|
||||
),
|
||||
sizedBoxWidth(90.w),
|
||||
text16w400_white(
|
||||
'7 members'),
|
||||
sizedBoxWidth(75.w),
|
||||
comdetailobj!
|
||||
.data!
|
||||
.userLinkInCommunity!
|
||||
.totalCommunityMember ==
|
||||
null ||
|
||||
comdetailobj!
|
||||
.data!
|
||||
.userLinkInCommunity!
|
||||
.totalCommunityMember
|
||||
.isBlank!
|
||||
? const SizedBox()
|
||||
: text16w400_FCFCFC_blur(
|
||||
'${comdetailobj!.data!.userLinkInCommunity!.totalCommunityMember} members',
|
||||
),
|
||||
|
||||
// stackContainers(
|
||||
// number: "+2",
|
||||
// containerImages: [
|
||||
// "assets/images/png/cimg3.png",
|
||||
// "assets/images/png/cimg2.png",
|
||||
// "assets/images/png/cimg3.png",
|
||||
// "assets/images/png/cimg2.png",
|
||||
// ],
|
||||
// ),
|
||||
// sizedBoxWidth(95.w),
|
||||
// text16w400_white(
|
||||
// '${comdetailobj!.data!.userLinkInCommunity!.totalCommunityMember} members'
|
||||
// ''),
|
||||
const Spacer(),
|
||||
Icon(
|
||||
Icons.arrow_forward,
|
||||
|
||||
@@ -99,7 +99,8 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
void refreshData() {
|
||||
setState(() {
|
||||
myfuture = MyCommunityAPI().getMyCommunity();
|
||||
});}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -114,6 +115,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
customBack: true,
|
||||
titleTxt: "My Communities",
|
||||
customActionWidget: Row(
|
||||
children: [
|
||||
@@ -125,7 +127,6 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
// CommunityDetail().getCommunityDetail(CommunityId);
|
||||
print("Updating community details...");
|
||||
// setState(() {});
|
||||
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
@@ -201,9 +202,34 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
}
|
||||
}
|
||||
|
||||
return myCommunityobj!.data!.isEmpty
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.requestscreen);
|
||||
},
|
||||
child:
|
||||
text16w700_FCFCFC_line("Request and Invites"))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
myCommunityobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
: _buildBody(context),
|
||||
]))
|
||||
]);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -229,28 +255,8 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
}
|
||||
|
||||
Widget _buildBody(context) {
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.requestscreen);
|
||||
},
|
||||
child: text16w700_FCFCFC_line("Request and Invites"))
|
||||
],
|
||||
),
|
||||
return Expanded(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
@@ -263,14 +269,14 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
padding: EdgeInsets.only(bottom: 25.h),
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
var result = await Get.toNamed(RouteName.communityDetails, arguments: {
|
||||
var result = await Get.toNamed(RouteName.communityDetails,
|
||||
arguments: {
|
||||
"CommunityID": joinnedComData.manageCommunityXid
|
||||
});
|
||||
|
||||
if (result != null && result) {
|
||||
refreshData();
|
||||
print("Updating community details...");
|
||||
|
||||
}
|
||||
},
|
||||
child: commonGlassUI(
|
||||
@@ -284,8 +290,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: 65.h,
|
||||
@@ -321,8 +326,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
)),
|
||||
sizedBoxWidth(13.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Container(
|
||||
// // width: 250.w,
|
||||
@@ -359,8 +363,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
sizedBoxHeight(10.h),
|
||||
joinnedComData.totalCommunityMember ==
|
||||
null ||
|
||||
joinnedComData
|
||||
.totalCommunityMember!
|
||||
joinnedComData.totalCommunityMember!
|
||||
.toString()
|
||||
.isEmpty
|
||||
? const SizedBox()
|
||||
@@ -375,8 +378,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
BorderRadius.circular(
|
||||
100.r),
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
@@ -421,32 +423,26 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
width: 57.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
50.r),
|
||||
gradient:
|
||||
const LinearGradient(
|
||||
begin:
|
||||
Alignment.centerLeft,
|
||||
end:
|
||||
Alignment.centerRight,
|
||||
BorderRadius.circular(50.r),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [
|
||||
Color.fromRGBO(255, 255,
|
||||
255, 0.06),
|
||||
Color.fromRGBO(255, 255,
|
||||
255, 0.08),
|
||||
Color.fromRGBO(
|
||||
255, 255, 255, 0.06),
|
||||
Color.fromRGBO(
|
||||
255, 255, 255, 0.08),
|
||||
],
|
||||
stops: [-0.0497, 1.0238],
|
||||
// converting degrees to radians
|
||||
),
|
||||
border: Border.all(
|
||||
color: const Color(
|
||||
0xFF434A53),
|
||||
color: const Color(0xFF434A53),
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: text10400white(
|
||||
"Owner")),
|
||||
child: text10400white("Owner")),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -455,10 +451,9 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor:
|
||||
const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(
|
||||
width: 200.w),
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints:
|
||||
BoxConstraints.tightFor(width: 200.w),
|
||||
offset: const Offset(0, 30),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
@@ -466,8 +461,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
<PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () async {
|
||||
Map<String, dynamic>
|
||||
updata = {
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_community_xid":
|
||||
joinnedComData
|
||||
.manageCommunityXid,
|
||||
@@ -477,29 +471,26 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
.postMuteNotification(
|
||||
updata);
|
||||
if (data.status ==
|
||||
ResponseStatus
|
||||
.SUCCESS) {
|
||||
ResponseStatus.SUCCESS) {
|
||||
print("success");
|
||||
setState(() {});
|
||||
await MyCommunityAPI()
|
||||
.getMyCommunity();
|
||||
bool isMuted =
|
||||
ismute == 1;
|
||||
bool isMuted = ismute == 1;
|
||||
isMuted = !isMuted;
|
||||
ismute = isMuted ? 1 : 0;
|
||||
|
||||
return utils.showToast(
|
||||
data.message);
|
||||
return utils
|
||||
.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
print("Failed");
|
||||
return utils.showToast(
|
||||
data.message);
|
||||
return utils
|
||||
.showToast(data.message);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w),
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -535,38 +526,29 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
.toString());
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
iscommunitypin == true
|
||||
? Text(
|
||||
'Unpin ',
|
||||
style:
|
||||
TextStyle(
|
||||
fontSize:
|
||||
16.sp,
|
||||
color: Colors
|
||||
.white,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w800,
|
||||
FontWeight.w800,
|
||||
fontFamily:
|
||||
"Nunito Sans",
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'Pin ',
|
||||
style:
|
||||
TextStyle(
|
||||
fontSize:
|
||||
16.sp,
|
||||
color: Colors
|
||||
.white,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w800,
|
||||
FontWeight.w800,
|
||||
fontFamily:
|
||||
"Nunito Sans",
|
||||
),
|
||||
@@ -591,8 +573,7 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
PopupMenuItem(
|
||||
onTap: () async {
|
||||
utils.loader();
|
||||
Map<String, dynamic>
|
||||
updata = {};
|
||||
Map<String, dynamic> updata = {};
|
||||
final data =
|
||||
await CommunityDetail()
|
||||
.postLeaveCommunity(
|
||||
@@ -601,23 +582,22 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
.manageCommunityXid,
|
||||
);
|
||||
if (data.status ==
|
||||
ResponseStatus
|
||||
.SUCCESS) {
|
||||
ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
setState(() {
|
||||
myCommunityobj!.data
|
||||
.removeAt(index);
|
||||
});
|
||||
return utils.showToast(
|
||||
data.message);
|
||||
return utils
|
||||
.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(
|
||||
data.message);
|
||||
return utils
|
||||
.showToast(data.message);
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w),
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -650,15 +630,24 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
stackContainersGroups(
|
||||
number:
|
||||
" +${joinnedComData.totalCommunityMember! - 3}",
|
||||
// containerImages: joinnedComData
|
||||
// .fourMemberImages!
|
||||
// .map((photo) => photo
|
||||
// .iamPrincipal!.profilePhoto!)
|
||||
// .toList(),
|
||||
containerImages: joinnedComData
|
||||
.fourMemberImages!
|
||||
.map((photo) => photo
|
||||
.iamPrincipal!.profilePhoto!)
|
||||
.toList(),
|
||||
.fourMemberImages
|
||||
?.map((photo) =>
|
||||
photo.iamPrincipal?.profilePhoto)
|
||||
.where((profilePhoto) =>
|
||||
profilePhoto != null)
|
||||
.map((profilePhoto) =>
|
||||
profilePhoto!) // Cast from String? to String
|
||||
.toList() ??
|
||||
[],
|
||||
),
|
||||
sizedBoxWidth(75.w),
|
||||
joinnedComData.totalCommunityMember ==
|
||||
null ||
|
||||
joinnedComData.totalCommunityMember == null ||
|
||||
joinnedComData
|
||||
.totalCommunityMember.isBlank!
|
||||
? const SizedBox()
|
||||
@@ -680,10 +669,9 @@ class _MyCommunityState extends State<MyCommunity> {
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
]);
|
||||
)
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget communityCard({
|
||||
|
||||
@@ -168,33 +168,39 @@ class _RequestedTabState extends State<RequestedTab> {
|
||||
Container(
|
||||
height: 65.h,
|
||||
width: 65.h,
|
||||
decoration:
|
||||
const BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
// color: Colors.amber,
|
||||
),
|
||||
child:
|
||||
// Center(
|
||||
// child: Image.asset(imagepath, fit: BoxFit.cover)),
|
||||
requestedComData.joinedAndRequestedCommunity!
|
||||
.communityProfilePhoto ==
|
||||
null ||
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity !=
|
||||
null &&
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityProfilePhoto !=
|
||||
null &&
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityProfilePhoto!
|
||||
.isEmpty
|
||||
? const CircleAvatar(
|
||||
.isNotEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityProfilePhoto!,
|
||||
),
|
||||
)
|
||||
: const CircleAvatar(
|
||||
backgroundImage:
|
||||
AssetImage(
|
||||
'assets/images/png/img45.png',
|
||||
),
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityProfilePhoto!),
|
||||
)),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(13.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
@@ -205,22 +211,28 @@ class _RequestedTabState extends State<RequestedTab> {
|
||||
// // color: Colors.red,
|
||||
// width: double.infinity,
|
||||
// child:
|
||||
requestedComData.joinedAndRequestedCommunity!
|
||||
.communityName ==
|
||||
null ||
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityName!
|
||||
.isEmpty
|
||||
? text18w700_FCFCFC(
|
||||
'Regroup')
|
||||
: SizedBox(
|
||||
|
||||
SizedBox(
|
||||
width: 200.w,
|
||||
child: text18w700_FCFCFC(
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity !=
|
||||
null &&
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityName!),
|
||||
.communityName !=
|
||||
null &&
|
||||
requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityName!
|
||||
.isNotEmpty
|
||||
? requestedComData
|
||||
.joinedAndRequestedCommunity!
|
||||
.communityName!
|
||||
: '',
|
||||
),
|
||||
),
|
||||
|
||||
// ),
|
||||
sizedBoxHeight(10.h),
|
||||
requestedComData.totalCommunityMember ==
|
||||
@@ -237,11 +249,17 @@ class _RequestedTabState extends State<RequestedTab> {
|
||||
number:
|
||||
" +${requestedComData.totalCommunityMember! - 3}",
|
||||
containerImages: requestedComData
|
||||
.fourMemberImages!
|
||||
.map((photo) => photo
|
||||
.iamPrincipal!
|
||||
.profilePhoto!)
|
||||
.toList(),
|
||||
.fourMemberImages
|
||||
?.map((photo) => photo
|
||||
.iamPrincipal
|
||||
?.profilePhoto)
|
||||
.where((profilePhoto) =>
|
||||
profilePhoto !=
|
||||
null)
|
||||
.map((profilePhoto) =>
|
||||
profilePhoto!) // Cast from String? to String
|
||||
.toList() ??
|
||||
[],
|
||||
),
|
||||
sizedBoxWidth(75.w),
|
||||
requestedComData.totalCommunityMember ==
|
||||
@@ -583,33 +601,39 @@ class _InvitedTabState extends State<InvitedTab> {
|
||||
Container(
|
||||
height: 65.h,
|
||||
width: 65.h,
|
||||
decoration:
|
||||
const BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
// color: Colors.amber,
|
||||
),
|
||||
child:
|
||||
// Center(
|
||||
// child: Image.asset(imagepath, fit: BoxFit.cover)),
|
||||
invitedComData.senderDetail!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
invitedComData
|
||||
.senderDetail !=
|
||||
null &&
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.profilePhoto !=
|
||||
null &&
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? const CircleAvatar(
|
||||
.isNotEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.profilePhoto!,
|
||||
),
|
||||
)
|
||||
: const CircleAvatar(
|
||||
backgroundImage:
|
||||
AssetImage(
|
||||
'assets/images/png/img45.png',
|
||||
),
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.profilePhoto!),
|
||||
)),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(13.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
@@ -619,24 +643,26 @@ class _InvitedTabState extends State<InvitedTab> {
|
||||
// width: 250.w,
|
||||
// color: Colors.red,
|
||||
// width: double.infinity,
|
||||
child: invitedComData
|
||||
.senderDetail!
|
||||
.fullName ==
|
||||
null ||
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.fullName!
|
||||
.isEmpty
|
||||
? text18w700_FCFCFC(
|
||||
'Regroup')
|
||||
: SizedBox(
|
||||
child: SizedBox(
|
||||
width: 200.w,
|
||||
child: text18w700_FCFCFC(
|
||||
invitedComData
|
||||
.senderDetail !=
|
||||
null &&
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.fullName!),
|
||||
),
|
||||
.fullName !=
|
||||
null &&
|
||||
invitedComData
|
||||
.senderDetail!
|
||||
.fullName!
|
||||
.isNotEmpty
|
||||
? invitedComData
|
||||
.senderDetail!
|
||||
.fullName!
|
||||
: '',
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(10.h),
|
||||
// invitedComData.totalCommunityMember ==
|
||||
// null ||
|
||||
@@ -658,8 +684,13 @@ class _InvitedTabState extends State<InvitedTab> {
|
||||
.community
|
||||
?.fourMemberImages
|
||||
.map((photo) => photo
|
||||
.iamPrincipal!
|
||||
.profilePhoto!)
|
||||
.iamPrincipal
|
||||
?.profilePhoto)
|
||||
.where((profilePhoto) =>
|
||||
profilePhoto !=
|
||||
null)
|
||||
.map((profilePhoto) =>
|
||||
profilePhoto!) // Cast from String? to String
|
||||
.toList() ??
|
||||
[],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user