Merge pull request #56 from WDI-Ideas/Development

guest user individual api intrgration done.
This commit is contained in:
priyankahadpad
2024-07-19 20:33:28 +05:30
committed by GitHub
15 changed files with 4400 additions and 2681 deletions

View File

@@ -76,6 +76,15 @@ class ApiUrls {
static const posteditprofilebusiness = "${baseUrl}update-business-profile";
static const geteditprofilebusiness = "${baseUrl}fetch-business-profile";
//Guest
static const getGuestProfileInd = "${baseUrl}get-guest-view-of-individual-user-profile";
static const getGuestProfileBus = "${baseUrl}get-guest-view-of-business-user-profile";
static const getGuestfollowers = "${baseUrl}get-guest-user-followers";
static const getGuestfollowing = "${baseUrl}get-guest-user-following";
}

View File

@@ -1,6 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@@ -9,7 +7,6 @@ import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/controller/MainScreen.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.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';
@@ -111,9 +108,7 @@ class _ProfileTabState extends State<ProfileTab> {
accountTypeValue = prefs.getString('accountTypeValue');
accounTypeLogin = prefs.getString('accountTypefromLogin');
if (getEditProfileIndi != null &&
getEditProfileIndi!.data != null &&
getEditProfileIndi!.data!.interest != null) {
if (getEditProfileIndi!.data!.interest != null) {
// Join all interest names with a comma separator
interestText =
getEditProfileIndi!.data!.interest!.map((e) => e.name).join(', ');

View File

@@ -5,6 +5,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowers.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Model/followersModel.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
@@ -13,6 +15,7 @@ import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class Followers extends StatefulWidget {
@@ -24,6 +27,9 @@ class Followers extends StatefulWidget {
class _FollowersState extends State<Followers> {
StreamController<FollowersModel> searchcontroller = StreamController();
StreamController<GetGuestFollowers> guestsearchcontroller =
StreamController();
var guestUserid = Get.arguments['UpdataGuestIdfollowers'] ?? '';
@override
void initState() {
@@ -31,6 +37,11 @@ class _FollowersState extends State<Followers> {
var updata = "";
Profilegetmethod().getFollowers(updata, streamController: searchcontroller);
var guestupdata = "";
GuestProfileApi().getGuestfollowers(guestUserid, guestupdata,
streamController: guestsearchcontroller);
super.initState();
}
@@ -116,15 +127,15 @@ class _FollowersState extends State<Followers> {
RemoveEmojiInputFormatter(),
],
onInput: (value) {
Profilegetmethod().getFollowers(value,
streamController: searchcontroller);
GuestProfileApi().getGuestfollowers(guestUserid, value,
streamController: guestsearchcontroller);
},
hintText: "Search people",
),
),
sizedBoxHeight(25.h),
StreamBuilder<FollowersModel>(
stream: searchcontroller.stream,
StreamBuilder<GetGuestFollowers>(
stream: guestsearchcontroller.stream,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
// Display shimmer effect while waiting for data
@@ -139,231 +150,226 @@ class _FollowersState extends State<Followers> {
);
} else {
// Data has been loaded, show actual UI
return followersobj!.data!.isEmpty
return getguestfollowersobj!.data!.isEmpty
? _buildNoDataBody(context)
:
// ListView.builder(
// shrinkWrap: true,
// itemCount: followersobj!.data!.length,
// itemBuilder: (context, index) {
// return Column(
// children: [
// followerWidget(
// imagePath: followersobj?.data?[index]
// .follower?.profilePhoto ??
// "",
// // followersData[index]["imagePath"],
// title: followersobj?.data?[index].follower
// ?.fullName ??
// "",
// // followersData[index]["title"],
// subtitle: followersobj?.data?[index]
// .follower?.userName ??
// "",
// blockonTap: () {
// BlockUploadata(followersobj!
// .data![index].follower!.id);
// }
// // followersData[index]["subtitle"]
// ),
// if (index != followersobj!.data!.length - 1)
// commonDivider(),
// ],
// );
// },
// );
ListView.separated(
: ListView.separated(
physics: ScrollPhysics(),
shrinkWrap: true,
itemCount: followersobj!.data!.length,
itemCount: getguestfollowersobj!.data!.length,
separatorBuilder:
(BuildContext context, int index) {
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: 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!)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: Offset(0, 20),
color: 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"),
Spacer(),
Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Message user"),
Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-regular.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
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"),
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: () {
Get.toNamed(RouteName.profiletabindguest,
arguments: {
"FolloweridIndex": getguestfollowersobj!
.data![index].iamPrincipalXid,
});
},
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
getguestfollowersobj!
.data![index]
.follower!
.profilePhoto ==
null ||
getguestfollowersobj!
.data![index]
.follower!
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
: CircleAvatar(
backgroundImage: NetworkImage(
getguestfollowersobj!
.data![index]
.follower!
.profilePhoto!),
radius: 25.r,
),
),
)),
],
),
)
],
sizedBoxWidth(10.w),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
getguestfollowersobj!
.data![index]
.follower!
.fullName ==
null ||
getguestfollowersobj!
.data![index]
.follower!
.fullName!
.isEmpty ==
true
? text16w400_FCFCFC("Regroup")
: text16w400_FCFCFC(
getguestfollowersobj!
.data![index]
.follower!
.fullName!),
sizedBoxHeight(4.h),
getguestfollowersobj!
.data![index]
.follower!
.userName ==
null ||
getguestfollowersobj!
.data![index]
.follower!
.userName!
.isEmpty ==
true
? text12w400_FCFCFC_blur(
"regroup")
: text12w400_FCFCFC_blur(
getguestfollowersobj!
.data![index]
.follower!
.userName!)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor:
Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: Offset(0, 20),
color: Color(0xFF222935),
tooltip: "",
itemBuilder:
(BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
// onTap: () {},
onTap: () async {
setState(() {
removeid = getguestfollowersobj!
.data![
index]
.follower!
.id ??
0;
getguestfollowersobj!
.data!
.removeWhere((item) =>
item.follower!
.id ==
removeid);
RemoveUploadata();
});
},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Remove user"),
Spacer(),
Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
height: 15.h,
width: 15.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Message user"),
Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-regular.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () async {
setState(() {
blockid = getguestfollowersobj!
.data![
index]
.follower!
.id ??
0;
getguestfollowersobj!
.data!
.removeWhere((item) =>
item.follower!
.id ==
blockid);
BlockUploadata();
});
},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Block user"),
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,
),
),
)),
],
),
)
],
),
);
},
);
@@ -373,13 +379,298 @@ class _FollowersState extends State<Followers> {
])
]))
]));
// Stack(children: [
// Container(
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage("assets/images/png/Ellipse 1496.png"),
// fit: BoxFit.fill)),
// ),
// SingleChildScrollView(
// child: Column(children: [
// Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// Padding(
// padding: EdgeInsets.symmetric(horizontal: 16.w),
// child: CustomTextFormField(
// leadingIcon: SizedBox(
// height: 23,
// width: 23,
// child: Center(
// child: Image.asset(
// "assets/images/png/ion_search-outline.png",
// height: 23,
// width: 23,
// ),
// ),
// ),
// texttype: TextInputType.text,
// inputFormatters: [
// RemoveEmojiInputFormatter(),
// ],
// onInput: (value) {
// Profilegetmethod().getFollowers(value,
// streamController: searchcontroller);
// },
// hintText: "Search people",
// ),
// ),
// sizedBoxHeight(25.h),
// StreamBuilder<FollowersModel>(
// stream: searchcontroller.stream,
// builder: (ctx, snapshot) {
// if (snapshot.connectionState == ConnectionState.waiting) {
// // Display shimmer effect while waiting for data
// return Center(child: CircularProgressIndicator());
// } else if (snapshot.hasError) {
// // Handle error state
// return Center(
// child: Text(
// '${snapshot.error} occurred',
// style: TextStyle(fontSize: 18),
// ),
// );
// } else {
// // Data has been loaded, show actual UI
// return followersobj!.data!.isEmpty
// ? _buildNoDataBody(context)
// :
// // ListView.builder(
// // shrinkWrap: true,
// // itemCount: followersobj!.data!.length,
// // itemBuilder: (context, index) {
// // return Column(
// // children: [
// // followerWidget(
// // imagePath: followersobj?.data?[index]
// // .follower?.profilePhoto ??
// // "",
// // // followersData[index]["imagePath"],
// // title: followersobj?.data?[index].follower
// // ?.fullName ??
// // "",
// // // followersData[index]["title"],
// // subtitle: followersobj?.data?[index]
// // .follower?.userName ??
// // "",
// // blockonTap: () {
// // BlockUploadata(followersobj!
// // .data![index].follower!.id);
// // }
// // // followersData[index]["subtitle"]
// // ),
// // if (index != followersobj!.data!.length - 1)
// // commonDivider(),
// // ],
// // );
// // },
// // );
// ListView.separated(
// physics: ScrollPhysics(),
// shrinkWrap: true,
// itemCount: followersobj!.data!.length,
// separatorBuilder:
// (BuildContext context, int index) {
// 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: 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!)
// ],
// ),
// Spacer(),
// PopupMenuButton(
// surfaceTintColor: Color(0xFF222935),
// constraints:
// BoxConstraints.tightFor(
// width: 176.w),
// offset: Offset(0, 20),
// color: 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"),
// Spacer(),
// Image.asset(
// "assets/images/png/fluent_delete-28-regular.png",
// height: 15.h,
// width: 15.w,
// )
// ],
// ),
// ),
// ),
// PopupMenuDivider(),
// PopupMenuItem(
// onTap: () {},
// child: Padding(
// padding:
// EdgeInsets.symmetric(
// horizontal: 12.w),
// child: Row(
// children: [
// text14400white(
// "Message user"),
// Spacer(),
// Image.asset(
// "assets/images/png/fluent_chat-20-regular.png",
// height: 20.h,
// width: 20.w,
// )
// ],
// ),
// ),
// ),
// 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"),
// 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,
// ),
// ),
// )),
// ],
// ),
// )
// ],
// );
// },
// );
// }
// },
// ),
// ])
// ]))
// ]));
}
Widget _buildNoDataBody(context) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"No Data Found",

View File

@@ -5,6 +5,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowers.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowing.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Model/followingModel.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
@@ -13,6 +16,7 @@ import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
class Following extends StatefulWidget {
@@ -24,13 +28,21 @@ class Following extends StatefulWidget {
class _FollowingState extends State<Following> {
StreamController<FollowingModel> searchcontroller = StreamController();
StreamController<GetGuestFollowing> guestsearchcontroller =
StreamController();
var guestUserid = Get.arguments['UpdataGuestIdfollowing'] ?? '';
@override
void initState() {
// TODO: implement initState
var updata = "";
Profilegetmethod().getFollowing(updata, streamController: searchcontroller);
var guestupdata = "";
GuestProfileApi().getGuestfollowing(guestUserid, guestupdata,
streamController: guestsearchcontroller);
super.initState();
}
@@ -66,14 +78,15 @@ class _FollowingState extends State<Following> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "Following",
),
body: Stack(children: [
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "Following",
),
body: Stack(
children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
@@ -104,17 +117,14 @@ class _FollowingState extends State<Following> {
RemoveEmojiInputFormatter(),
],
onInput: (value) {
// Onboard().postGroupsearch({"search": value},
// streamController: searchcontroller);
// searchGroups(value!);
Profilegetmethod().getFollowing(value,
streamController: searchcontroller);
GuestProfileApi().getGuestfollowing(guestUserid, value,
streamController: guestsearchcontroller);
},
),
),
sizedBoxHeight(25.h),
StreamBuilder<FollowingModel>(
stream: searchcontroller.stream,
StreamBuilder<GetGuestFollowing>(
stream: guestsearchcontroller.stream,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
// Display shimmer effect while waiting for data
@@ -129,189 +139,187 @@ class _FollowingState extends State<Following> {
);
} else {
// Data has been loaded, show actual UI
return followingobj!.data!.isEmpty
return getguestfollowingobj!.data!.isEmpty
? _buildNoDataBody(context)
: ListView.separated(
physics: ScrollPhysics(),
shrinkWrap: true,
itemCount: followingobj!.data!.length,
itemCount: getguestfollowingobj!.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(
children: [
followingobj!.data![index].following!
.profilePhoto ==
null ||
followingobj!
.data![index]
.following!
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: 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!)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: Offset(0, 20),
color: 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"),
Spacer(),
Image.asset(
"assets/images/png/Black1323e.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding:
EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
text14400white(
"Message user"),
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,
return GestureDetector(
onTap: () {
Get.toNamed(RouteName.profiletabindguest,
arguments: {
"FollowingidIndex":
getguestfollowingobj!.data![index]
.followingIamPrincipalXid!,
});
},
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 16.w),
child: Row(
children: [
getguestfollowingobj!
.data![index]
.following!
.profilePhoto ==
null ||
getguestfollowingobj!
.data![index]
.following!
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
: CircleAvatar(
backgroundImage: NetworkImage(
getguestfollowingobj!
.data![index]
.following!
.profilePhoto!),
radius: 25.r,
),
),
)),
],
sizedBoxWidth(10.w),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
getguestfollowingobj!
.data![index]
.following!
.fullName ==
null ||
getguestfollowingobj!
.data![index]
.following!
.fullName!
.isEmpty
? text16w400_FCFCFC("Regroup")
: text16w400_FCFCFC(
getguestfollowingobj!
.data![index]
.following!
.fullName!),
sizedBoxHeight(4.h),
getguestfollowingobj!
.data![index]
.following!
.userName ==
null ||
getguestfollowingobj!
.data![index]
.following!
.userName!
.isEmpty
? text12w400_FCFCFC_blur(
"regroup")
: text12w400_FCFCFC_blur(
getguestfollowingobj!
.data![index]
.following!
.userName!)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor:
Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: Offset(0, 20),
color: Color(0xFF222935),
tooltip: "",
itemBuilder:
(BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () async {
setState(() {
unfollowid = getguestfollowingobj!
.data![
index]
.following!
.id ??
0;
// followingobj!.data!.removeAt(index);
getguestfollowingobj!
.data!
.removeWhere((item) =>
item.following!
.id ==
unfollowid);
Uploadata();
});
},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Unfollow user"),
Spacer(),
Image.asset(
"assets/images/png/Black1323e.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets
.symmetric(
horizontal:
12.w),
child: Row(
children: [
text14400white(
"Message user"),
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,
),
),
)),
],
),
),
),
],
],
),
);
},
);
@@ -320,7 +328,260 @@ class _FollowingState extends State<Following> {
),
])
]))
]));
],
),
// Stack(
// children: [
// Container(
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage("assets/images/png/Ellipse 1496.png"),
// fit: BoxFit.fill)),
// ),
// SingleChildScrollView(
// child: Column(children: [
// Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
// Padding(
// padding: EdgeInsets.symmetric(horizontal: 16.w),
// 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);
// },
// ),
// ),
// sizedBoxHeight(25.h),
// StreamBuilder<FollowingModel>(
// stream: searchcontroller.stream,
// builder: (ctx, snapshot) {
// if (snapshot.connectionState == ConnectionState.waiting) {
// // Display shimmer effect while waiting for data
// return Center(child: CircularProgressIndicator());
// } else if (snapshot.hasError) {
// // Handle error state
// return Center(
// child: Text(
// '${snapshot.error} occurred',
// style: TextStyle(fontSize: 18),
// ),
// );
// } else {
// // Data has been loaded, show actual UI
// return followingobj!.data!.isEmpty
// ? _buildNoDataBody(context)
// : ListView.separated(
// physics: 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(
// children: [
// followingobj!.data![index].following!
// .profilePhoto ==
// null ||
// followingobj!
// .data![index]
// .following!
// .profilePhoto!
// .isEmpty
// ? CircleAvatar(
// backgroundImage: 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!)
// ],
// ),
// Spacer(),
// PopupMenuButton(
// surfaceTintColor: Color(0xFF222935),
// constraints:
// BoxConstraints.tightFor(
// width: 176.w),
// offset: Offset(0, 20),
// color: 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"),
// Spacer(),
// Image.asset(
// "assets/images/png/Black1323e.png",
// height: 20.h,
// width: 20.w,
// )
// ],
// ),
// ),
// ),
// PopupMenuDivider(),
// PopupMenuItem(
// onTap: () {},
// child: Padding(
// padding:
// EdgeInsets.symmetric(
// horizontal: 12.w),
// child: Row(
// children: [
// text14400white(
// "Message user"),
// 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) {

View File

@@ -1,813 +0,0 @@
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/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class profiletabBusGest extends StatefulWidget {
const profiletabBusGest({super.key});
@override
State<profiletabBusGest> createState() => _profiletabBusGestState();
}
class _profiletabBusGestState extends State<profiletabBusGest> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
// accountTypeValue == '1' ||
body:
// FutureBuilder(
// future: businessfuture,
// builder: (ctx, snapshot) {
// if (snapshot.connectionState == ConnectionState.waiting) {
// return Center(
// child: CircularProgressIndicator(
// color: Colors.blue,
// ),
// );
// }
// if (snapshot.hasError) {
// return Center(
// child: Text(
// '${snapshot.error} occurred',
// style: TextStyle(fontSize: 18.spMin),
// ),
// );
// }
// if (snapshot.connectionState == ConnectionState.done &&
// snapshot.hasData) {
// print("Data fetched-->");
// return
Stack(clipBehavior: Clip.none, children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
SafeArea(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
Container(
height: 484.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/Rectangle 49 (1).png",
fit: BoxFit.cover,
),
),
Positioned.fill(
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color.fromRGBO(34, 41, 53, 0.1),
Color.fromRGBO(34, 41, 53, 0.79),
],
stops: [
0.5788,
0.8,
],
),
),
),
),
Positioned(
bottom: 0,
right: 0,
left: 0,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Column(
children: [
text20700white(
"Victory gear sports emporium"),
sizedBoxHeight(5.h),
text18w400white("@Victorygames_10"),
sizedBoxHeight(15.h),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Get.toNamed(RouteName.followers);
},
child: Column(
children: [
text16400white("254"),
sizedBoxHeight(6.h),
text12400whiteblur("Followers")
],
),
),
sizedBoxWidth(20.w),
Container(
height: 58.h,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.white,
width: 1.0,
),
boxShadow: [
BoxShadow(
color: Color(0x66000000),
offset: Offset(0, 4),
blurRadius: 4.0,
),
],
),
),
sizedBoxWidth(20.w),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.following);
},
child: Column(
children: [
text16400white("344"),
sizedBoxHeight(6.h),
text12400whiteblur("Following")
],
),
),
],
),
sizedBoxHeight(20.h),
],
),
],
),
),
),
],
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
Get.toNamed(RouteName.buseditprofile);
},
child: Container(
height: 40.h,
width: 170.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius: BorderRadius.circular(30.r),
),
child:
Center(child: text16w400_FCFCFC("Follow")),
),
),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.shareProfile);
},
child: commonGlassUI(
width: 170.w,
height: 40.h,
opacity1: 0.05,
opacity2: 0.07,
borderRadius: BorderRadius.circular(30.r),
mainOpacity: 1,
customWidget: Center(
child: text16w400_FCFCFC("Message"),
),
// border: 1,
),
)
],
),
sizedBoxHeight(30.h),
text18w700white("About"),
sizedBoxHeight(10.h),
text14400white(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."),
sizedBoxHeight(25.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/Frame 24.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur("James Bothman"),
],
),
sizedBoxHeight(20.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector2a.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur("www.exampledummywebsite.com"),
],
),
sizedBoxHeight(20.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/Group 58645.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur(
"Elm street london, United Kingdom"),
],
),
sizedBoxHeight(20.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
// text14400whiteblur(getEditProfileIndi!
// .data!.interest!
// .join(', ')),
text14400whiteblur("Founded at : 2010"),
],
),
sizedBoxHeight(30.h),
],
),
),
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text18w700white("Posts"),
),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 48.png',
title: 'Jocelyn Dokidis',
mainImg: 'assets/images/png/Rectangle 46.png',
containerTitle: [
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(120.h),
],
),
),
),
Positioned.fill(
top: 40.h,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
sizedBoxHeight(20.h),
Row(
children: [
Spacer(),
commonContainer(
width: 40.w,
height: 40.h,
borderwidth: 0.5,
boxShape: BoxShape.circle,
opacity1: 0.5,
opacity2: 0.6,
customWidget: PopupMenuButton(
surfaceTintColor: const Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 200.w),
offset: const Offset(0, 50),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.shareProfile);
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Share profile',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
const Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 17.h,
width: 17.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Report user',
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: 20.h,
width: 20.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Block user',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
const Spacer(),
Image.asset(
"assets/images/png/blocked.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Center(
child: Image.asset(
'assets/images/png/Group 1000004071.png',
height: 20.h,
width: 20.w,
)),
),
),
],
),
],
),
),
),
]));
}
}
Widget normalcardtile({
required String profileImg,
required String title,
required String mainImg,
required List<String> 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(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
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('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: 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",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
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",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
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: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
// Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
),
),
sizedBoxHeight(20.h),
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(),
commonContainer(
width: 30.w,
height: 30.h,
opacity1: 0.2,
opacity2: 0.2,
borderwidth: 0.43,
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('20'),
sizedBoxWidth(20.w),
commonContainer(
width: 30.w,
height: 30.h,
opacity1: 0.2,
opacity2: 0.2,
borderwidth: 0.43,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
return ReactionButton<String>(
onReactionChanged: (reaction) {
updateImage(reaction?.value ?? 'like');
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>?>[
Reaction<String>(
value: 'like',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/f7_hand-thumbsup.png'),
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
Reaction<String>(
value: 'heart',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/heart 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/heart 2.png'),
),
Reaction<String>(
value: 'party',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/party-popper 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/party-popper 2.png'),
),
],
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration: Duration(milliseconds: 200),
itemAnimationDuration: Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
),
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
)
]),
),
],
);
}
Widget _buildReactionsPreviewIcon(String assetPath) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
assetPath,
height: 40.h,
width: 40.w,
),
);
}
Widget _buildReactionsIcon(String assetPath) {
return Column(
children: [
Image.asset(
assetPath,
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
);
}
Widget containertile({required String text}) {
return commonContainer(
width: 100.w,
height: 30.h,
borderRadius: BorderRadius.circular(30.r),
borderColor: Color(0xFFD90B2E),
borderwidth: 0.9,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),
));
}

View File

@@ -0,0 +1,82 @@
class GetGuestFollowers {
String? status;
int? statusCode;
String? message;
List<Data>? data;
GetGuestFollowers({this.status, this.statusCode, this.message, this.data});
GetGuestFollowers.fromJson(Map<String, dynamic> json) {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
if (json['data'] != null) {
data = <Data>[];
json['data'].forEach((v) {
data!.add(new Data.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['status_code'] = this.statusCode;
data['message'] = this.message;
if (this.data != null) {
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
return data;
}
}
class Data {
int? followingIamPrincipalXid;
int? iamPrincipalXid;
Follower? follower;
Data({this.followingIamPrincipalXid, this.iamPrincipalXid, this.follower});
Data.fromJson(Map<String, dynamic> json) {
followingIamPrincipalXid = json['following_iam_principal_xid'];
iamPrincipalXid = json['iam_principal_xid'];
follower = json['follower'] != null
? new Follower.fromJson(json['follower'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['following_iam_principal_xid'] = this.followingIamPrincipalXid;
data['iam_principal_xid'] = this.iamPrincipalXid;
if (this.follower != null) {
data['follower'] = this.follower!.toJson();
}
return data;
}
}
class Follower {
int? id;
String? userName;
String? fullName;
String? profilePhoto;
Follower({this.id, this.userName, this.fullName, this.profilePhoto});
Follower.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
profilePhoto = json['profile_photo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['profile_photo'] = this.profilePhoto;
return data;
}
}

View File

@@ -0,0 +1,82 @@
class GetGuestFollowing {
String? status;
int? statusCode;
String? message;
List<Data>? data;
GetGuestFollowing({this.status, this.statusCode, this.message, this.data});
GetGuestFollowing.fromJson(Map<String, dynamic> json) {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
if (json['data'] != null) {
data = <Data>[];
json['data'].forEach((v) {
data!.add(new Data.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['status_code'] = this.statusCode;
data['message'] = this.message;
if (this.data != null) {
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
return data;
}
}
class Data {
int? followingIamPrincipalXid;
int? iamPrincipalXid;
Following? following;
Data({this.followingIamPrincipalXid, this.iamPrincipalXid, this.following});
Data.fromJson(Map<String, dynamic> json) {
followingIamPrincipalXid = json['following_iam_principal_xid'];
iamPrincipalXid = json['iam_principal_xid'];
following = json['following'] != null
? new Following.fromJson(json['following'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['following_iam_principal_xid'] = this.followingIamPrincipalXid;
data['iam_principal_xid'] = this.iamPrincipalXid;
if (this.following != null) {
data['following'] = this.following!.toJson();
}
return data;
}
}
class Following {
int? id;
String? userName;
String? fullName;
String? profilePhoto;
Following({this.id, this.userName, this.fullName, this.profilePhoto});
Following.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
profilePhoto = json['profile_photo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['profile_photo'] = this.profilePhoto;
return data;
}
}

View File

@@ -0,0 +1,179 @@
class GuestGetProfileDataBus {
String? status;
int? statusCode;
String? message;
Data? data;
GuestGetProfileDataBus(
{this.status, this.statusCode, this.message, this.data});
GuestGetProfileDataBus.fromJson(Map<String, dynamic> json) {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['status_code'] = this.statusCode;
data['message'] = this.message;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class Data {
int? id;
int? businessTypeXid;
String? businessOwnerName;
String? businessName;
String? businessLocation;
String? businessContactNumber;
String? businessEmail;
String? businessHandle;
String? websiteLink;
String? googleReviewLink;
String? businessLogo;
String? tags;
String? bannerImage;
Follows? follows;
BusinessType? businessType;
Data(
{this.id,
this.businessTypeXid,
this.businessOwnerName,
this.businessName,
this.businessLocation,
this.businessContactNumber,
this.businessEmail,
this.businessHandle,
this.websiteLink,
this.googleReviewLink,
this.businessLogo,
this.tags,
this.bannerImage,
this.follows,
this.businessType});
Data.fromJson(Map<String, dynamic> json) {
id = json['id'];
businessTypeXid = json['business_type_xid'];
businessOwnerName = json['business_owner_name'];
businessName = json['business_name'];
businessLocation = json['business_location'];
businessContactNumber = json['business_contact_number'];
businessEmail = json['business_email'];
businessHandle = json['business_handle'];
websiteLink = json['website_link'];
googleReviewLink = json['google_review_link'];
businessLogo = json['business_logo'];
tags = json['tags'];
bannerImage = json['banner_image'];
follows =
json['follows'] != null ? new Follows.fromJson(json['follows']) : null;
businessType = json['business_type'] != null
? new BusinessType.fromJson(json['business_type'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['business_type_xid'] = this.businessTypeXid;
data['business_owner_name'] = this.businessOwnerName;
data['business_name'] = this.businessName;
data['business_location'] = this.businessLocation;
data['business_contact_number'] = this.businessContactNumber;
data['business_email'] = this.businessEmail;
data['business_handle'] = this.businessHandle;
data['website_link'] = this.websiteLink;
data['google_review_link'] = this.googleReviewLink;
data['business_logo'] = this.businessLogo;
data['tags'] = this.tags;
data['banner_image'] = this.bannerImage;
if (this.follows != null) {
data['follows'] = this.follows!.toJson();
}
if (this.businessType != null) {
data['business_type'] = this.businessType!.toJson();
}
return data;
}
}
class Follows {
int? following;
int? followers;
Follows({this.following, this.followers});
Follows.fromJson(Map<String, dynamic> json) {
following = json['following'];
followers = json['followers'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['following'] = this.following;
data['followers'] = this.followers;
return data;
}
}
class BusinessType {
int? id;
String? name;
String? image;
String? description;
int? isActive;
String? createdBy;
String? modifiedBy;
String? deletedAt;
String? createdAt;
String? updatedAt;
BusinessType(
{this.id,
this.name,
this.image,
this.description,
this.isActive,
this.createdBy,
this.modifiedBy,
this.deletedAt,
this.createdAt,
this.updatedAt});
BusinessType.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
image = json['image'];
description = json['description'];
isActive = json['is_active'];
createdBy = json['created_by'];
modifiedBy = json['modified_by'];
deletedAt = json['deleted_at'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['image'] = this.image;
data['description'] = this.description;
data['is_active'] = this.isActive;
data['created_by'] = this.createdBy;
data['modified_by'] = this.modifiedBy;
data['deleted_at'] = this.deletedAt;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
return data;
}
}

View File

@@ -0,0 +1,296 @@
class GuestGetProfileDataIndi {
String? status;
int? statusCode;
String? message;
Data? data;
GuestGetProfileDataIndi(
{this.status, this.statusCode, this.message, this.data});
GuestGetProfileDataIndi.fromJson(Map<String, dynamic> json) {
status = json['status'];
statusCode = json['status_code'];
message = json['message'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['status_code'] = this.statusCode;
data['message'] = this.message;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class Data {
int? id;
String? userName;
String? fullName;
String? gender;
String? dateOfBirth;
List<Interest>? interest;
String? about;
String? position;
String? trainingScores;
String? height;
String? weight;
String? battingAverage;
Follows? follows;
List<Timelines>? timelines;
int? accountVisibility;
List<MyJoinedSubgroups>? myJoinedSubgroups;
Data(
{this.id,
this.userName,
this.fullName,
this.gender,
this.dateOfBirth,
this.interest,
this.about,
this.position,
this.trainingScores,
this.height,
this.weight,
this.battingAverage,
this.follows,
this.timelines,
this.accountVisibility,
this.myJoinedSubgroups});
Data.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
gender = json['gender'];
dateOfBirth = json['date_of_birth'];
if (json['interest'] != null) {
interest = <Interest>[];
json['interest'].forEach((v) {
interest!.add(new Interest.fromJson(v));
});
}
about = json['about'];
position = json['position'];
trainingScores = json['training_scores'];
height = json['height'];
weight = json['weight'];
battingAverage = json['batting_average'];
follows =
json['follows'] != null ? new Follows.fromJson(json['follows']) : null;
if (json['timelines'] != null) {
timelines = <Timelines>[];
json['timelines'].forEach((v) {
timelines!.add(new Timelines.fromJson(v));
});
}
accountVisibility = json['account_visibility'];
if (json['my_joined_subgroups'] != null) {
myJoinedSubgroups = <MyJoinedSubgroups>[];
json['my_joined_subgroups'].forEach((v) {
myJoinedSubgroups!.add(new MyJoinedSubgroups.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['gender'] = this.gender;
data['date_of_birth'] = this.dateOfBirth;
if (this.interest != null) {
data['interest'] = this.interest!.map((v) => v.toJson()).toList();
}
data['about'] = this.about;
data['position'] = this.position;
data['training_scores'] = this.trainingScores;
data['height'] = this.height;
data['weight'] = this.weight;
data['batting_average'] = this.battingAverage;
if (this.follows != null) {
data['follows'] = this.follows!.toJson();
}
if (this.timelines != null) {
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();
}
return data;
}
}
class Interest {
int? id;
String? name;
Interest({this.id, this.name});
Interest.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
return data;
}
}
class Follows {
int? following;
int? followers;
Follows({this.following, this.followers});
Follows.fromJson(Map<String, dynamic> json) {
following = json['following'];
followers = json['followers'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['following'] = this.following;
data['followers'] = this.followers;
return data;
}
}
class Timelines {
int? id;
String? clubName;
String? roleName;
String? teamName;
String? startDate;
String? endDate;
String? abilitiesXids;
List<Abilities>? abilities;
Timelines(
{this.id,
this.clubName,
this.roleName,
this.teamName,
this.startDate,
this.endDate,
this.abilitiesXids,
this.abilities});
Timelines.fromJson(Map<String, dynamic> json) {
id = json['id'];
clubName = json['club_name'];
roleName = json['role_name'];
teamName = json['team_name'];
startDate = json['start_date'];
endDate = json['end_date'];
abilitiesXids = json['abilities_xids'];
if (json['abilities'] != null) {
abilities = <Abilities>[];
json['abilities'].forEach((v) {
abilities!.add(new Abilities.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['club_name'] = this.clubName;
data['role_name'] = this.roleName;
data['team_name'] = this.teamName;
data['start_date'] = this.startDate;
data['end_date'] = this.endDate;
data['abilities_xids'] = this.abilitiesXids;
if (this.abilities != null) {
data['abilities'] = this.abilities!.map((v) => v.toJson()).toList();
}
return data;
}
}
class Abilities {
int? id;
String? name;
Abilities({this.id, this.name});
Abilities.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
return data;
}
}
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;
}
}

View File

@@ -0,0 +1,857 @@
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/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
class profiletabBusGest extends StatefulWidget {
const profiletabBusGest({super.key});
@override
State<profiletabBusGest> createState() => _profiletabBusGestState();
}
class _profiletabBusGestState extends State<profiletabBusGest> {
late Future guestBusfuture;
var updata;
@override
void initState() {
// TODO: implement initState
updata = "64";
guestBusfuture = GuestProfileApi().getGuestProfileBus(updata);
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
// accountTypeValue == '1' ||
body: FutureBuilder(
future: guestBusfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
}
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18.spMin),
),
);
}
if (snapshot.connectionState == ConnectionState.done &&
snapshot.hasData) {
print("Data fetched-->");
return Stack(clipBehavior: Clip.none, children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
SafeArea(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
Container(
height: 484.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/Rectangle 49 (1).png",
fit: BoxFit.cover,
),
),
Positioned.fill(
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color.fromRGBO(34, 41, 53, 0.1),
Color.fromRGBO(34, 41, 53, 0.79),
],
stops: [
0.5788,
0.8,
],
),
),
),
),
Positioned(
bottom: 0,
right: 0,
left: 0,
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Column(
children: [
text20700white(guestGetProfileBus!
.data!.businessOwnerName ??
"Victory gear sports emporium"),
sizedBoxHeight(5.h),
text18w400white(guestGetProfileBus!
.data!.businessName ??
"@Victorygames_10"),
sizedBoxHeight(15.h),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.followers);
},
child: Column(
children: [
text16400white(
guestGetProfileBus!
.data!
.follows!
.followers
.toString() ??
"254"),
sizedBoxHeight(6.h),
text12400whiteblur(
"Followers")
],
),
),
sizedBoxWidth(20.w),
Container(
height: 58.h,
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(
color: Colors.white,
width: 1.0,
),
boxShadow: [
BoxShadow(
color: Color(0x66000000),
offset: Offset(0, 4),
blurRadius: 4.0,
),
],
),
),
sizedBoxWidth(20.w),
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.following);
},
child: Column(
children: [
text16400white(
guestGetProfileBus!
.data!
.follows!
.following
.toString() ??
"344"),
sizedBoxHeight(6.h),
text12400whiteblur(
"Following")
],
),
),
],
),
sizedBoxHeight(20.h),
],
),
],
),
),
),
],
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(30.h),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
// Get.toNamed(RouteName.buseditprofile);
},
child: Container(
height: 40.h,
width: 170.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius:
BorderRadius.circular(30.r),
),
child: Center(
child: text16w400_FCFCFC("Follow")),
),
),
GestureDetector(
onTap: () {
// Get.toNamed(RouteName.shareProfile);
},
child: commonGlassUI(
width: 170.w,
height: 40.h,
opacity1: 0.05,
opacity2: 0.07,
borderRadius:
BorderRadius.circular(30.r),
mainOpacity: 1,
customWidget: Center(
child: text16w400_FCFCFC("Message"),
),
// border: 1,
),
)
],
),
sizedBoxHeight(30.h),
text18w700white("About"),
sizedBoxHeight(10.h),
text14400white(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."),
sizedBoxHeight(25.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/Frame 24.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur("James Bothman"),
],
),
sizedBoxHeight(20.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector2a.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur(
"www.exampledummywebsite.com"),
],
),
sizedBoxHeight(20.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/Group 58645.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur(
"Elm street london, United Kingdom"),
],
),
sizedBoxHeight(20.h),
Row(
children: [
commonContainer(
width: 25.w,
height: 25.h,
opacity1: 0.26,
opacity2: 0.26,
borderwidth: 0.5,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
"assets/images/png/calender.png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
// text14400whiteblur(getEditProfileIndi!
// .data!.interest!
// .join(', ')),
text14400whiteblur("Founded at : 2010"),
],
),
sizedBoxHeight(30.h),
],
),
),
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text18w700white("Posts"),
),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 48.png',
title: 'Jocelyn Dokidis',
mainImg: 'assets/images/png/Rectangle 46.png',
containerTitle: [
'Race',
'Swimming',
'Events',
'Marathon',
'Events'
]),
sizedBoxHeight(120.h),
],
),
),
),
Positioned.fill(
top: 40.h,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
children: [
sizedBoxHeight(20.h),
Row(
children: [
Spacer(),
commonContainer(
width: 40.w,
height: 40.h,
borderwidth: 0.5,
boxShape: BoxShape.circle,
opacity1: 0.5,
opacity2: 0.6,
customWidget: PopupMenuButton(
surfaceTintColor: const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(width: 200.w),
offset: const Offset(0, 50),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
PopupMenuItem(
onTap: () {
Get.toNamed(RouteName.shareProfile);
},
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
Text(
'Share profile',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
const Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 17.h,
width: 17.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
Text(
'Report user',
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: 20.h,
width: 20.w,
)
],
),
),
),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w),
child: Row(
children: [
Text(
'Block user',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
const Spacer(),
Image.asset(
"assets/images/png/blocked.png",
height: 18.h,
width: 18.w,
)
],
),
),
),
],
child: Center(
child: Image.asset(
'assets/images/png/Group 1000004071.png',
height: 20.h,
width: 20.w,
)),
),
),
],
),
],
),
),
),
]);
}
return Container();
}));
}
}
Widget normalcardtile({
required String profileImg,
required String title,
required String mainImg,
required List<String> 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(25.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
foregroundImage: AssetImage(profileImg),
radius: 25.r,
),
sizedBoxWidth(12.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(title),
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('Active alliance network'),
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
text12w400_FCFCFC('1 Hour ago'),
],
)
],
),
Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: 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",
),
),
Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
width: 15.w,
)
],
),
),
),
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",
),
),
Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
width: 20.w,
)
],
),
),
),
PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
children: [
Text(
'Pin',
style: TextStyle(
fontSize: 16.sp,
color: Colors.white,
fontWeight: FontWeight.w800,
fontFamily: "Nunito Sans",
),
),
Spacer(),
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: () {
Get.toNamed(RouteName.postdetailsScreen);
},
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),
child: Column(children: [
SizedBox(
height: 30.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: containerTitle.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
// Get.toNamed(RouteName.cyclescreen);
},
child: containertile(text: containerTitle[index])),
);
},
),
),
sizedBoxHeight(20.h),
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(),
commonContainer(
width: 30.w,
height: 30.h,
opacity1: 0.2,
opacity2: 0.2,
borderwidth: 0.43,
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('20'),
sizedBoxWidth(20.w),
commonContainer(
width: 30.w,
height: 30.h,
opacity1: 0.2,
opacity2: 0.2,
borderwidth: 0.43,
boxShape: BoxShape.circle,
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
height: 12.h,
width: 12.w,
),
),
),
sizedBoxWidth(12.w),
text14w400_FCFCFC('10'),
]),
sizedBoxHeight(30.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
return ReactionButton<String>(
onReactionChanged: (reaction) {
updateImage(reaction?.value ?? 'like');
debugPrint('Selected value: ${reaction?.value}');
},
reactions: <Reaction<String>?>[
Reaction<String>(
value: 'like',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/f7_hand-thumbsup.png'),
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
Reaction<String>(
value: 'heart',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/heart 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/heart 2.png'),
),
Reaction<String>(
value: 'party',
previewIcon: _buildReactionsPreviewIcon(
'assets/images/png/party-popper 2.png'),
icon: _buildReactionsIcon(
'assets/images/png/party-popper 2.png'),
),
],
selectedReaction: Reaction<String>(
value: 'like',
icon: _buildReactionsIcon(
'assets/images/png/f7_hand-thumbsup.png'),
),
boxColor: Colors.white,
boxElevation: 9,
boxRadius: 30,
itemsSpacing: 8,
itemScale: 0.4,
itemSize: Size(45, 45),
boxPadding: EdgeInsets.all(8),
boxAnimationDuration: Duration(milliseconds: 200),
itemAnimationDuration: Duration(milliseconds: 500),
hoverDuration: Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
);
})
],
),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.postdetailsScreen);
},
child: Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004088.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Comment')
],
),
),
Column(
children: [
Image.asset(
'assets/images/png/Frame 1000004089.png',
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Save')
],
)
],
)
]),
),
],
);
}
Widget _buildReactionsPreviewIcon(String assetPath) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
assetPath,
height: 40.h,
width: 40.w,
),
);
}
Widget _buildReactionsIcon(String assetPath) {
return Column(
children: [
Image.asset(
assetPath,
height: 19.h,
width: 19.w,
),
sizedBoxHeight(8.h),
text11w400_FCFCFC('Like')
],
);
}
Widget containertile({required String text}) {
return commonContainer(
width: 100.w,
height: 30.h,
borderRadius: BorderRadius.circular(30.r),
borderColor: Color(0xFFD90B2E),
borderwidth: 0.9,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),
));
}

View File

@@ -0,0 +1,73 @@
import 'dart:async';
import 'dart:developer';
import 'package:regroup/Common/api_urls.dart';
import 'package:regroup/Common/base_manager.dart';
import 'package:regroup/Common/controller/data/network/network_api.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowers.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GetGuestFollowing.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GuestGetProfileDataBus.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Model/GuestGetProfileDataIndi.dart';
GuestGetProfileDataIndi? guestGetProfileInd;
GuestGetProfileDataBus? guestGetProfileBus;
GetGuestFollowers? getguestfollowersobj;
GetGuestFollowing? getguestfollowingobj;
class GuestProfileApi {
GuestProfileApi();
Future<ResponseData<dynamic>> getGuestProfileInd(updata) async {
final response = await NetworkApiServices().getApi(
"${ApiUrls.getGuestProfileInd}?guest_user_id=$updata",
// optionalpar: false
);
if (response.status == ResponseStatus.SUCCESS) {
guestGetProfileInd = GuestGetProfileDataIndi.fromJson(response.data);
log(guestGetProfileInd!.data.toString());
}
return response;
}
Future<ResponseData<dynamic>> getGuestProfileBus(updata) async {
final response = await NetworkApiServices().getApi(
"${ApiUrls.getGuestProfileBus}?guest_user_id=$updata",
// optionalpar: false
);
if (response.status == ResponseStatus.SUCCESS) {
guestGetProfileBus = GuestGetProfileDataBus.fromJson(response.data);
log(guestGetProfileBus!.data.toString());
}
return response;
}
Future<ResponseData<dynamic>> getGuestfollowers(gestUserid ,guestupdata , {required StreamController<GetGuestFollowers> streamController}) async {
final response = await NetworkApiServices().getApi(
"${ApiUrls.getGuestfollowers}?guest_user_id=$gestUserid&search=$guestupdata",
// optionalpar: false
);
if (response.status == ResponseStatus.SUCCESS) {
getguestfollowersobj = GetGuestFollowers.fromJson(response.data);
if (!streamController.isClosed) streamController.sink.add(getguestfollowersobj!);
log(guestGetProfileInd!.data.toString());
}
return response;
}
Future<ResponseData<dynamic>> getGuestfollowing(gestUserid ,guestupdata , {required StreamController<GetGuestFollowing> streamController}) async {
final response = await NetworkApiServices().getApi(
"${ApiUrls.getGuestfollowing}?guest_user_id=$gestUserid&search=$guestupdata",
// optionalpar: false
);
if (response.status == ResponseStatus.SUCCESS) {
getguestfollowingobj = GetGuestFollowing.fromJson(response.data);
if (!streamController.isClosed) streamController.sink.add(getguestfollowingobj!);
log(guestGetProfileInd!.data.toString());
}
return response;
}
}

View File

@@ -39,8 +39,8 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/View/E
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Followers/Followers.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Following/Following.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Business/ProfileTabBusGuest.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/Individual/ProfileTabIndGuest.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/View/Business/ProfileTabBusGuest.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/View/Individual/ProfileTabIndGuest.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/My%20Network/MyNetwork.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/AccountSessions.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/AccountSetting.dart';