conflicts resolved

This commit is contained in:
Shubhamshirva
2024-07-23 19:44:27 +05:30
18 changed files with 1821 additions and 1278 deletions

View File

@@ -12,7 +12,10 @@ Widget commonGlassContainer({
double opacity2 = 0.05,
Color borderColor = const Color(0xff434A53),
}) {
return GlassmorphicContainer(
return
GlassmorphicContainer(
width: width,
height: height,
borderRadius: borderradius,

View File

@@ -10,6 +10,7 @@ class CommonTabBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return TabBar(
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
labelStyle: TextStyle(
fontSize: 14.sp,

View File

@@ -59,6 +59,8 @@ class _AddUsersState extends State<AddUsers> {
List<bool> isCheckedList = [false, false, false, false, false, false, false];
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -99,10 +101,12 @@ class _AddUsersState extends State<AddUsers> {
),
sizedBoxHeight(16.h),
DefaultTabController(
length: 3,
// initialIndex: selectedIndex.value,
child: Column(children: [
CommonTabBar(tabs: const [
CommonTabBar(
tabs: const [
Tab(
text: 'Group',
),

View File

@@ -179,7 +179,10 @@ class _CalenderTabState extends State<CalenderTab> {
// initialIndex: selectedIndex.value,
child: Column(
children: [
CommonTabBar(tabs: const [
CommonTabBar(
tabs: const [
Tab(
text: 'My sessions',
),
@@ -189,6 +192,7 @@ class _CalenderTabState extends State<CalenderTab> {
]),
Expanded(
child: TabBarView(
children: [
MySessionsTab(),
ComSessionTab(),

View File

@@ -92,11 +92,11 @@ class _PostScreenState extends State<PostScreen> {
borderType: BorderType.RRect,
radius: Radius.circular(14.r),
color: Color(0xFF434A53),
child: commonGlassContainer(
border: 0,
child: commonGlassUI(
width: double.infinity,
height: 130.h,
borderradius: 10.r,
borderRadius: BorderRadius.circular(10.r),
borderColor: Colors.transparent,
customWidget: bannerPath.isNotEmpty && isbannerAdded
? Stack(children: [
Image.file(

View File

@@ -12,6 +12,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewMo
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/ShimmerCommon.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
@@ -160,11 +161,13 @@ class _BusEditProfileState extends State<BusEditProfile> {
future: myfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
return ShimmerCommon();
// Center(
// child: CircularProgressIndicator(
// color: Colors.blue,
// ),
// );
}
if (snapshot.hasError) {

View File

@@ -12,7 +12,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/Model/
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart';
import 'package:regroup/Utils/Common/blureffect.dart';
import 'package:regroup/Utils/Common/ShimmerCommon.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
@@ -202,11 +202,13 @@ class _ProfileTabState extends State<ProfileTab> {
future: individualfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
return ShimmerCommon();
// Center(
// child: CircularProgressIndicator(
// color: Colors.blue,
// ),
// );
}
if (snapshot.hasError) {
@@ -299,7 +301,11 @@ class _ProfileTabState extends State<ProfileTab> {
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.mynetwork);
RouteName.mynetwork,
// arguments: {
// "From": 'MainIndProfile',
// }
);
},
child: Container(
height: 34.h,
@@ -1061,15 +1067,14 @@ class _ProfileTabState extends State<ProfileTab> {
return Container();
},
)
//BusProfile
: FutureBuilder(
future: businessfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
return ShimmerCommon();
}
if (snapshot.hasError) {
@@ -1152,7 +1157,11 @@ class _ProfileTabState extends State<ProfileTab> {
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.followers);
RouteName.followers,
arguments: {
"From":
'MainBusProfile',
});
},
child: Column(
children: [
@@ -1192,7 +1201,11 @@ class _ProfileTabState extends State<ProfileTab> {
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.following);
RouteName.following,
arguments: {
"From":
'MainBusProfile',
});
},
child: Column(
children: [

View File

@@ -61,14 +61,21 @@ class Follower {
String? userName;
String? fullName;
String? profilePhoto;
int? principleTypeXid;
Follower({this.id, this.userName, this.fullName, this.profilePhoto});
Follower(
{this.id,
this.userName,
this.fullName,
this.profilePhoto,
this.principleTypeXid});
Follower.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
profilePhoto = json['profile_photo'];
principleTypeXid = json['principal_type_xid'];
}
Map<String, dynamic> toJson() {
@@ -77,6 +84,8 @@ class Follower {
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['profile_photo'] = this.profilePhoto;
data['principal_type_xid'] = this.principleTypeXid;
return data;
}
}

View File

@@ -61,14 +61,17 @@ class Following {
String? userName;
String? fullName;
String? profilePhoto;
int? principleTypeXid;
Following({this.id, this.userName, this.fullName, this.profilePhoto});
Following({this.id, this.userName, this.fullName, this.profilePhoto, this.principleTypeXid});
Following.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
profilePhoto = json['profile_photo'];
principleTypeXid = json['principal_type_xid'];
}
Map<String, dynamic> toJson() {
@@ -77,6 +80,7 @@ class Following {
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['profile_photo'] = this.profilePhoto;
data['principal_type_xid'] = this.principleTypeXid;
return data;
}
}

View File

@@ -31,6 +31,7 @@ class Data {
String? userName;
String? fullName;
String? gender;
String? profilePhoto;
String? dateOfBirth;
List<Interest>? interest;
String? about;
@@ -42,13 +43,17 @@ class Data {
Follows? follows;
List<Timelines>? timelines;
int? accountVisibility;
List<MyJoinedGroups>? myJoinedGroups;
List<MyJoinedSubgroups>? myJoinedSubgroups;
List<Certifications>? certifications;
int? daysBeforeJoined;
Data(
{this.id,
this.userName,
this.fullName,
this.gender,
this.profilePhoto,
this.dateOfBirth,
this.interest,
this.about,
@@ -60,15 +65,19 @@ class Data {
this.follows,
this.timelines,
this.accountVisibility,
this.myJoinedSubgroups});
this.myJoinedGroups,
this.myJoinedSubgroups,
this.certifications,
this.daysBeforeJoined});
Data.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
gender = json['gender'];
profilePhoto = json['profile_photo'];
dateOfBirth = json['date_of_birth'];
if (json['interest'] != null) {
if (json['interest'] != null) {
interest = <Interest>[];
json['interest'].forEach((v) {
interest!.add(new Interest.fromJson(v));
@@ -89,12 +98,25 @@ class Data {
});
}
accountVisibility = json['account_visibility'];
if (json['my_joined_groups'] != null) {
myJoinedGroups = <MyJoinedGroups>[];
json['my_joined_groups'].forEach((v) {
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['certifications'] != null) {
certifications = <Certifications>[];
json['certifications'].forEach((v) {
certifications!.add(new Certifications.fromJson(v));
});
}
daysBeforeJoined = json['days_before_joined'];
}
Map<String, dynamic> toJson() {
@@ -103,6 +125,7 @@ class Data {
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['gender'] = this.gender;
data['profile_photo'] = this.profilePhoto;
data['date_of_birth'] = this.dateOfBirth;
if (this.interest != null) {
data['interest'] = this.interest!.map((v) => v.toJson()).toList();
@@ -120,10 +143,19 @@ class Data {
data['timelines'] = this.timelines!.map((v) => v.toJson()).toList();
}
data['account_visibility'] = this.accountVisibility;
if (this.myJoinedGroups != null) {
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.certifications != null) {
data['certifications'] =
this.certifications!.map((v) => v.toJson()).toList();
}
data['days_before_joined'] = this.daysBeforeJoined;
return data;
}
}
@@ -236,6 +268,58 @@ class Abilities {
}
}
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;
}
}
class MyJoinedSubgroups {
int? id;
int? iamPrincipalXid;
@@ -294,3 +378,40 @@ class SubGroupData {
return data;
}
}
class Certifications {
int? id;
String? certificationName;
String? certificationImage;
String? certificationReason;
String? certificationDate;
int? iamPrincipalXid;
Certifications(
{this.id,
this.certificationName,
this.certificationImage,
this.certificationReason,
this.certificationDate,
this.iamPrincipalXid});
Certifications.fromJson(Map<String, dynamic> json) {
id = json['id'];
certificationName = json['certification_name'];
certificationImage = json['certification_image'];
certificationReason = json['certification_reason'];
certificationDate = json['certification_date'];
iamPrincipalXid = json['iam_principal_xid'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['certification_name'] = this.certificationName;
data['certification_image'] = this.certificationImage;
data['certification_reason'] = this.certificationReason;
data['certification_date'] = this.certificationDate;
data['iam_principal_xid'] = this.iamPrincipalXid;
return data;
}
}

View File

@@ -6,6 +6,7 @@ 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/ShimmerCommon.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
import 'package:regroup/resources/routes/route_name.dart';
@@ -24,7 +25,9 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
@override
void initState() {
// TODO: implement initState
updata = "64";
updata = Get.arguments?['FolloweridIndex'] ??
Get.arguments?['FollowingidIndex'] ??
"64";
guestBusfuture = GuestProfileApi().getGuestProfileBus(updata);
@@ -42,11 +45,13 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
future: guestBusfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
);
return ShimmerCommon();
// Center(
// child: CircularProgressIndicator(
// color: Colors.blue,
// ),
// );
}
if (snapshot.hasError) {
@@ -76,14 +81,31 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
children: [
Stack(
children: [
Container(
height: 484.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/Rectangle 49 (1).png",
fit: BoxFit.cover,
),
),
guestGetProfileBus!.data!.bannerImage != null
? Container(
width: double.infinity,
height: 484.h,
decoration: ShapeDecoration(
image: DecorationImage(
image: Image(
image: NetworkImage(
guestGetProfileBus!
.data!.bannerImage ??
''),
).image,
fit: BoxFit.cover,
),
shape: LinearBorder(),
),
)
: 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(
@@ -129,7 +151,13 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.followers);
RouteName.followers,
arguments: {
'From':
"GuestBusFollowers",
'UpdataGuestBusIdfollowers':
updata
});
},
child: Column(
children: [
@@ -168,7 +196,13 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.following);
RouteName.following,
arguments: {
'From':
"GuestBusFollowing",
'UpdataGuestBusIdfollowing':
updata,
});
},
child: Column(
children: [
@@ -266,7 +300,9 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
)),
),
sizedBoxWidth(12.w),
text14400whiteblur("James Bothman"),
text14400whiteblur(guestGetProfileBus!
.data!.businessOwnerName ??
"James Bothman"),
],
),
sizedBoxHeight(20.h),
@@ -288,7 +324,8 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
),
sizedBoxWidth(12.w),
text14400whiteblur(
"www.exampledummywebsite.com"),
guestGetProfileBus!.data!.websiteLink ??
"www.exampledummywebsite.com"),
],
),
sizedBoxHeight(20.h),
@@ -309,7 +346,8 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
)),
),
sizedBoxWidth(12.w),
text14400whiteblur(
text14400whiteblur(guestGetProfileBus!
.data!.businessLocation ??
"Elm street london, United Kingdom"),
],
),
@@ -334,7 +372,13 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
// text14400whiteblur(getEditProfileIndi!
// .data!.interest!
// .join(', ')),
text14400whiteblur("Founded at : 2010"),
guestGetProfileBus!.data!.businessType!
.createdAt !=
null
? text14400whiteblur(
' Founded at : ${guestGetProfileBus!.data!.businessType!.createdAt}')
: text14400whiteblur(
"Founded at : 2010")
],
),
sizedBoxHeight(30.h),
@@ -371,6 +415,25 @@ class _profiletabBusGestState extends State<profiletabBusGest> {
sizedBoxHeight(20.h),
Row(
children: [
GestureDetector(
onTap: () {
Get.back();
},
child: commonContainer(
width: 40.w,
height: 40.h,
borderwidth: 0.5,
boxShape: BoxShape.circle,
opacity1: 0.5,
opacity2: 0.6,
customWidget: Center(
child: Image.asset(
'assets/images/png/ph_arrow-up-thin.png',
height: 25.h,
width: 25.w,
),
)),
),
Spacer(),
commonContainer(
width: 40.w,

View File

@@ -81,8 +81,6 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
late Future guestIndfuture;
var updata;
// FollowingidIndex
@override
void initState() {
// updata = Get.arguments != null
@@ -103,14 +101,14 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
backgroundColor: const Color(0xFF222935),
extendBody: true,
// accountTypeValue == '1' ||
body: FutureBuilder(
future: guestIndfuture,
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(
return const Center(
child: CircularProgressIndicator(
color: Colors.blue,
),
@@ -144,17 +142,33 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
children: [
Stack(
children: [
Container(
height: 484.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/profileimg.png",
fit: BoxFit.cover,
),
),
guestGetProfileInd!.data!.profilePhoto!.isNotEmpty
? Container(
width: double.infinity,
height: 484.h,
decoration: ShapeDecoration(
image: DecorationImage(
image: Image(
image: NetworkImage(
guestGetProfileInd!
.data!.profilePhoto!),
).image,
fit: BoxFit.cover,
),
shape: LinearBorder(),
),
)
: Container(
height: 484.h,
width: double.infinity,
child: Image.asset(
"assets/images/png/profileimg.png",
fit: BoxFit.cover,
),
),
Positioned.fill(
child: Container(
decoration: BoxDecoration(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
@@ -227,7 +241,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
color: Colors.white,
width: 1.0,
),
boxShadow: [
boxShadow: const [
BoxShadow(
color: Color(0x66000000),
offset: Offset(0, 4),
@@ -270,7 +284,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
color: Colors.white,
width: 1.0,
),
boxShadow: [
boxShadow: const [
BoxShadow(
color: Color(0x66000000),
offset: Offset(0, 4),
@@ -321,7 +335,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
height: 40.h,
width: 170.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
color: const Color(0xFFD90B2E),
borderRadius:
BorderRadius.circular(30.r),
),
@@ -470,7 +484,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
Row(
children: [
text18w700white("Timeline"),
Spacer(),
const Spacer(),
InkWell(
onTap: () {
Get.toNamed(RouteName.addtimeline);
@@ -484,24 +498,54 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
],
),
sizedBoxHeight(20.h),
SizedBox(
height: 300.h,
child: ListView.builder(
shrinkWrap: true,
itemCount: timeline.length,
itemBuilder: (context, index) {
return commonTimelineCard(
imagePath: timeline[index]
["imagePath"],
title: timeline[index]["title"]);
},
)),
guestGetProfileInd!.data!.timelines!.isEmpty
? Padding(
padding: EdgeInsets.symmetric(
vertical: 30.h),
child: Center(
child: text18w700white(
"No Timeline Found")),
)
: SizedBox(
height: 300.h,
child: ListView.builder(
shrinkWrap: true,
itemCount: guestGetProfileInd!
.data!.timelines!.length,
itemBuilder: (context, index) {
var abilities;
abilities = guestGetProfileInd!
.data!
.timelines![index]
.abilities!
.map((e) => e.name)
.join(', ');
return commonTimelineCard(
imagePath: timeline[index]
["imagePath"],
title: guestGetProfileInd!
.data!
.timelines![index]
.teamName ??
'',
teamName: guestGetProfileInd!
.data!
.timelines![index]
.teamName ??
'',
abilities: abilities,
startendDate:
"${guestGetProfileInd!.data!.timelines![index].startDate} - ${guestGetProfileInd!.data!.timelines![index].endDate} " ??
'',
);
},
)),
sizedBoxHeight(30.h),
Row(
children: [
text16w700white(
"Certifications/Qualifications"),
Spacer(),
const Spacer(),
InkWell(
onTap: () {
Get.toNamed(RouteName.certificate);
@@ -510,51 +554,89 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
],
),
sizedBoxHeight(20.h),
SizedBox(
height: 85.h,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: certificationData.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 20.w),
child: certificationCardTile(
imagePath:
certificationData[index]
["imagePath"],
title: certificationData[index]
["title"],
subtitle: certificationData[index]
["subtitle"],
date: certificationData[index]
["date"]),
);
},
),
),
guestGetProfileInd!
.data!.certifications!.isEmpty
? Padding(
padding: EdgeInsets.symmetric(
vertical: 30.h),
child: Center(
child: text18w700white(
"No Certifications Found")),
)
: SizedBox(
height: 85.h,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
itemCount: guestGetProfileInd!.data!
.certifications!.length ??
certificationData.length,
itemBuilder: (context, index) {
var certifiData =
guestGetProfileInd!.data!
.certifications![index];
return Padding(
padding: EdgeInsets.only(
right: 20.w),
child: certificationCardTile(
imagePath: certifiData
.certificationImage ??
certificationData[index]
["imagePath"],
title: certifiData
.certificationName ??
certificationData[index]
["title"],
subtitle: certifiData
.certificationReason ??
certificationData[index]
["subtitle"],
date:
("Issued ${certifiData.certificationDate}") ??
(certificationData[
index]
["date"])),
);
},
),
),
sizedBoxHeight(30.h),
text18w400white("Subgroups"),
]),
),
sizedBoxHeight(20.h),
SizedBox(
height: 190.h,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
padding: EdgeInsets.only(left: 16.w),
itemCount: cardtile.length,
itemBuilder: (context, index) {
return Padding(
padding: EdgeInsets.only(right: 20.w),
child: profilecardtile(
imagePath: cardtile[index]["imagePath"],
title: cardtile[index]["title"]),
);
},
),
),
guestGetProfileInd!.data!.myJoinedSubgroups!.isEmpty
? Padding(
padding: EdgeInsets.symmetric(vertical: 30.h),
child: Center(
child: text18w700white(
"No Subgroups Found")),
)
: SizedBox(
height: 190.h,
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
padding: EdgeInsets.only(left: 16.w),
itemCount: guestGetProfileInd!
.data!.myJoinedSubgroups!.length,
itemBuilder: (context, index) {
var subGroupData = guestGetProfileInd!
.data!
.myJoinedSubgroups![index]
.subGroupData!;
return Padding(
padding: EdgeInsets.only(right: 20.w),
child: profilecardtile(
imagePath: subGroupData
.subGroupImage ??
cardtile[index]["imagePath"],
title: subGroupData.title ??
cardtile[index]["title"]),
);
},
),
),
sizedBoxHeight(20.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
@@ -585,7 +667,26 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
sizedBoxHeight(20.h),
Row(
children: [
Spacer(),
GestureDetector(
onTap: () {
Get.back();
},
child: commonContainer(
width: 40.w,
height: 40.h,
borderwidth: 0.5,
boxShape: BoxShape.circle,
opacity1: 0.5,
opacity2: 0.6,
customWidget: Center(
child: Image.asset(
'assets/images/png/ph_arrow-up-thin.png',
height: 25.h,
width: 25.w,
),
)),
),
const Spacer(),
commonContainer(
width: 40.w,
height: 40.h,
@@ -706,7 +807,11 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
}
Widget commonTimelineCard(
{required String imagePath, required String title}) {
{required String imagePath,
required String title,
required String teamName,
required String startendDate,
required String abilities}) {
return Row(
children: [
Container(
@@ -720,7 +825,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
child: Container(
height: 11.h,
width: 11.w,
decoration: BoxDecoration(
decoration: const BoxDecoration(
color: Colors.white, shape: BoxShape.circle)),
),
Positioned(
@@ -728,7 +833,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
child: Container(
width: 1.w,
height: 170.h,
decoration: BoxDecoration(color: Colors.white),
decoration: const BoxDecoration(color: Colors.white),
),
),
],
@@ -759,12 +864,11 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
],
),
sizedBoxHeight(10.h),
text12700white("Team captain"),
text12700white(teamName),
sizedBoxHeight(8.h),
text12400white("April 2023 - May 2024"),
text12400white(startendDate),
sizedBoxHeight(10.h),
text10400whiteblur(
"Lorem Ipsum is simply dummy text of the printing and typesetting industry.")
text10400whiteblur(abilities)
],
),
),
@@ -824,7 +928,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
sizedBoxWidth(7.w),
Icon(
Icons.circle,
color: Color(0xFFFCFCFC),
color: const Color(0xFFFCFCFC),
size: 4.sp,
),
sizedBoxWidth(6.w),
@@ -833,12 +937,12 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
)
],
),
Spacer(),
const Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
surfaceTintColor: const Color(0xFF222935),
constraints: BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 50),
color: Color(0xFF222935),
offset: const Offset(0, 50),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
@@ -856,7 +960,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
fontFamily: "Nunito Sans",
),
),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/Vector (5).png",
height: 15.h,
@@ -866,7 +970,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
),
),
),
PopupMenuDivider(),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
@@ -882,7 +986,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
fontFamily: "Nunito Sans",
),
),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/share.png",
height: 20.h,
@@ -892,7 +996,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
),
),
),
PopupMenuDivider(),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
@@ -908,7 +1012,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
fontFamily: "Nunito Sans",
),
),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/f7_pin-fill (2).png",
height: 25.h,
@@ -973,7 +1077,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
'assets/images/png/heart 2.png',
'assets/images/png/party-popper 2.png'
]),
Spacer(),
const Spacer(),
commonContainer(
width: 30.w,
height: 30.h,
@@ -1056,11 +1160,12 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
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),
itemSize: const Size(45, 45),
boxPadding: const EdgeInsets.all(8),
boxAnimationDuration: const Duration(milliseconds: 200),
itemAnimationDuration:
const Duration(milliseconds: 500),
hoverDuration: const Duration(milliseconds: 700),
// toggle: false,
child: _buildReactionsIcon(mainImage.value),
@@ -1118,14 +1223,28 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 40.h,
width: 57.w,
child: Image.asset(
imagePath,
fit: BoxFit.cover,
),
),
guestGetProfileInd!.data!.certifications != null
? Container(
width: 57.w,
height: 40.h,
decoration: ShapeDecoration(
image: DecorationImage(
image: Image(
image: NetworkImage(imagePath),
).image,
fit: BoxFit.cover,
),
shape: LinearBorder(),
),
)
: Container(
height: 40.h,
width: 57.w,
child: Image.asset(
imagePath,
fit: BoxFit.cover,
),
),
sizedBoxWidth(10.w),
Expanded(
child: Column(
@@ -1177,7 +1296,7 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
width: 100.w,
height: 30.h,
borderRadius: BorderRadius.circular(30.r),
borderColor: Color(0xFFD90B2E),
borderColor: const Color(0xFFD90B2E),
borderwidth: 0.9,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
@@ -1188,14 +1307,29 @@ class _ProfileTabIndGuestState extends State<ProfileTabIndGuest> {
Widget profilecardtile({required String imagePath, required String title}) {
return Column(
children: [
Container(
height: 109.h,
width: 100.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
),
child: Image.asset(imagePath),
),
guestGetProfileInd!.data!.myJoinedSubgroups!.isNotEmpty
? Container(
width: 100.w,
height: 109.h,
decoration: ShapeDecoration(
image: DecorationImage(
image: Image(
image: NetworkImage(imagePath),
).image,
fit: BoxFit.cover,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.r)),
),
)
: Container(
height: 109.h,
width: 100.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.r),
),
child: Image.asset(imagePath),
),
sizedBoxHeight(10.h),
SizedBox(width: 100.w, child: text12w700_FCFCFC(title)),
],

View File

@@ -61,14 +61,18 @@ class Follower {
String? userName;
String? fullName;
String? profilePhoto;
int? principleTypeXid;
Follower({this.id, this.userName, this.fullName, this.profilePhoto});
Follower({this.id, this.userName, this.fullName, this.profilePhoto, this.principleTypeXid});
Follower.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
profilePhoto = json['profile_photo'];
principleTypeXid = json['principal_type_xid'];
}
Map<String, dynamic> toJson() {
@@ -77,6 +81,8 @@ class Follower {
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['profile_photo'] = this.profilePhoto;
data['principal_type_xid'] = this.principleTypeXid;
return data;
}
}

View File

@@ -61,14 +61,21 @@ class Following {
String? userName;
String? fullName;
String? profilePhoto;
int? principleTypeXid;
Following({this.id, this.userName, this.fullName, this.profilePhoto});
Following(
{this.id,
this.userName,
this.fullName,
this.profilePhoto,
this.principleTypeXid});
Following.fromJson(Map<String, dynamic> json) {
id = json['id'];
userName = json['user_name'];
fullName = json['full_name'];
profilePhoto = json['profile_photo'];
principleTypeXid = json['principal_type_xid'];
}
Map<String, dynamic> toJson() {
@@ -77,6 +84,8 @@ class Following {
data['user_name'] = this.userName;
data['full_name'] = this.fullName;
data['profile_photo'] = this.profilePhoto;
data['principal_type_xid'] = this.principleTypeXid;
return data;
}
}

View File

@@ -16,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 MyNetwork extends StatefulWidget {
@@ -26,6 +27,8 @@ class MyNetwork extends StatefulWidget {
}
class _MyNetworkState extends State<MyNetwork> {
// var fromMainIndProfile = Get.arguments['From'] ?? '';
// MainIndProfile
@override
Widget build(BuildContext context) {
return GestureDetector(
@@ -33,9 +36,9 @@ class _MyNetworkState extends State<MyNetwork> {
child: Scaffold(
// key: _scaffoldKey1,
resizeToAvoidBottomInset: false,
backgroundColor: Color(0xFF222935),
backgroundColor: const Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
appBar: const CommonAppbar(
titleTxt: "My networks",
),
body: Stack(children: [
@@ -60,11 +63,11 @@ class _MyNetworkState extends State<MyNetwork> {
text: 'Following',
),
]),
Expanded(
const Expanded(
child: TabBarView(
children: [
followersTab(),
followingTab(),
FollowersTab(),
FollowingTab(),
],
),
),
@@ -76,19 +79,20 @@ class _MyNetworkState extends State<MyNetwork> {
}
}
class followersTab extends StatefulWidget {
const followersTab({super.key});
class FollowersTab extends StatefulWidget {
const FollowersTab({super.key});
@override
State<followersTab> createState() => _followersTabState();
State<FollowersTab> createState() => _FollowersTabState();
}
class _followersTabState extends State<followersTab> {
class _FollowersTabState extends State<FollowersTab> {
StreamController<FollowersModel> searchcontroller = StreamController();
@override
void initState() {
var updata = "";
Profilegetmethod().getFollowers(updata, streamController: searchcontroller);
// TODO: implement initState
@@ -175,7 +179,7 @@ class _followersTabState extends State<followersTab> {
Widget build(BuildContext context) {
return ListView(
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
physics: const ScrollPhysics(),
children: [
Column(
children: [
@@ -211,14 +215,14 @@ class _followersTabState extends State<followersTab> {
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
// Display shimmer effect while waiting for data
return Expanded(
return const Expanded(
child: Center(child: CircularProgressIndicator()));
} else if (snapshot.hasError) {
// Handle error state
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18),
style: const TextStyle(fontSize: 18),
),
);
} else {
@@ -226,7 +230,7 @@ class _followersTabState extends State<followersTab> {
return followersobj!.data!.isEmpty
? _buildNoDataBody(context)
: ListView.separated(
physics: ScrollPhysics(),
physics: const ScrollPhysics(),
shrinkWrap: true,
itemCount: followersobj!.data!.length,
separatorBuilder:
@@ -250,7 +254,7 @@ class _followersTabState extends State<followersTab> {
.profilePhoto!
.isEmpty
? CircleAvatar(
backgroundImage: AssetImage(
backgroundImage: const AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
@@ -297,14 +301,14 @@ class _followersTabState extends State<followersTab> {
.follower!.userName!)
],
),
Spacer(),
const Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
surfaceTintColor: const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(
width: 176.w),
offset: Offset(0, 20),
color: Color(0xFF222935),
offset: const Offset(0, 20),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext
context) =>
@@ -334,7 +338,7 @@ class _followersTabState extends State<followersTab> {
children: [
text14400white(
"Remove user"),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/fluent_delete-28-regular.png",
height: 15.h,
@@ -344,7 +348,7 @@ class _followersTabState extends State<followersTab> {
),
),
),
PopupMenuDivider(),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
@@ -355,7 +359,7 @@ class _followersTabState extends State<followersTab> {
children: [
text14400white(
"Message user"),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-regular.png",
height: 20.h,
@@ -365,7 +369,7 @@ class _followersTabState extends State<followersTab> {
),
),
),
PopupMenuDivider(),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () async {
setState(() {
@@ -390,7 +394,7 @@ class _followersTabState extends State<followersTab> {
children: [
text14400white(
"Block user"),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/blockchat.png",
height: 25.h,
@@ -448,14 +452,14 @@ class _followersTabState extends State<followersTab> {
}
}
class followingTab extends StatefulWidget {
const followingTab({super.key});
class FollowingTab extends StatefulWidget {
const FollowingTab({super.key});
@override
State<followingTab> createState() => _followingTabState();
State<FollowingTab> createState() => _FollowingTabState();
}
class _followingTabState extends State<followingTab> {
class _FollowingTabState extends State<FollowingTab> {
StreamController<FollowingModel> searchcontroller = StreamController();
List followingData = [
@@ -533,7 +537,7 @@ class _followingTabState extends State<followingTab> {
@override
Widget build(BuildContext context) {
return ListView(
physics: ScrollPhysics(),
physics: const ScrollPhysics(),
scrollDirection: Axis.vertical,
children: [
Column(
@@ -565,6 +569,7 @@ class _followingTabState extends State<followingTab> {
// searchGroups(value!);
Profilegetmethod()
.getFollowing(value, streamController: searchcontroller);
return null;
},
),
),
@@ -574,14 +579,14 @@ class _followingTabState extends State<followingTab> {
builder: (ctx, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
// Display shimmer effect while waiting for data
return Expanded(
return const Expanded(
child: Center(child: CircularProgressIndicator()));
} else if (snapshot.hasError) {
// Handle error state
return Center(
child: Text(
'${snapshot.error} occurred',
style: TextStyle(fontSize: 18),
style: const TextStyle(fontSize: 18),
),
);
} else {
@@ -589,7 +594,7 @@ class _followingTabState extends State<followingTab> {
return followingobj!.data!.isEmpty
? _buildNoDataBody(context)
: ListView.separated(
physics: ScrollPhysics(),
physics: const ScrollPhysics(),
shrinkWrap: true,
itemCount: followingobj!.data!.length,
separatorBuilder: (BuildContext context, int index) {
@@ -630,7 +635,7 @@ class _followingTabState extends State<followingTab> {
followingobj!.data![index].following!
.profilePhoto!.isEmpty
? CircleAvatar(
backgroundImage: AssetImage(
backgroundImage: const AssetImage(
'assets/images/png/Ellipse 43.png'),
radius: 25.r,
)
@@ -668,13 +673,13 @@ class _followingTabState extends State<followingTab> {
.userName!)
],
),
Spacer(),
const Spacer(),
PopupMenuButton(
surfaceTintColor: Color(0xFF222935),
surfaceTintColor: const Color(0xFF222935),
constraints:
BoxConstraints.tightFor(width: 176.w),
offset: Offset(0, 20),
color: Color(0xFF222935),
offset: const Offset(0, 20),
color: const Color(0xFF222935),
tooltip: "",
itemBuilder: (BuildContext context) =>
<PopupMenuEntry>[
@@ -701,7 +706,7 @@ class _followingTabState extends State<followingTab> {
children: [
text14400white(
"Unfollow user"),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/Black1323e.png",
height: 20.h,
@@ -711,7 +716,7 @@ class _followingTabState extends State<followingTab> {
),
),
),
PopupMenuDivider(),
const PopupMenuDivider(),
PopupMenuItem(
onTap: () {},
child: Padding(
@@ -721,7 +726,7 @@ class _followingTabState extends State<followingTab> {
children: [
text14400white(
"Message user"),
Spacer(),
const Spacer(),
Image.asset(
"assets/images/png/fluent_chat-20-22.png",
height: 20.h,

View File

@@ -6,6 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:glassmorphism_ui/glassmorphism_ui.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
@@ -79,32 +80,24 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GlassmorphicContainer(
GlassContainer(
height: 50.h,
width: double.infinity,
height: 50,
borderRadius: 30,
blur: 6,
alignment: Alignment.bottomCenter,
border: 0.8,
linearGradient: LinearGradient(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
const Color(0xFFffffff).withOpacity(widget.opacity1),
const Color(0xFFFFFFFF).withOpacity(widget.opacity2),
const Color(0xFFFFFFFF).withOpacity(widget.opacity1),
],
stops: const [
0.1,
1,
]),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff434A53),
Color(0xFF434A53),
],
),
blur: 6,
opacity: 1,
borderRadius: BorderRadius.circular(30.r),
border: Border.all(color: Color(0xff434A53), width: 0.8),
child: TextFormField(
style: TextStyle(
fontSize: 16.sp, color: Colors.white, fontFamily: 'Helvetica'),
@@ -254,14 +247,10 @@ class _CustomTextFormField2State extends State<CustomTextFormField2> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
GlassmorphicContainer(
width: double.infinity,
GlassContainer(
height: 100.h,
borderRadius: 10,
blur: 6,
alignment: Alignment.bottomCenter,
border: 0.8,
linearGradient: LinearGradient(
width: double.infinity,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
@@ -272,14 +261,10 @@ class _CustomTextFormField2State extends State<CustomTextFormField2> {
0.1,
1,
]),
borderGradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xff434A53),
Color(0xFF434A53),
],
),
blur: 6,
opacity: 1,
borderRadius: BorderRadius.circular(10.r),
border: Border.all(color: Color(0xff434A53), width: 0.8),
child: TextFormField(
cursorColor: Colors.red,
initialValue: widget.value,