Ui of guest user done

This commit is contained in:
cj201199
2024-07-18 20:15:38 +05:30
parent 2a2c0586f4
commit d40658c6d3
12 changed files with 2695 additions and 248 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -12,7 +12,6 @@ import 'package:regroup/Utils/Common/CommonDropdown.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/ImageUpload.dart';
import 'package:regroup/Utils/Common/googleOAuthService.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/dialogs.dart';
import 'package:regroup/Utils/texts.dart';
@@ -29,10 +28,13 @@ class _EditProfileState extends State<EditProfile> {
TextEditingController fullNameController = TextEditingController();
TextEditingController userNameController = TextEditingController();
TextEditingController dateController = TextEditingController();
// TextEditingController genderController = TextEditingController();
TextEditingController locationController = TextEditingController();
// TextEditingController sportController = TextEditingController();
TextEditingController bioController = TextEditingController();
TextEditingController aboutController = TextEditingController();
TextEditingController positionController = TextEditingController();
TextEditingController trainingScoresController = TextEditingController();
TextEditingController heightController = TextEditingController();
TextEditingController weightController = TextEditingController();
TextEditingController battingAvgController = TextEditingController();
String profilePicture = "";
bool isImageAdded = false;
@@ -40,17 +42,17 @@ class _EditProfileState extends State<EditProfile> {
bool isOnce = true;
late Future myfuture;
// String extractFileName(String filePath) {
// return path.basename(filePath);
// }
convertFileToMultiPart(String? file) async {
convertFileToMultiPart1(String? file) async {
return await MultipartFile.fromFile(
file!,
filename: path.basename(file),
);
}
String extractFileName1(String filePath) {
return path.basename(filePath);
}
String _selectedgenderType = '';
void _onItemSelected(String value) {
@@ -69,6 +71,19 @@ class _EditProfileState extends State<EditProfile> {
});
}
List<int> getSelectedSportsIds() {
if (getEditProfileIndi == null ||
getEditProfileIndi!.data!.interest == null) {
return [];
}
return _selectedSports
.map((sportName) => getEditProfileIndi!.data!.interest!
.firstWhere((interest) => interest.name == sportName)
.id!)
.toList();
}
@override
void initState() {
// TODO: implement initState
@@ -96,12 +111,18 @@ class _EditProfileState extends State<EditProfile> {
}
void saveEditProfileInd() async {
List<int> selectedSportsIds = getSelectedSportsIds();
FormData? updata;
if (fullNameController.text.isBlank! ||
userNameController.text.isBlank! ||
dateController.text.isBlank! ||
locationController.text.isBlank! ||
bioController.text.isBlank!) {
aboutController.text.isBlank! ||
positionController.text.isBlank! ||
trainingScoresController.text.isBlank! ||
heightController.text.isBlank! ||
weightController.text.isBlank! ||
battingAvgController.text.isBlank!) {
Get.snackbar(
'Error',
'Enter your credentials',
@@ -113,9 +134,23 @@ class _EditProfileState extends State<EditProfile> {
utils.showToast('Upload edit profile picture!');
} else {
updata = FormData.fromMap({
"email_address": "priyanka@yopmail.com",
"email_address": "priyanka12@yopmail.com",
"full_name": fullNameController.text,
"profile_image": await convertFileToMultiPart(profilePicture),
"profile_image": await convertFileToMultiPart1(profilePicture),
// "profile_image": "ghjkk.png",
"user_name": userNameController.text,
"date_of_birth": dateController.text,
"gender": _selectedgenderType,
// "interest": "selectedSportsIds",
"interest": ["1", "2", "3"].toList(),
"about": aboutController.text,
"position": positionController.text,
"training_scores": trainingScoresController.text,
"height": heightController.text,
"weight": weightController.text,
"batting_average": battingAvgController.text,
"address_line1": battingAvgController.text,
});
final data = await EditProfileApi().postEditProfileIndividual(updata);
@@ -227,7 +262,7 @@ class _EditProfileState extends State<EditProfile> {
true,
(result) {
var filenameresult =
extractFileName(result);
extractFileName1(result);
profilePicture = result;
isImageAdded = true;
@@ -368,7 +403,7 @@ class _EditProfileState extends State<EditProfile> {
sizedBoxHeight(20.h),
Row(
children: [
text16400white("Primary sport"),
text16400white("Interests"),
sizedBoxWidth(6.w),
Image.asset(
"assets/images/png/octicon_question-24.png",
@@ -425,14 +460,52 @@ class _EditProfileState extends State<EditProfile> {
// ),
sizedBoxHeight(20.h),
text16400white("Bio"),
text16400white("About"),
sizedBoxHeight(16.h),
CustomTextFormField2(
textEditingController: bioController,
textEditingController: aboutController,
hintText:
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
maxlines: 3,
),
// sizedBoxHeight(20.h),
text16400white("Position"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: positionController,
hintText: "Lorem Ipsum",
),
sizedBoxHeight(20.h),
text16400white("Training Scores"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController:
trainingScoresController,
hintText: "50",
),
sizedBoxHeight(20.h),
text16400white("Height"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: heightController,
hintText: "6 feet",
),
sizedBoxHeight(20.h),
text16400white("Weight"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: weightController,
hintText: "70kg",
),
sizedBoxHeight(20.h),
text16400white("Batting Average"),
sizedBoxHeight(16.h),
CustomTextFormField(
textEditingController: battingAvgController,
hintText: "372",
),
sizedBoxHeight(20.h),
sizedBoxHeight(60.h),
CommonBtn(
text: "Save",

View File

@@ -1,4 +1,6 @@
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';
@@ -40,6 +42,27 @@ class _ProfileTabState extends State<ProfileTab> {
},
];
List certificationData = [
{
"imagePath": "assets/images/png/image 17.png",
"title": "Professional sports management",
"subtitle": "Athlete 365 ",
"date": "Issued Feb 2024"
},
{
"imagePath": "assets/images/png/image 18.png",
"title": "Professional sports management",
"subtitle": "Athlete 365 ",
"date": "Issued Feb 2024"
},
{
"imagePath": "assets/images/png/image 19.png",
"title": "Professional sports management",
"subtitle": "Athlete 365 ",
"date": "Issued Feb 2024"
},
];
List timeline = [
{
"imagePath": "assets/images/png/cimg1.png",
@@ -58,6 +81,7 @@ class _ProfileTabState extends State<ProfileTab> {
"title": "Cardio crusaders circle"
},
];
bool isOnce = true;
late Future individualfuture;
late Future businessfuture;
@@ -166,6 +190,7 @@ class _ProfileTabState extends State<ProfileTab> {
SafeArea(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
@@ -211,109 +236,55 @@ class _ProfileTabState extends State<ProfileTab> {
.data!.fullName ??
"Edward Hackett"),
sizedBoxHeight(5.h),
text18w400white(
'@${getEditProfileIndi!.data!.userName}' ??
"@edward_01"),
sizedBoxHeight(15.h),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.followers);
},
child: Column(
children: [
text16400white(
getEditProfileIndi!
.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(
getEditProfileIndi!
.data!
.follows!
.following!
.toString()),
sizedBoxHeight(6.h),
text12400whiteblur(
"Following")
],
),
),
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.clubs);
},
child: Column(
children: [
text16400white("10"),
sizedBoxHeight(6.h),
text12400whiteblur(
"Clubs")
],
),
text18w400white(
'@${getEditProfileIndi!.data!.userName}' ??
"@edward_01"),
sizedBoxWidth(5.w),
Icon(
Icons.circle,
size: 5.sp,
color: Colors.white,
),
sizedBoxWidth(5.w),
text18w400white("2,124 days")
],
),
sizedBoxHeight(15.h),
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.mynetwork);
},
child: Container(
height: 34.h,
width: 152.w,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
41.r),
border: Border.all(
color:
Color(0xFFD90B2E),
width: 0.84)),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/png/Vector2a.png',
height: 17.h,
width: 17.w,
),
sizedBoxWidth(8.w),
text16400white("My network")
],
),
),
),
sizedBoxHeight(20.h),
],
),
@@ -329,51 +300,7 @@ class _ProfileTabState extends State<ProfileTab> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(30.h),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap: () {
Get.toNamed(RouteName.editProfile);
},
child: Container(
height: 40.h,
width: 170.w,
decoration: BoxDecoration(
color: Color(0xFFD90B2E),
borderRadius:
BorderRadius.circular(30.r),
),
child: Center(
child: text16w400_FCFCFC(
"Edit profile")),
),
),
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(
"Share profile"),
),
// border: 1,
),
)
],
),
sizedBoxHeight(30.h),
text18w700white("Bio"),
text18w700white("About"),
sizedBoxHeight(10.h),
text14400white(
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."),
@@ -427,81 +354,9 @@ class _ProfileTabState extends State<ProfileTab> {
],
),
sizedBoxHeight(30.h),
commonGlassUI(
width: double.infinity,
height: 135.h,
borderRadius: BorderRadius.circular(10),
customWidget: Padding(
padding: EdgeInsets.symmetric(
vertical: 12.h, horizontal: 16.w),
child: Column(
children: [
Row(
children: [
text16w700white("Badges"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(
RouteName.badges);
},
child: text12400white(
"View more"))
],
),
sizedBoxHeight(8.h),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
],
),
],
),
),
// border: 1
),
sizedBoxHeight(40.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"]),
);
},
),
),
sizedBoxHeight(20.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
@@ -538,10 +393,78 @@ class _ProfileTabState extends State<ProfileTab> {
["title"]);
},
)),
sizedBoxHeight(30.h),
text18w700white("Posts"),
]),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(30.h),
Row(
children: [
text16w700white(
"Certifications/Qualifications"),
Spacer(),
InkWell(
onTap: () {
Get.toNamed(RouteName.certificate);
},
child: text12400white("View more")),
],
),
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"]),
);
},
),
),
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"]),
);
},
),
),
sizedBoxHeight(30.h),
Padding(
padding: EdgeInsets.only(left: 16.w),
child: text18w700white("Activity"),
),
normalcardtile(
profileImg: 'assets/images/png/Ellipse 48.png',
title: 'Jocelyn Dokidis',
@@ -973,6 +896,50 @@ class _ProfileTabState extends State<ProfileTab> {
);
}
Widget certificationCardTile({
required String imagePath,
required String title,
required String subtitle,
required String date,
}) {
return commonGlassUI(
width: 270.w,
height: 70.h,
borderRadius: BorderRadius.circular(10.r),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
height: 40.h,
width: 57.w,
child: Image.asset(
imagePath,
fit: BoxFit.cover,
),
),
sizedBoxWidth(10.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
text12400white(title),
sizedBoxHeight(5.h),
text9400white(subtitle),
sizedBoxHeight(5.h),
text9400white(date)
],
),
),
],
),
),
// border: 1
);
}
Widget commonTimelineCard(
{required String imagePath, required String title}) {
return Row(

View File

@@ -0,0 +1,813 @@
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,410 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class MyNetwork extends StatefulWidget {
const MyNetwork({super.key});
@override
State<MyNetwork> createState() => _MyNetworkState();
}
class _MyNetworkState extends State<MyNetwork> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
resizeToAvoidBottomInset: false,
backgroundColor: Color(0xFF222935),
extendBody: true,
appBar: CommonAppbar(
titleTxt: "My networks",
),
body: Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
sizedBoxHeight(16.h),
Expanded(
child: DefaultTabController(
length: 2,
// initialIndex: selectedIndex.value,
child: Column(children: [
CommonTabBar(tabs: const [
Tab(
text: 'Followers',
),
Tab(
text: 'Following',
),
]),
Expanded(
child: TabBarView(
children: [
followersTab(),
followingTab(),
],
),
),
])),
)
])
]));
}
Widget followersTab() {
List followersData = [
{
"imagePath": "assets/images/png/Ellipse 52.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 48.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 43.png",
"title": "Fit fusion squad",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 37.png",
"title": "Power pulse posse",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 52.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 48.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
];
return Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: CustomTextFormField(
leadingIcon: SizedBox(
height: 23,
width: 23,
child: Center(
child: Image.asset(
"assets/images/png/ion_search-outline.png",
height: 23,
width: 23,
),
),
),
hintText: "Search people",
),
),
ListView.separated(
physics: ScrollPhysics(),
shrinkWrap: true,
itemCount: followersData.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: [
CircleAvatar(
backgroundImage:
AssetImage(followersData[index]["imagePath"]),
radius: 25.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(followersData[index]["title"]),
sizedBoxHeight(4.h),
text12w400_FCFCFC_blur(
followersData[index]["subtitle"])
],
),
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 {},
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 {},
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 followingTab() {
List followingData = [
{
"imagePath": "assets/images/png/Ellipse 52.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 48.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 43.png",
"title": "Fit fusion squad",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 37.png",
"title": "Power pulse posse",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 52.png",
"title": "Iron titans fitness crew",
"subtitle": "Lorem ipsum dummy text",
},
{
"imagePath": "assets/images/png/Ellipse 48.png",
"title": "Body blitz brigade",
"subtitle": "Lorem ipsum dummy text",
},
];
return Column(
children: [
sizedBoxHeight(25.h),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: CustomTextFormField(
leadingIcon: SizedBox(
height: 23,
width: 23,
child: Center(
child: Image.asset(
"assets/images/png/ion_search-outline.png",
height: 23,
width: 23,
),
),
),
hintText: "Search people",
),
),
ListView.separated(
physics: ScrollPhysics(),
shrinkWrap: true,
itemCount: followingData.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: [
CircleAvatar(
backgroundImage:
AssetImage(followingData[index]["imagePath"]),
radius: 25.r,
),
sizedBoxWidth(10.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text16w400_FCFCFC(followingData[index]["title"]),
sizedBoxHeight(4.h),
text12w400_FCFCFC_blur(
followingData[index]["subtitle"])
],
),
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 {},
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 {},
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,
),
),
)),
],
),
)
],
);
},
),
],
);
}
}

View File

@@ -58,6 +58,16 @@ class _SettingsState extends State<Settings> {
),
),
commonDivider(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.editProfile);
},
child: rowTile(
imagePath: "assets/images/png/edit 1.png",
text: "Edit profile",
),
),
commonDivider(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.helpandsupport);

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
@@ -932,11 +933,9 @@ class _CustomDropDownChexkBoxState extends State<CustomDropDownChexkBox> {
},
child: Container(
width: double.infinity,
height: 50,
padding: EdgeInsets.only(
right: 22,
left: 12,
),
// height: 50,
padding:
EdgeInsets.only(right: 22, left: 12, top: 14, bottom: 14),
decoration: BoxDecoration(
color: const Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: onDropTap.value
@@ -961,15 +960,17 @@ class _CustomDropDownChexkBoxState extends State<CustomDropDownChexkBox> {
children: [
if (widget.leadingImage != null) widget.leadingImage!,
const SizedBox(width: 12),
Text(
selectedValues.isEmpty
? widget.header
: selectedValues.join(', '),
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
Expanded(
child: Text(
selectedValues.isEmpty
? widget.header
: selectedValues.join(', '),
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
),
),
const Spacer(),
onDropTap.value
@@ -1010,8 +1011,6 @@ class _CustomDropDownChexkBoxState extends State<CustomDropDownChexkBox> {
}
}
class CustomDropDownCheckBox extends StatefulWidget {
const CustomDropDownCheckBox({
Key? key,

View File

@@ -414,6 +414,16 @@ Widget text10400white(String text) {
fontWeight: FontWeight.w400),
);
}
Widget text9400white(String text) {
return Text(
text,
style: TextStyle(
fontSize: 9.sp,
color: Colors.white,
fontFamily: 'Helvetica',
fontWeight: FontWeight.w400),
);
}
Widget text6400white(String text) {
return Text(

View File

@@ -182,7 +182,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
fontFamily: 'Cambria',
),
debugShowCheckedModeBanner: false,
initialRoute: RouteName.splashScreen,
initialRoute: RouteName.profiletabbusguest,
getPages: AppRoutes.appRoutes(),
),
designSize: const Size(390, 844),

View File

@@ -58,6 +58,8 @@ class RouteName {
static const String userchatpage = '/userchatpage';
static const String profiletab = '/profiletab';
static const String mynetwork = '/mynetwork';
static const String groupchatpage = '/groupchatpage';
@@ -120,4 +122,13 @@ class RouteName {
static const String verifygoogleapplepage = '/verifygoogleapplepage';
//profiletabIndGestUser
static const String profiletabindguest = '/profiletabindguest';
//profiletabBusGestUser
static const String profiletabbusguest = '/profiletabbusguest';
}

View File

@@ -39,6 +39,9 @@ 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/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';
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/View/BlockedUsers.dart';
@@ -507,5 +510,18 @@ class AppRoutes {
name: RouteName.profiletab,
page: () => ProfileTab(),
),
GetPage(
name: RouteName.profiletabindguest,
page: () => ProfileTabIndGuest(),
),
GetPage(
name: RouteName.profiletabbusguest,
page: () => profiletabBusGest(),
),
GetPage(
name: RouteName.mynetwork,
page: () => MyNetwork(),
),
];
}