conlficts resolvesd for guest user

This commit is contained in:
Shubhamshirva
2024-07-23 20:25:32 +05:30
parent 40ac2bef76
commit fc0a71d3c1
6 changed files with 611 additions and 533 deletions

View File

@@ -43,7 +43,7 @@ class Data {
Follows? follows;
List<Timelines>? timelines;
int? accountVisibility;
List<MyJoinedSubgroups>? myJoinedSubgroups;
List<MyJoinedGroups>? myJoinedGroups;
List<Certifications>? certifications;
int? daysBeforeJoined;
@@ -66,7 +66,7 @@ class Data {
this.follows,
this.timelines,
this.accountVisibility,
this.myJoinedSubgroups,
this.myJoinedGroups,
this.certifications,
this.daysBeforeJoined
});
@@ -100,10 +100,10 @@ class Data {
});
}
accountVisibility = json['account_visibility'];
if (json['my_joined_subgroups'] != null) {
myJoinedSubgroups = <MyJoinedSubgroups>[];
json['my_joined_subgroups'].forEach((v) {
myJoinedSubgroups!.add(new MyJoinedSubgroups.fromJson(v));
if (json['my_joined_groups'] != null) {
myJoinedGroups = <MyJoinedGroups>[];
json['my_joined_groups'].forEach((v) {
myJoinedGroups!.add(new MyJoinedGroups.fromJson(v));
});
}
if (json['certifications'] != null) {
@@ -140,9 +140,9 @@ class Data {
data['timelines'] = this.timelines!.map((v) => v.toJson()).toList();
}
data['account_visibility'] = this.accountVisibility;
if (this.myJoinedSubgroups != null) {
data['my_joined_subgroups'] =
this.myJoinedSubgroups!.map((v) => v.toJson()).toList();
if (this.myJoinedGroups != null) {
data['my_joined_groups'] =
this.myJoinedGroups!.map((v) => v.toJson()).toList();
}
if (this.certifications != null) {
data['certifications'] =
@@ -262,64 +262,6 @@ class Follows {
}
}
class MyJoinedSubgroups {
int? id;
int? iamPrincipalXid;
int? manageGroupXid;
int? manageSubGroupXid;
SubGroupData? subGroupData;
MyJoinedSubgroups(
{this.id,
this.iamPrincipalXid,
this.manageGroupXid,
this.manageSubGroupXid,
this.subGroupData});
MyJoinedSubgroups.fromJson(Map<String, dynamic> json) {
id = json['id'];
iamPrincipalXid = json['iam_principal_xid'];
manageGroupXid = json['manage_group_xid'];
manageSubGroupXid = json['manage_sub_group_xid'];
subGroupData = json['sub_group_data'] != null
? new SubGroupData.fromJson(json['sub_group_data'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['iam_principal_xid'] = this.iamPrincipalXid;
data['manage_group_xid'] = this.manageGroupXid;
data['manage_sub_group_xid'] = this.manageSubGroupXid;
if (this.subGroupData != null) {
data['sub_group_data'] = this.subGroupData!.toJson();
}
return data;
}
}
class SubGroupData {
int? id;
String? title;
String? subGroupImage;
SubGroupData({this.id, this.title, this.subGroupImage});
SubGroupData.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
subGroupImage = json['sub_group_image'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['sub_group_image'] = this.subGroupImage;
return data;
}
}
class Certifications {
int? id;
@@ -357,3 +299,55 @@ class Certifications {
return data;
}
}
class MyJoinedGroups {
int? id;
int? iamPrincipalXid;
int? manageGroupXid;
GroupData? groupData;
MyJoinedGroups(
{this.id, this.iamPrincipalXid, this.manageGroupXid, this.groupData});
MyJoinedGroups.fromJson(Map<String, dynamic> json) {
id = json['id'];
iamPrincipalXid = json['iam_principal_xid'];
manageGroupXid = json['manage_group_xid'];
groupData = json['group_data'] != null
? new GroupData.fromJson(json['group_data'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['iam_principal_xid'] = this.iamPrincipalXid;
data['manage_group_xid'] = this.manageGroupXid;
if (this.groupData != null) {
data['group_data'] = this.groupData!.toJson();
}
return data;
}
}
class GroupData {
int? id;
String? title;
String? groupImage;
GroupData({this.id, this.title, this.groupImage});
GroupData.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
groupImage = json['group_image'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['group_image'] = this.groupImage;
return data;
}
}

View File

@@ -584,6 +584,8 @@ class _ProfileTabState extends State<ProfileTab> {
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
InkWell(
onTap:
@@ -625,13 +627,16 @@ class _ProfileTabState extends State<ProfileTab> {
});
},
child:
SizedBox(
width: 20.w,
height: 20.h,
child: Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 14.h,
width: 14.w,
Padding(
padding: EdgeInsets.only(top: 4.h),
child: SizedBox(
width: 20.w,
height: 20.h,
child: Image.asset(
"assets/images/png/iconamoon_edit-thin.png",
height: 20.h,
width: 20.w,
),
),
),
)
@@ -974,7 +979,7 @@ class _ProfileTabState extends State<ProfileTab> {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
text18w700white("Subgroups"),
text18w700white("Groups"),
],
),
),
@@ -987,22 +992,22 @@ class _ProfileTabState extends State<ProfileTab> {
scrollDirection: Axis.horizontal,
padding: EdgeInsets.only(left: 16.w),
itemCount: getEditProfileIndi!
.data!.myJoinedSubgroups!.length,
.data!.myJoinedGroups!.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 20.w),
child: profilecardtile(
imagePath: getEditProfileIndi!
.data!
.myJoinedSubgroups![index]
.subGroupData!
.subGroupImage ??
.myJoinedGroups![index]
.groupData!
.groupImage ??
'',
// cardtile[index]["imagePath"],
title: getEditProfileIndi!
.data!
.myJoinedSubgroups![index]
.subGroupData!
.myJoinedGroups![index]
.groupData!
.title!
// cardtile[index]["title"]
@@ -1074,7 +1079,6 @@ class _ProfileTabState extends State<ProfileTab> {
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return ShimmerCommon();
}
if (snapshot.hasError) {

View File

@@ -44,7 +44,7 @@ class Data {
List<Timelines>? timelines;
int? accountVisibility;
List<MyJoinedGroups>? myJoinedGroups;
List<MyJoinedSubgroups>? myJoinedSubgroups;
// List<MyJoinedSubgroups>? myJoinedSubgroups;
List<Certifications>? certifications;
int? daysBeforeJoined;
@@ -66,7 +66,7 @@ class Data {
this.timelines,
this.accountVisibility,
this.myJoinedGroups,
this.myJoinedSubgroups,
// this.myJoinedSubgroups,
this.certifications,
this.daysBeforeJoined});
@@ -104,12 +104,12 @@ class Data {
myJoinedGroups!.add(new MyJoinedGroups.fromJson(v));
});
}
if (json['my_joined_subgroups'] != null) {
myJoinedSubgroups = <MyJoinedSubgroups>[];
json['my_joined_subgroups'].forEach((v) {
myJoinedSubgroups!.add(new MyJoinedSubgroups.fromJson(v));
});
}
// if (json['my_joined_subgroups'] != null) {
// myJoinedSubgroups = <MyJoinedSubgroups>[];
// json['my_joined_subgroups'].forEach((v) {
// myJoinedSubgroups!.add(new MyJoinedSubgroups.fromJson(v));
// });
// }
if (json['certifications'] != null) {
certifications = <Certifications>[];
json['certifications'].forEach((v) {
@@ -147,10 +147,10 @@ class Data {
data['my_joined_groups'] =
this.myJoinedGroups!.map((v) => v.toJson()).toList();
}
if (this.myJoinedSubgroups != null) {
data['my_joined_subgroups'] =
this.myJoinedSubgroups!.map((v) => v.toJson()).toList();
}
// if (this.myJoinedSubgroups != null) {
// data['my_joined_subgroups'] =
// this.myJoinedSubgroups!.map((v) => v.toJson()).toList();
// }
if (this.certifications != null) {
data['certifications'] =
this.certifications!.map((v) => v.toJson()).toList();

View File

@@ -275,37 +275,37 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
],
),
),
sizedBoxWidth(20.w),
Container(
height: 58.h,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.white,
width: 1.0,
),
boxShadow: const [
BoxShadow(
color: Color(0x66000000),
offset: Offset(0, 4),
blurRadius: 4.0,
),
],
),
),
sizedBoxWidth(20.w),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.clubs);
},
child: Column(
children: [
text16400white("10"),
sizedBoxHeight(6.h),
text12400whiteblur("Clubs")
],
),
),
// sizedBoxWidth(20.w),
// Container(
// height: 58.h,
// decoration: BoxDecoration(
// color: Colors.white,
// border: Border.all(
// color: Colors.white,
// width: 1.0,
// ),
// boxShadow: const [
// BoxShadow(
// color: Color(0x66000000),
// offset: Offset(0, 4),
// blurRadius: 4.0,
// ),
// ],
// ),
// ),
// sizedBoxWidth(20.w),
// GestureDetector(
// onTap: () {
// Get.toNamed(RouteName.clubs);
// },
// child: Column(
// children: [
// text16400white("10"),
// sizedBoxHeight(6.h),
// text12400whiteblur("Clubs")
// ],
// ),
// ),
],
),
sizedBoxHeight(20.h),
@@ -601,16 +601,16 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
),
),
sizedBoxHeight(30.h),
text18w400white("Subgroups"),
text18w400white("Groups"),
]),
),
sizedBoxHeight(20.h),
guestGetProfileInd!.data!.myJoinedSubgroups!.isEmpty
guestGetProfileInd!.data!.myJoinedGroups!.isEmpty
? Padding(
padding: EdgeInsets.symmetric(vertical: 30.h),
child: Center(
child: text18w700white(
"No Subgroups Found")),
"No groups Found")),
)
: SizedBox(
height: 190.h,
@@ -619,17 +619,17 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
scrollDirection: Axis.horizontal,
padding: EdgeInsets.only(left: 16.w),
itemCount: guestGetProfileInd!
.data!.myJoinedSubgroups!.length,
.data!.myJoinedGroups!.length,
itemBuilder: (context, index) {
var subGroupData = guestGetProfileInd!
.data!
.myJoinedSubgroups![index]
.subGroupData!;
.myJoinedGroups![index]
.groupData!;
return Padding(
padding: EdgeInsets.only(right: 20.w),
child: profilecardtile(
imagePath: subGroupData
.subGroupImage ??
.groupImage ??
cardtile[index]["imagePath"],
title: subGroupData.title ??
cardtile[index]["title"]),
@@ -1307,7 +1307,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
Widget profilecardtile({required String imagePath, required String title}) {
return Column(
children: [
guestGetProfileInd!.data!.myJoinedSubgroups!.isNotEmpty
guestGetProfileInd!.data!.myJoinedGroups!.isNotEmpty
? Container(
width: 100.w,
height: 109.h,

View File

@@ -32,7 +32,7 @@ class _MyNetworkState extends State<MyNetwork> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
child: Scaffold(
// key: _scaffoldKey1,
resizeToAvoidBottomInset: false,
@@ -238,188 +238,221 @@ class _FollowersTabState extends State<FollowersTab> {
return commonDivider();
},
itemBuilder: (context, index) {
return Column(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
followersobj!.data![index].follower!
.profilePhoto ==
null ||
followersobj!
.data![index]
.follower!
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: const AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
: CircleAvatar(
backgroundImage: NetworkImage(
followersobj!
.data![index]
.follower!
.profilePhoto!),
radius: 25.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
followersobj!.data![index].follower!
.fullName ==
null ||
followersobj!
.data![index]
.follower!
.fullName!
.isEmpty ==
true
? text16w400_FCFCFC("Regroup")
: text16w400_FCFCFC(
followersobj!.data![index]
.follower!.fullName!),
sizedBoxHeight(4.h),
followersobj!.data![index].follower!
.userName ==
null ||
followersobj!
.data![index]
.follower!
.userName!
.isEmpty ==
true
? text12w400_FCFCFC_blur(
"regroup")
: text12w400_FCFCFC_blur(
followersobj!.data![index]
.follower!.userName!)
],
),
const Spacer(),
PopupMenuButton(
surfaceTintColor: const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: const Offset(0, 20),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext
context) =>
<PopupMenuEntry>[
PopupMenuItem(
// onTap: () {},
onTap: () async {
setState(() {
removeid = followersobj!
.data![index]
.follower!
.id ??
0;
followersobj!.data!
.removeWhere((item) =>
item.follower!
.id ==
removeid);
RemoveUploadata();
});
},
child: Padding(
padding:
EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Remove user"),
const Spacer(),
Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
height: 15.h,
width: 15.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Message user"),
const Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-regular.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () async {
setState(() {
blockid = followersobj!
.data![index]
.follower!
.id ??
0;
followersobj!.data!
.removeWhere((item) =>
item.follower!
.id ==
blockid);
BlockUploadata();
});
},
child: Padding(
padding:
EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Block user"),
const Spacer(),
Image.asset(
"assets/images/png/blockchat.png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Container(
height: 20,
width: 20,
child: Center(
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 22.h,
width: 4.w,
return GestureDetector(
onTap: () {
followersobj!.data![index].follower!
.principleTypeXid ==
1
? Get.toNamed(
RouteName.profiletabindguest,
arguments: {
"FolloweridIndex": followersobj!
.data![index]
.iamPrincipalXid!,
})
: Get.toNamed(
RouteName.profiletabbusguest,
arguments: {
"FolloweridIndex": followersobj!
.data![index]
.iamPrincipalXid!,
});
},
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
followersobj!.data![index].follower!
.profilePhoto ==
null ||
followersobj!
.data![index]
.follower!
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: const AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
: CircleAvatar(
backgroundImage: NetworkImage(
followersobj!
.data![index]
.follower!
.profilePhoto!),
radius: 25.r,
),
),
)),
],
),
)
],
sizedBoxWidth(10.w),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
followersobj!
.data![index]
.follower!
.fullName ==
null ||
followersobj!
.data![index]
.follower!
.fullName!
.isEmpty ==
true
? text16w400_FCFCFC("Regroup")
: text16w400_FCFCFC(
followersobj!.data![index]
.follower!.fullName!),
sizedBoxHeight(4.h),
followersobj!
.data![index]
.follower!
.userName ==
null ||
followersobj!
.data![index]
.follower!
.userName!
.isEmpty ==
true
? text12w400_FCFCFC_blur(
"regroup")
: text12w400_FCFCFC_blur(
followersobj!.data![index]
.follower!.userName!)
],
),
const Spacer(),
PopupMenuButton(
surfaceTintColor:
const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: const Offset(0, 20),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder:
(BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
// onTap: () {},
onTap: () async {
setState(() {
removeid = followersobj!
.data![
index]
.follower!
.id ??
0;
followersobj!
.data!
.removeWhere((item) =>
item.follower!
.id ==
removeid);
RemoveUploadata();
});
},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Remove user"),
const Spacer(),
Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
height: 15.h,
width: 15.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Message user"),
const Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-regular.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () async {
setState(() {
blockid = followersobj!
.data![
index]
.follower!
.id ??
0;
followersobj!
.data!
.removeWhere((item) =>
item.follower!
.id ==
blockid);
BlockUploadata();
});
},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Block user"),
const Spacer(),
Image.asset(
"assets/images/png/blockchat.png",
height: 25.h,
width: 25.w,
)
],
),
),
),
],
child: Container(
height: 20,
width: 20,
child: Center(
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 22.h,
width: 4.w,
),
),
)),
],
),
)
],
),
);
},
);
@@ -537,231 +570,278 @@ class _FollowingTabState extends State<FollowingTab> {
@override
Widget build(BuildContext context) {
return ListView(
physics: const ScrollPhysics(),
scrollDirection: Axis.vertical,
children: [
Column(
physics: const ScrollPhysics(),
scrollDirection: Axis.vertical,
children: [
sizedBoxHeight(25.h),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: CustomTextFormField(
leadingIcon: SizedBox(
height: 23,
width: 23,
child: Center(
child: Image.asset(
"assets/images/png/ion_search-outline.png",
Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: CustomTextFormField(
leadingIcon: SizedBox(
height: 23,
width: 23,
child: Center(
child: Image.asset(
"assets/images/png/ion_search-outline.png",
height: 23,
width: 23,
),
),
),
hintText: "Search people",
texttype: TextInputType.text,
inputFormatters: [
// LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter(),
],
onInput: (value) {
// Onboard().postGroupsearch({"search": value},
// streamController: searchcontroller);
// searchGroups(value!);
Profilegetmethod().getFollowing(value,
streamController: searchcontroller);
return null;
},
),
),
hintText: "Search people",
texttype: TextInputType.text,
inputFormatters: [
// LengthLimitingTextInputFormatter(20),
RemoveEmojiInputFormatter(),
],
onInput: (value) {
// Onboard().postGroupsearch({"search": value},
// streamController: searchcontroller);
// searchGroups(value!);
Profilegetmethod()
.getFollowing(value, streamController: searchcontroller);
return null;
},
),
),
sizedBoxHeight(20.h),
StreamBuilder<FollowingModel>(
stream: searchcontroller.stream,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
// Display shimmer effect while waiting for data
return const Expanded(
child: Center(child: CircularProgressIndicator()));
} else if (snapshot.hasError) {
// Handle error state
return Center(
child: Text(
'${snapshot.error} occurred',
style: const TextStyle(fontSize: 18),
),
);
} else {
// Data has been loaded, show actual UI
return followingobj!.data!.isEmpty
? _buildNoDataBody(context)
: ListView.separated(
physics: const ScrollPhysics(),
shrinkWrap: true,
itemCount: followingobj!.data!.length,
separatorBuilder: (BuildContext context, int index) {
return commonDivider();
},
itemBuilder: (context, index) {
return
// Column(
// children: [
// Followinglist(
// imagePath: followingobj?.data?[index]
// .following?.profilePhoto ??
// '',
// title: followingobj!
// .data?[index].following?.fullName ??
// '',
// subtitle: followingobj!
// .data?[index].following?.userName ??
// '',
// unfollowontap: (id) => Uploadata(id),
// unfollowindex: followingobj!
// .data![index].following!.id!,
// ),
// if (index != followingobj!.data!.length - 1)
// commonDivider(),
// ],
// );
Column(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 16.w),
child: Row(
sizedBoxHeight(20.h),
StreamBuilder<FollowingModel>(
stream: searchcontroller.stream,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
// Display shimmer effect while waiting for data
return const Expanded(
child: Center(child: CircularProgressIndicator()));
} else if (snapshot.hasError) {
// Handle error state
return Center(
child: Text(
'${snapshot.error} occurred',
style: const TextStyle(fontSize: 18),
),
);
} else {
// Data has been loaded, show actual UI
return followingobj!.data!.isEmpty
? _buildNoDataBody(context)
: ListView.separated(
physics: const ScrollPhysics(),
shrinkWrap: true,
itemCount: followingobj!.data!.length,
separatorBuilder:
(BuildContext context, int index) {
return commonDivider();
},
itemBuilder: (context, index) {
return
// Column(
// children: [
// Followinglist(
// imagePath: followingobj?.data?[index]
// .following?.profilePhoto ??
// '',
// title: followingobj!
// .data?[index].following?.fullName ??
// '',
// subtitle: followingobj!
// .data?[index].following?.userName ??
// '',
// unfollowontap: (id) => Uploadata(id),
// unfollowindex: followingobj!
// .data![index].following!.id!,
// ),
// if (index != followingobj!.data!.length - 1)
// commonDivider(),
// ],
// );
GestureDetector(
onTap: () {
followingobj!.data![index].following!
.principleTypeXid ==
1
? Get.toNamed(
RouteName.profiletabindguest,
arguments: {
"FollowingidIndex": followingobj!
.data![index]
.followingIamPrincipalXid!,
})
: Get.toNamed(
RouteName.profiletabbusguest,
arguments: {
"FollowingidIndex": followingobj!
.data![index]
.followingIamPrincipalXid!,
});
},
child: Column(
children: [
followingobj!.data![index].following!
.profilePhoto ==
null ||
followingobj!.data![index].following!
.profilePhoto!.isEmpty
? CircleAvatar(
backgroundImage: const AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
: CircleAvatar(
backgroundImage: NetworkImage(
followingobj!.data![index]
.following!.profilePhoto!),
radius: 25.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
followingobj!.data![index].following!
.fullName ==
null ||
followingobj!.data![index]
.following!.fullName!.isEmpty
? text16w400_FCFCFC("Regroup")
: text16w400_FCFCFC(followingobj!
.data![index]
.following!
.fullName!),
sizedBoxHeight(4.h),
followingobj!.data![index].following!
.userName ==
null ||
followingobj!.data![index]
.following!.userName!.isEmpty
? text12w400_FCFCFC_blur("regroup")
: text12w400_FCFCFC_blur(followingobj!
.data![index]
.following!
.userName!)
],
),
const Spacer(),
PopupMenuButton(
surfaceTintColor: const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(width: 176.w),
offset: const Offset(0, 20),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () async {
setState(() {
unfollowid = followingobj!
.data![index]
.following!
.id ??
0;
// followingobj!.data!.removeAt(index);
followingobj!.data!
.removeWhere((item) =>
item.following!.id ==
unfollowid);
Uploadata();
});
},
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Unfollow user"),
const Spacer(),
Image.asset(
"assets/images/png/Black1323e.png",
height: 20.h,
width: 20.w,
)
],
),
Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
followingobj!.data![index].following!
.profilePhoto ==
null ||
followingobj!
.data![index]
.following!
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: const AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
: CircleAvatar(
backgroundImage: NetworkImage(
followingobj!
.data![index]
.following!
.profilePhoto!),
radius: 25.r,
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Message user"),
const Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-22.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
followingobj!
.data![index]
.following!
.fullName ==
null ||
followingobj!
.data![index]
.following!
.fullName!
.isEmpty
? text16w400_FCFCFC("Regroup")
: text16w400_FCFCFC(
followingobj!
.data![index]
.following!
.fullName!),
sizedBoxHeight(4.h),
followingobj!
.data![index]
.following!
.userName ==
null ||
followingobj!
.data![index]
.following!
.userName!
.isEmpty
? text12w400_FCFCFC_blur(
"regroup")
: text12w400_FCFCFC_blur(
followingobj!.data![index]
.following!.userName!)
],
child: Container(
height: 20,
width: 20,
child: Center(
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 22.h,
width: 4.w,
),
),
)),
const Spacer(),
PopupMenuButton(
surfaceTintColor:
const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: const Offset(0, 20),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder:
(BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () async {
setState(() {
unfollowid = followingobj!
.data![
index]
.following!
.id ??
0;
// followingobj!.data!.removeAt(index);
followingobj!
.data!
.removeWhere((item) =>
item.following!
.id ==
unfollowid);
Uploadata();
});
},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Unfollow user"),
const Spacer(),
Image.asset(
"assets/images/png/Black1323e.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Message user"),
const Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-22.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
],
child: Container(
height: 20,
width: 20,
child: Center(
child: Image.asset(
"assets/images/png/Group 1000004071.png",
height: 22.h,
width: 4.w,
),
),
)),
],
),
),
],
),
),
],
);
},
);
},
);
}
},
}
},
),
],
),
],
),
]
);
]);
}
Widget _buildNoDataBody(context) {