conflict fixed
This commit is contained in:
BIN
assets/images/png/add 1.png
Normal file
BIN
assets/images/png/add 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 594 B |
BIN
assets/images/png/sidemenu/price-tag 1.png
Normal file
BIN
assets/images/png/sidemenu/price-tag 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 493 B |
BIN
assets/images/png/sidemenu/rightarrow.png
Normal file
BIN
assets/images/png/sidemenu/rightarrow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 215 B |
9
assets/images/svg/add 1.svg
Normal file
9
assets/images/svg/add 1.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 23 KiB |
@@ -113,4 +113,19 @@ class ApiUrls {
|
||||
|
||||
static const getGuestfollowers = "${baseUrl}get-guest-user-followers";
|
||||
static const getGuestfollowing = "${baseUrl}get-guest-user-following";
|
||||
|
||||
//community
|
||||
static const getpostcommunitylist = "${baseUrl}fetch-communities-with-tags";
|
||||
static const getpopulartagscommunity = "${baseUrl}fetch-popular-tags";
|
||||
|
||||
static const postnewtags = "${baseUrl}store-tags";
|
||||
static const postupload = "${baseUrl}store-post";
|
||||
|
||||
static const getuserpinlist = "${baseUrl}fetch-pinned-detail";
|
||||
|
||||
static const postusertag = "${baseUrl}pin-unpin";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Main_Screens/CalenderTab/CalenderTab.dart';
|
||||
import 'package:regroup/Main_Screens/Chats/View/chatsmainscreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Community.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/Community.dart';
|
||||
import 'package:regroup/Main_Screens/GroupTab/View/GroupTab.dart';
|
||||
import 'package:regroup/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart';
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
class CommunityListModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
CommunityListModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
CommunityListModel.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? id;
|
||||
int? iamPrincipalXid;
|
||||
int? manageCommunityXid;
|
||||
Community? community;
|
||||
|
||||
Data(
|
||||
{this.id, this.iamPrincipalXid, this.manageCommunityXid, this.community});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
iamPrincipalXid = json['iam_principal_xid'];
|
||||
manageCommunityXid = json['manage_community_xid'];
|
||||
community = json['community'] != null
|
||||
? new Community.fromJson(json['community'])
|
||||
: 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_community_xid'] = this.manageCommunityXid;
|
||||
if (this.community != null) {
|
||||
data['community'] = this.community!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Community {
|
||||
int? id;
|
||||
String? communityName;
|
||||
String? communityProfilePhoto;
|
||||
|
||||
Community({this.id, this.communityName, this.communityProfilePhoto});
|
||||
|
||||
Community.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
communityName = json['community_name'];
|
||||
communityProfilePhoto = json['community_profile_photo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['community_name'] = this.communityName;
|
||||
data['community_profile_photo'] = this.communityProfilePhoto;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
class PopulartagsListModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
PopulartagsListModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
PopulartagsListModel.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? id;
|
||||
String? name;
|
||||
int? tagPopularity;
|
||||
|
||||
Data({this.id, this.name, this.tagPopularity});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
tagPopularity = json['tag_popularity'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['tag_popularity'] = this.tagPopularity;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
class TagsMainModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
TagsMainModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
TagsMainModel.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? id;
|
||||
String? name;
|
||||
int? tagPopularity;
|
||||
|
||||
Data({this.id, this.name, this.tagPopularity});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
tagPopularity = json['tag_popularity'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['tag_popularity'] = this.tagPopularity;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
|
||||
// FollowersModel? communitytagssobj;
|
||||
|
||||
|
||||
class Communitygetmethod {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
|
||||
class Communitypostmethod {
|
||||
Communitypostmethod();
|
||||
|
||||
Future<ResponseData<dynamic>> postCreatedTag(updata) async {
|
||||
print("updata is $updata");
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postnewtags,
|
||||
);
|
||||
print("response is ${response.data}");
|
||||
print("response message is ${response.message}");
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> postUpload(updata) async {
|
||||
print("updata is $updata");
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postupload,
|
||||
);
|
||||
print("response is ${response.data}");
|
||||
print("response message is ${response.message}");
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
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/Community/Model/communitylistModel.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/Community/Model/populartagsListModel.dart';
|
||||
|
||||
class CommunityLsitApi {
|
||||
CommunityLsitApi();
|
||||
var data = "";
|
||||
Future<ResponseData<dynamic>> getPostinList() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.getpostcommunitylist,
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
print("success");
|
||||
CommunityListModel communitylistobj =
|
||||
CommunityListModel.fromJson(responseData);
|
||||
} else {
|
||||
// return ResponseData<dynamic>(
|
||||
// responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getPopulartagsList(updata) async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
'https://regroup.betadelivery.com/api/v1/fetch-popular-tags?manage_community_xid=$updata&name=');
|
||||
// '${ApiUrls.getpopulartagscommunity}?manage_community_xid=$updata&name=',
|
||||
|
||||
// );
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(response.data);
|
||||
if (responseData['status'] == "success") {
|
||||
print("success");
|
||||
PopulartagsListModel populartagslistobj =
|
||||
PopulartagsListModel.fromJson(responseData);
|
||||
} else {
|
||||
// return ResponseData<dynamic>(
|
||||
// responseData['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -1,355 +0,0 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/ImageUpload.dart';
|
||||
|
||||
import 'package:regroup/Utils/Common/sized_box.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 PostScreen extends StatefulWidget {
|
||||
const PostScreen({super.key});
|
||||
|
||||
@override
|
||||
State<PostScreen> createState() => _PostScreenState();
|
||||
}
|
||||
|
||||
class _PostScreenState extends State<PostScreen> {
|
||||
List<File?> bannerPath = [];
|
||||
bool isbannerAdded = false;
|
||||
var selectedContainerIndices = <int>{}.obs;
|
||||
|
||||
void toggleSelectedIndex(int index) {
|
||||
if (selectedContainerIndices.contains(index)) {
|
||||
selectedContainerIndices.remove(index);
|
||||
} else {
|
||||
selectedContainerIndices.add(index);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Create a post",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
|
||||
text16w400_FCFCFC("Caption"),
|
||||
|
||||
sizedBoxHeight(18.h),
|
||||
CustomTextFormField2(
|
||||
maxlines: 3,
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Media"),
|
||||
sizedBoxHeight(18.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
false,
|
||||
(result) {
|
||||
var file = File(result);
|
||||
|
||||
bannerPath.add(file);
|
||||
isbannerAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: DottedBorder(
|
||||
strokeWidth: 1,
|
||||
dashPattern: const [7, 4],
|
||||
borderType: BorderType.RRect,
|
||||
radius: Radius.circular(14.r),
|
||||
color: const Color(0xFF434A53),
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 130.h,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
borderColor: Colors.transparent,
|
||||
customWidget: bannerPath.isNotEmpty && isbannerAdded
|
||||
? Stack(children: [
|
||||
Image.file(
|
||||
bannerPath[0]!,
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
),
|
||||
Positioned(
|
||||
right: 5,
|
||||
bottom: 5,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
bannerPath.clear();
|
||||
isbannerAdded = false;
|
||||
setState(() {});
|
||||
},
|
||||
child: Container(
|
||||
width: 27,
|
||||
height: 27,
|
||||
decoration: ShapeDecoration(
|
||||
color: const Color(0xFF7E7E7E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5)),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
),
|
||||
])
|
||||
: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 16.h),
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
"assets/images/png/bi_download.png",
|
||||
height: 36.h,
|
||||
width: 36.w,
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
text14w400_FCFCFC("Upload image"),
|
||||
sizedBoxHeight(8.h),
|
||||
text8w400_8A8A8A(
|
||||
"Allowed file extensions: jpg, png, gif Max file size: 10 MB"),
|
||||
],
|
||||
),
|
||||
)),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Tags"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownTag1(
|
||||
header: "Enter tags",
|
||||
title: "Enter tags",
|
||||
listData: const [
|
||||
"#Race",
|
||||
"#Swimming",
|
||||
"#Cycle",
|
||||
"#Swimming",
|
||||
"#Race"
|
||||
],
|
||||
rowData: const [
|
||||
"23,233 Recently use tags",
|
||||
"15,123 Recently use tags",
|
||||
"15,123 Recently use tags",
|
||||
"15,123 Available tags",
|
||||
"15,123 Available tags"
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: const SizedBox()),
|
||||
// CustomTextFormField(
|
||||
// suffixIcon: Container(
|
||||
// height: 20.h,
|
||||
// width: 20.w,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/Frame 58575.png",
|
||||
// height: 20.h,
|
||||
// width: 20.w,
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ),
|
||||
// )),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
containerTile(text: "# Race", index: 0),
|
||||
containerTile(text: "# Swimming", index: 1),
|
||||
containerTile(text: "# Cycle", index: 2),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
containerTile(text: "# Race", index: 3),
|
||||
containerTile(text: "# Swimming", index: 4),
|
||||
containerTile(text: "# Cycle", index: 5),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
text16w400_FCFCFC("CTA Title"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomTextFormField(
|
||||
// validationMessage: "Enter a CTA Title",
|
||||
validator: (val) {
|
||||
if (val == null || val.isEmpty) {
|
||||
return 'Enter a CTA Title';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter()
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Post as"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: const ['Individual', 'Anonymous'],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: const SizedBox()),
|
||||
// CommonDropdownradioBtn(
|
||||
// hint: '', items: ['Individual', 'Anonymous']),
|
||||
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Post in"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownCheckBox(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: const [
|
||||
'Active alliance network',
|
||||
'Fitfam federation',
|
||||
'The athletic town',
|
||||
'Football fever'
|
||||
],
|
||||
onItemSelected: (p0) {},
|
||||
images: const [
|
||||
'assets/images/png/Rectangle 65.png',
|
||||
'assets/images/png/Rectangle 66.png',
|
||||
'assets/images/png/Rectangle 60.png',
|
||||
'assets/images/png/Rectangle 68.png'
|
||||
],
|
||||
leadingImage: const SizedBox()),
|
||||
// CommonDropdownCheckbox(
|
||||
// hint: '',
|
||||
// items: [
|
||||
// 'Active alliance network',
|
||||
// 'Fitfam federation',
|
||||
// 'The athletic town',
|
||||
// 'Football fever'
|
||||
// ],
|
||||
// images: [
|
||||
// 'assets/images/png/Rectangle 65.png',
|
||||
// 'assets/images/png/Rectangle 66.png',
|
||||
// 'assets/images/png/Rectangle 60.png',
|
||||
// 'assets/images/png/Rectangle 68.png'
|
||||
// ],
|
||||
// ),
|
||||
sizedBoxHeight(40.h),
|
||||
CommonBtn(
|
||||
text: 'Submit post',
|
||||
onTap: () {
|
||||
successBottomsheet();
|
||||
},
|
||||
),
|
||||
|
||||
sizedBoxHeight(150.h),
|
||||
]),
|
||||
),
|
||||
),
|
||||
]));
|
||||
}
|
||||
|
||||
void successBottomsheet() {
|
||||
Get.bottomSheet(Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(14.r),
|
||||
color: const Color(0xFF222935)),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.w),
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
||||
sizedBoxHeight(20.h),
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004082.png',
|
||||
width: 199.w,
|
||||
height: 158.h,
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text18w500Center_FCFCFC(
|
||||
'Your post has been succesfully uploaded'),
|
||||
sizedBoxHeight(20.h),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 216.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: const Color(0xFF434A53), width: 1),
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color.fromRGBO(255, 255, 255, 0.054),
|
||||
Color.fromRGBO(255, 255, 255, 0.072),
|
||||
],
|
||||
stops: [0.0233, 1.0],
|
||||
transform: GradientRotation(271.14 *
|
||||
(3.141592653589793 /
|
||||
180)), // Converting degrees to radians
|
||||
),
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
),
|
||||
child: Center(child: text14w400_FCFCFC('Check out')),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h)
|
||||
]))));
|
||||
}
|
||||
|
||||
Widget containerTile({
|
||||
required String text,
|
||||
required int index,
|
||||
}) {
|
||||
return Obx(() {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
toggleSelectedIndex(index);
|
||||
},
|
||||
child: Container(
|
||||
height: 35,
|
||||
decoration: BoxDecoration(
|
||||
color: selectedContainerIndices.contains(index)
|
||||
? const Color(0xFFD90B2E).withOpacity(0.4)
|
||||
: const Color(0xFFFFFFFF).withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: const Color(0xFFD90B2E), width: 1)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonBottomNavigationBar.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
@@ -35,7 +36,6 @@ class _CommunityScreenState extends State<CommunityScreen> {
|
||||
resizeToAvoidBottomInset: false,
|
||||
key: _scaffoldKey1,
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
// drawerEnableOpenDragGesture: false,
|
||||
drawer: SizedBox(width: 300.w, child: const SideMenu()),
|
||||
extendBody: true,
|
||||
appBar: AppBar(
|
||||
@@ -86,7 +86,8 @@ class _CommunityScreenState extends State<CommunityScreen> {
|
||||
sizedBoxWidth(16.w),
|
||||
],
|
||||
),
|
||||
body: Stack(clipBehavior: Clip.none, children: [
|
||||
body:
|
||||
Stack(clipBehavior: Clip.none, children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
@@ -101,7 +102,6 @@ class _CommunityScreenState extends State<CommunityScreen> {
|
||||
Expanded(
|
||||
child: DefaultTabController(
|
||||
length: 3,
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
const CommonTabBar(tabs: [
|
||||
@@ -132,33 +132,45 @@ class _CommunityScreenState extends State<CommunityScreen> {
|
||||
]))
|
||||
]),
|
||||
floatingActionButton: Container(
|
||||
height: 55.h,
|
||||
width: 55.w,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
height: 40.h,
|
||||
width: 164.w,
|
||||
decoration: BoxDecoration(
|
||||
// shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0x40000000), // Hex color with 40% opacity
|
||||
color: Color(0x40000000),
|
||||
offset: Offset(0, 6),
|
||||
blurRadius: 8,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: FloatingActionButton(
|
||||
onPressed: () {
|
||||
Get.toNamed(RouteName.postscreen);
|
||||
},
|
||||
backgroundColor: const Color(0xFFD90B2E),
|
||||
autofocus: true,
|
||||
shape: const CircleBorder(),
|
||||
child: Image.asset(
|
||||
"assets/images/png/iconamoon_edit-thin.png",
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
onPressed: () {
|
||||
Get.toNamed(RouteName.postscreen);
|
||||
},
|
||||
backgroundColor: const Color(0xFFD90B2E),
|
||||
autofocus: true,
|
||||
// shape: const OvalBorder(),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30.r),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// SvgPicture.asset('assets/images/svg/add 1.svg'),
|
||||
Image.asset('assets/images/png/add 1.png'),
|
||||
sizedBoxWidth(4.w),
|
||||
text16400white('Create posts')
|
||||
],
|
||||
)
|
||||
// Image.asset(
|
||||
// "assets/images/png/iconamoon_edit-thin.png",
|
||||
// height: 30.h,
|
||||
// width: 30.w,
|
||||
// ),
|
||||
),
|
||||
),
|
||||
|
||||
bottomNavigationBar: bottomnavigationbar(mainController),
|
||||
);
|
||||
}
|
||||
@@ -628,9 +640,7 @@ Widget normalcardtile2({
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
direction: ReactionsBoxAlignment.rtl,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
@@ -701,7 +711,6 @@ Widget announcecardtile({
|
||||
}
|
||||
}
|
||||
|
||||
// MediaQuery.of(context).size.height
|
||||
return Column(
|
||||
children: [
|
||||
commonGlassUIBlue(
|
||||
@@ -899,9 +908,7 @@ Widget announcecardtile({
|
||||
),
|
||||
Row(children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// Get.toNamed(RouteName.reactionview);
|
||||
},
|
||||
onTap: () {},
|
||||
child: stackReaction(number: '20', containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
@@ -1003,17 +1010,13 @@ Widget announcecardtile({
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
@@ -5,7 +5,7 @@ import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Community.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/Community.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
@@ -1,4 +1,6 @@
|
||||
import 'package:comment_tree/comment_tree.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';
|
||||
@@ -18,6 +20,8 @@ class PostDetailsScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
List<bool> _hideReplies = List.filled(5, true);
|
||||
// bool _hideReplies = true;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -50,60 +54,265 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
'Events'
|
||||
]),
|
||||
sizedBoxHeight(35.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 20.r,
|
||||
foregroundImage: const AssetImage(
|
||||
"assets/images/png/Ellipse 48.png",
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(15.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text12w400_FCFCFC_blur("Roger Saris"),
|
||||
text14w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text 😍"),
|
||||
text10w400_FCFCFC_blur("Reply. . . ")
|
||||
],
|
||||
),
|
||||
),
|
||||
ListView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: 2,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 12, horizontal: 16),
|
||||
child: CommentTreeWidget<Comment, Comment>(
|
||||
Comment(
|
||||
avatar: 'assets/images/png/Ellipse 52.png',
|
||||
userName: 'Krishna',
|
||||
content:
|
||||
'felangel made felangel/cubit_and_beyond public'),
|
||||
[
|
||||
Comment(
|
||||
avatar: 'assets/images/png/Ellipse 52.png',
|
||||
userName: 'Kishan',
|
||||
content: 'Sample comment from kishan'),
|
||||
Comment(
|
||||
avatar: 'assets/images/png/Ellipse 52.png',
|
||||
userName: 'Ram',
|
||||
content:
|
||||
'A Dart template generator which helps teams generator which helps teams generator which helps teams'),
|
||||
// Comment(
|
||||
// avatar: 'null',
|
||||
// userName: 'null',
|
||||
// content:
|
||||
// 'A Dart template generator which helps teams'),
|
||||
// Comment(
|
||||
// avatar: 'null',
|
||||
// userName: 'null',
|
||||
// content:
|
||||
// 'A Dart template generator which helps teams generator which helps teams '),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(50.h),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: CustomTextFormField(
|
||||
hintText: "Add comment",
|
||||
suffixIcon: SizedBox(
|
||||
height: 20.h,
|
||||
width: 25.w,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/iconoir_send.png",
|
||||
height: 20.h,
|
||||
width: 25.w,
|
||||
),
|
||||
),
|
||||
treeThemeData: const TreeThemeData(
|
||||
lineColor: Color(0xFFD90B2E), lineWidth: 2.5),
|
||||
avatarRoot: (context, data) => const PreferredSize(
|
||||
preferredSize: Size.fromRadius(18),
|
||||
child: CircleAvatar(
|
||||
radius: 18,
|
||||
backgroundColor: Colors.grey,
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/Ellipse 52.png',
|
||||
),
|
||||
),
|
||||
),
|
||||
avatarChild: (context, data) => const PreferredSize(
|
||||
preferredSize: Size.fromRadius(12),
|
||||
child: CircleAvatar(
|
||||
radius: 12,
|
||||
backgroundColor: Colors.grey,
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/Ellipse 52.png',
|
||||
),
|
||||
),
|
||||
),
|
||||
contentChild: (context, data) {
|
||||
print("printing");
|
||||
return data.userName! == "Ram" && _hideReplies[index]
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
_hideReplies[index] = false;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
child: const Text(
|
||||
"View more",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(85.h)
|
||||
]))
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8, horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[100],
|
||||
borderRadius:
|
||||
BorderRadius.circular(12)),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${data.userName}',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall
|
||||
?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
Text(
|
||||
'${data.content}',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall
|
||||
?.copyWith(
|
||||
fontWeight: FontWeight.w300,
|
||||
color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
color: Colors.grey[700],
|
||||
fontWeight: FontWeight.bold),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.only(top: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
Text('Like'),
|
||||
SizedBox(
|
||||
width: 24,
|
||||
),
|
||||
Text('Reply'),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
contentRoot: (context, data) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8, horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[100],
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'dangngocduc',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
Text(
|
||||
'${data.content}',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
fontWeight: FontWeight.w300,
|
||||
color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
color: Colors.grey[700],
|
||||
fontWeight: FontWeight.bold),
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.only(top: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
Text('Like'),
|
||||
SizedBox(
|
||||
width: 24,
|
||||
),
|
||||
Text('Reply'),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// Padding(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
// child: Column(children: [
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// CircleAvatar(
|
||||
// radius: 20.r,
|
||||
// foregroundImage: const AssetImage(
|
||||
// "assets/images/png/Ellipse 48.png",
|
||||
// ),
|
||||
// ),
|
||||
// sizedBoxWidth(15.w),
|
||||
// Expanded(
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// text12w400_FCFCFC_blur("Roger Saris"),
|
||||
// text14w400_FCFCFC(
|
||||
// "Lorem Ipsum has been the industry's standard dummy text 😍"),
|
||||
// text10w400_FCFCFC_blur("Reply. . . ")
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// sizedBoxHeight(50.h),
|
||||
// Align(
|
||||
// alignment: Alignment.bottomCenter,
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||
// child: Row(
|
||||
// children: <Widget>[
|
||||
// Expanded(
|
||||
// child: CustomTextFormField(
|
||||
// hintText: "Add comment",
|
||||
// suffixIcon: SizedBox(
|
||||
// height: 20.h,
|
||||
// width: 25.w,
|
||||
// child: Center(
|
||||
// child: Image.asset(
|
||||
// "assets/images/png/iconoir_send.png",
|
||||
// height: 20.h,
|
||||
// width: 25.w,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// )),
|
||||
// sizedBoxHeight(85.h)
|
||||
// ]))
|
||||
]))
|
||||
]));
|
||||
}
|
||||
@@ -333,7 +542,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
borderwidth: 0.9,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
borderRadius: BorderRadius.circular(100.r),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
@@ -349,7 +558,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
borderwidth: 0.9,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderRadius: BorderRadius.circular( 100),
|
||||
borderRadius: BorderRadius.circular(100.r),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
@@ -419,7 +628,8 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
hoverDuration:
|
||||
const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
1255
lib/Main_Screens/Community_HomePage/PostScreen.dart
Normal file
1255
lib/Main_Screens/Community_HomePage/PostScreen.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -131,9 +131,9 @@ class _AddCertificateState extends State<AddCertificate> {
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Add certifications",
|
||||
),
|
||||
body: Stack(children: [
|
||||
@@ -248,8 +248,8 @@ class _AddCertificateState extends State<AddCertificate> {
|
||||
width: double.infinity,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.30000001192092896),
|
||||
@@ -258,7 +258,7 @@ class _AddCertificateState extends State<AddCertificate> {
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
side: const BorderSide(
|
||||
width: 0.50,
|
||||
color: Color(0xFF7E7E7E)),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
@@ -292,7 +292,7 @@ class _AddCertificateState extends State<AddCertificate> {
|
||||
BorderRadius.circular(
|
||||
5)),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.delete_outline_outlined,
|
||||
color: Colors.white,
|
||||
))),
|
||||
@@ -337,8 +337,8 @@ class _AddCertificateState extends State<AddCertificate> {
|
||||
height: 167,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.30000001192092896),
|
||||
@@ -347,7 +347,7 @@ class _AddCertificateState extends State<AddCertificate> {
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
side: const BorderSide(
|
||||
width: 0.50,
|
||||
color: Color(0xFF7E7E7E)),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
|
||||
@@ -353,7 +353,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: fullNameController,
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
@@ -375,7 +375,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: userNameController,
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
@@ -400,7 +400,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||
datePicker(context, dateController),
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
child: Center(
|
||||
@@ -452,7 +452,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: locationController,
|
||||
leadingIcon: Container(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
|
||||
@@ -407,7 +407,7 @@ class _FollowersTabState extends State<FollowersTab> {
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
@@ -495,8 +495,6 @@ class _FollowingTabState extends State<FollowingTab> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
||||
var updata = "";
|
||||
Profilegetmethod().getFollowing(updata, streamController: searchcontroller);
|
||||
|
||||
@@ -750,7 +748,7 @@ class _FollowingTabState extends State<FollowingTab> {
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Center(
|
||||
|
||||
@@ -174,7 +174,7 @@ class _ContactUsState extends State<ContactUs> {
|
||||
hintText: "Enter query",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your full name ';
|
||||
return 'Enter your query';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
@@ -21,17 +21,17 @@ class _PrivacyPolicyState extends State<PrivacyPolicy> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Privacy policy",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: Profilegetmethod().getPrivacypolicy(),
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.hasError) {
|
||||
|
||||
@@ -59,10 +59,11 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PreferredSize(
|
||||
preferredSize: Size.fromHeight(80),
|
||||
preferredSize: const Size.fromHeight(80),
|
||||
child: AppBar(
|
||||
centerTitle: false,
|
||||
scrolledUnderElevation: 0.0,
|
||||
backgroundColor: Color(0xFF222935).withOpacity(0.50),
|
||||
backgroundColor: const Color(0xFF222935).withOpacity(0.50),
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 0,
|
||||
@@ -86,7 +87,7 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
fontFamily: 'Helvetica',
|
||||
fontSize: 20.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -96,7 +97,7 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
)
|
||||
: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
padding: const EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -112,7 +113,7 @@ class CommonAppbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
fontFamily: 'Helvetica',
|
||||
fontSize: 20.sp,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFFFCFCFC),
|
||||
color: const Color(0xFFFCFCFC),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -539,10 +539,12 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
||||
value: item,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
selectedValue.value = item;
|
||||
_textController.clear();
|
||||
widget.onItemSelected(item);
|
||||
onDropTap.value = !onDropTap.value;
|
||||
setState(() {
|
||||
selectedValue.value = item;
|
||||
_textController.clear();
|
||||
widget.onItemSelected(item);
|
||||
onDropTap.value = false; // Close the dropdown
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@@ -555,9 +557,12 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
||||
activeColor: Colors.white,
|
||||
groupValue: selectedValue.value,
|
||||
onChanged: (value) {
|
||||
selectedValue.value = value!;
|
||||
_textController.clear();
|
||||
widget.onItemSelected(value);
|
||||
setState(() {
|
||||
selectedValue.value = value!;
|
||||
_textController.clear();
|
||||
widget.onItemSelected(value);
|
||||
onDropTap.value = false; // Close the dropdown
|
||||
});
|
||||
},
|
||||
);
|
||||
}),
|
||||
@@ -597,9 +602,12 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
||||
activeColor: Colors.white,
|
||||
groupValue: selectedValue.value,
|
||||
onChanged: (value) {
|
||||
selectedValue.value = value!;
|
||||
_textController.clear();
|
||||
widget.onItemSelected(value);
|
||||
setState(() {
|
||||
selectedValue.value = value!;
|
||||
_textController.clear();
|
||||
widget.onItemSelected(value);
|
||||
onDropTap.value = false; // Close the dropdown
|
||||
});
|
||||
},
|
||||
);
|
||||
}),
|
||||
@@ -633,8 +641,11 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
if (_textController.text.trim().isNotEmpty) {
|
||||
selectedValue.value = _textController.text;
|
||||
widget.onItemSelected(_textController.text);
|
||||
setState(() {
|
||||
selectedValue.value = _textController.text;
|
||||
widget.onItemSelected(_textController.text);
|
||||
onDropTap.value = false; // Close the dropdown
|
||||
});
|
||||
}
|
||||
},
|
||||
child: const Text(
|
||||
@@ -667,7 +678,9 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
onDropTap.value = !onDropTap.value;
|
||||
setState(() {
|
||||
onDropTap.value = !onDropTap.value;
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
@@ -1031,7 +1044,7 @@ class CustomDropDownCheckBox extends StatefulWidget {
|
||||
final String header;
|
||||
final String title;
|
||||
final List<String> listData;
|
||||
final Function(String) onItemSelected;
|
||||
final Function(List<String>) onItemSelected;
|
||||
final List<String> images;
|
||||
final Widget? leadingImage;
|
||||
|
||||
@@ -1135,7 +1148,7 @@ class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
|
||||
} else {
|
||||
selectedValues.add(item);
|
||||
}
|
||||
widget.onItemSelected(selectedValues.join(', '));
|
||||
widget.onItemSelected(selectedValues);
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -1182,7 +1195,7 @@ class _CustomDropDownCheckBoxState extends State<CustomDropDownCheckBox> {
|
||||
selectedValues.remove(item);
|
||||
}
|
||||
widget.onItemSelected(
|
||||
selectedValues.join(', '));
|
||||
selectedValues);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -238,7 +238,7 @@ class _CustomTextFormField2State extends State<CustomTextFormField2> {
|
||||
void validateField(String value) {
|
||||
setState(() {
|
||||
widget.validationMessage = widget.validator?.call(value) ??
|
||||
(value.isEmpty ? "Empty value" : null);
|
||||
(value.isEmpty ? "" : null);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -333,15 +333,18 @@ class _CustomTextFormField2State extends State<CustomTextFormField2> {
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
validateField(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(5.h),
|
||||
Text(
|
||||
widget.validationMessage ?? '',
|
||||
style: TextStyle(color: Colors.red, fontSize: 12.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
widget.validationMessage == null
|
||||
? const SizedBox()
|
||||
: Text(
|
||||
widget.validationMessage ?? '',
|
||||
style: TextStyle(color: Colors.red, fontSize: 12.sp),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -450,10 +450,15 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/x-circle.png",
|
||||
height: 28.h,
|
||||
width: 28.w,
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/png/x-circle.png",
|
||||
height: 28.h,
|
||||
width: 28.w,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -466,7 +471,7 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
texttype: TextInputType.text,
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your full name ';
|
||||
return 'Enter your interest';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
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/Common/CommonButton.dart';
|
||||
@@ -66,7 +64,7 @@ class _SelectIndividualGroupState extends State<SelectIndividualGroup> {
|
||||
|
||||
final data = await Onboard().postGroups(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
// Get.back();
|
||||
print("groups selected");
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
|
||||
@@ -135,5 +135,14 @@ class RouteName {
|
||||
|
||||
static const String addcertificate = '/addusercertificate';
|
||||
|
||||
static const String viewalltags = '/viewalltags';
|
||||
|
||||
static const String viewallcommunitiespinned = '/viewallcommunitiespinned';
|
||||
|
||||
static const String viewalluserspinned = '/viewallusersspinned';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ import 'package:regroup/Main_Screens/Chats/View/groupchat.dart';
|
||||
import 'package:regroup/Main_Screens/Chats/View/newchatpage.dart';
|
||||
import 'package:regroup/Main_Screens/Chats/View/newgroup.dart';
|
||||
import 'package:regroup/Main_Screens/Chats/View/userchat.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Community.dart';
|
||||
import 'package:regroup/Main_Screens/Community/CycleScreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community/PostDetailScreen/View/PostDetailScreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community/PostDetailScreen/View/ReactionView.dart';
|
||||
import 'package:regroup/Main_Screens/Community/PostScreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/Community.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/CycleScreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/View/PostDetailScreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/PostDetailScreen/View/ReactionView.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/PostScreen.dart';
|
||||
import 'package:regroup/Main_Screens/ExploreDesign/DetailExplore.dart';
|
||||
import 'package:regroup/Main_Screens/ExploreDesign/ExploreScreen.dart';
|
||||
import 'package:regroup/Main_Screens/ExploreDesign/SearchGroup.dart';
|
||||
@@ -86,6 +86,7 @@ import 'package:regroup/sidemenu/Community/MyCommunity/Community_Info-Page/view/
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/View/CommunityDetails.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/View/MyCommunity.dart';
|
||||
import 'package:regroup/sidemenu/SavedPosts/SavedPosts.dart';
|
||||
import 'package:regroup/sidemenu/communities.dart';
|
||||
import 'package:regroup/sidemenu/sidemenu.dart';
|
||||
import 'package:regroup/Login/View/verifygoogleapple.dart';
|
||||
|
||||
@@ -109,6 +110,8 @@ import 'package:regroup/onboarding/forgotPass/View/ForgotPass.dart';
|
||||
import 'package:regroup/onboarding/onboarding1.dart';
|
||||
import 'package:regroup/onboarding/splashscreen.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
import 'package:regroup/sidemenu/tags.dart';
|
||||
import 'package:regroup/sidemenu/users.dart';
|
||||
|
||||
class AppRoutes {
|
||||
static appRoutes() => [
|
||||
@@ -519,5 +522,17 @@ class AppRoutes {
|
||||
name: RouteName.addcertificate,
|
||||
page: () => const AddCertificate(),
|
||||
),
|
||||
GetPage(
|
||||
name: RouteName.viewalltags,
|
||||
page: () => const Viewtags(),
|
||||
),
|
||||
GetPage(
|
||||
name: RouteName.viewallcommunitiespinned,
|
||||
page: () => const Communitiespinned(),
|
||||
),
|
||||
GetPage(
|
||||
name: RouteName.viewalluserspinned,
|
||||
page: () => const Viewtusertags(),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
219
lib/sidemenu/Model/userpinnedlist.dart
Normal file
219
lib/sidemenu/Model/userpinnedlist.dart
Normal file
@@ -0,0 +1,219 @@
|
||||
class UserpinnedModelList {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
UserpinnedModelList({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
UserpinnedModelList.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 {
|
||||
List<PinnedTag>? pinnedTag;
|
||||
List<PinnedCommunity>? pinnedCommunity;
|
||||
List<PinnedUser>? pinnedUser;
|
||||
|
||||
Data({this.pinnedTag, this.pinnedCommunity, this.pinnedUser});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
if (json['pinned_tag'] != null) {
|
||||
pinnedTag = <PinnedTag>[];
|
||||
json['pinned_tag'].forEach((v) {
|
||||
pinnedTag!.add(new PinnedTag.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['pinned_community'] != null) {
|
||||
pinnedCommunity = <PinnedCommunity>[];
|
||||
json['pinned_community'].forEach((v) {
|
||||
pinnedCommunity!.add(new PinnedCommunity.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['pinned_user'] != null) {
|
||||
pinnedUser = <PinnedUser>[];
|
||||
json['pinned_user'].forEach((v) {
|
||||
pinnedUser!.add(new PinnedUser.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.pinnedTag != null) {
|
||||
data['pinned_tag'] = this.pinnedTag!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.pinnedCommunity != null) {
|
||||
data['pinned_community'] =
|
||||
this.pinnedCommunity!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.pinnedUser != null) {
|
||||
data['pinned_user'] = this.pinnedUser!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class PinnedTag {
|
||||
int? id;
|
||||
int? manageTagsXid;
|
||||
Tag? tag;
|
||||
|
||||
PinnedTag({this.id, this.manageTagsXid, this.tag});
|
||||
|
||||
PinnedTag.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
manageTagsXid = json['manage_tags_xid'];
|
||||
tag = json['tag'] != null ? new Tag.fromJson(json['tag']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['manage_tags_xid'] = this.manageTagsXid;
|
||||
if (this.tag != null) {
|
||||
data['tag'] = this.tag!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Tag {
|
||||
int? id;
|
||||
String? name;
|
||||
|
||||
Tag({this.id, this.name});
|
||||
|
||||
Tag.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 PinnedCommunity {
|
||||
int? id;
|
||||
int? manageCommunitiesXid;
|
||||
Community? community;
|
||||
|
||||
PinnedCommunity({this.id, this.manageCommunitiesXid, this.community});
|
||||
|
||||
PinnedCommunity.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
manageCommunitiesXid = json['manage_communities_xid'];
|
||||
community = json['community'] != null
|
||||
? new Community.fromJson(json['community'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['manage_communities_xid'] = this.manageCommunitiesXid;
|
||||
if (this.community != null) {
|
||||
data['community'] = this.community!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Community {
|
||||
int? id;
|
||||
String? communityProfilePhoto;
|
||||
String? communityBannerImage;
|
||||
String? communityName;
|
||||
|
||||
Community(
|
||||
{this.id,
|
||||
this.communityProfilePhoto,
|
||||
this.communityBannerImage,
|
||||
this.communityName});
|
||||
|
||||
Community.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
communityProfilePhoto = json['community_profile_photo'];
|
||||
communityBannerImage = json['community_banner_image'];
|
||||
communityName = json['community_name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['community_profile_photo'] = this.communityProfilePhoto;
|
||||
data['community_banner_image'] = this.communityBannerImage;
|
||||
data['community_name'] = this.communityName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class PinnedUser {
|
||||
int? id;
|
||||
int? pinIamPrincipalXid;
|
||||
PinUser? pinUser;
|
||||
|
||||
PinnedUser({this.id, this.pinIamPrincipalXid, this.pinUser});
|
||||
|
||||
PinnedUser.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
pinIamPrincipalXid = json['pin_iam_principal_xid'];
|
||||
pinUser = json['pin_user'] != null
|
||||
? new PinUser.fromJson(json['pin_user'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['pin_iam_principal_xid'] = this.pinIamPrincipalXid;
|
||||
if (this.pinUser != null) {
|
||||
data['pin_user'] = this.pinUser!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class PinUser {
|
||||
int? id;
|
||||
String? userName;
|
||||
String? fullName;
|
||||
String? profilePhoto;
|
||||
|
||||
PinUser({this.id, this.userName, this.fullName, this.profilePhoto});
|
||||
|
||||
PinUser.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;
|
||||
}
|
||||
}
|
||||
227
lib/sidemenu/communities.dart
Normal file
227
lib/sidemenu/communities.dart
Normal file
@@ -0,0 +1,227 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:regroup/sidemenu/view_model/getmethod.dart';
|
||||
import 'package:regroup/sidemenu/view_model/postmethod.dart';
|
||||
|
||||
class Communitiespinned extends StatefulWidget {
|
||||
const Communitiespinned({super.key});
|
||||
|
||||
@override
|
||||
State<Communitiespinned> createState() => _Communitiespinned();
|
||||
}
|
||||
|
||||
class _Communitiespinned extends State<Communitiespinned> {
|
||||
late Future myfuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
myfuture = Sidegetmethod().getUserpinnedList();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Pinned interest",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFFC18948),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occured',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return userpinnedobj!.data!.pinnedCommunity!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
pinunpinCommunities(int communityid) async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_communities_xid": communityid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildBody(context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
userpinnedobj!.data!.pinnedCommunity!.isEmpty
|
||||
? Center(child: text16400white("Pinned Communities"))
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const ScrollPhysics(),
|
||||
itemCount: userpinnedobj!.data!.pinnedCommunity!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final commnityid = userpinnedobj!
|
||||
.data!.pinnedCommunity![index].manageCommunitiesXid!;
|
||||
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: commonGlassUI(
|
||||
borderwidth: 0.9,
|
||||
width: double.infinity,
|
||||
height: 101.h,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.w, vertical: 16.h),
|
||||
child: Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 65.h,
|
||||
width: 65.h,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
// color: Colors.amber,
|
||||
),
|
||||
child:
|
||||
// Center(
|
||||
// child: Image.asset(imagepath, fit: BoxFit.cover)),
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![
|
||||
index]
|
||||
.community!
|
||||
.communityProfilePhoto ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityProfilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/sidemenu/rowing 1 (traced).png',
|
||||
),
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![
|
||||
index]
|
||||
.community!
|
||||
.communityProfilePhoto!),
|
||||
)),
|
||||
sizedBoxWidth(13.w),
|
||||
userpinnedobj!.data!.pinnedCommunity![index]
|
||||
.community!.communityName ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityName!
|
||||
.isEmpty
|
||||
? text18w700_FCFCFC('Regroup')
|
||||
: SizedBox(
|
||||
width: 200.w,
|
||||
child: text18w700_FCFCFC(
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityName!),
|
||||
),
|
||||
// ),
|
||||
Spacer(),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
pinunpinCommunities(commnityid);
|
||||
userpinnedobj!.data!.pinnedCommunity!
|
||||
.removeWhere((item) =>
|
||||
item.manageCommunitiesXid ==
|
||||
commnityid);
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
width: 19,
|
||||
height: 19,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,15 @@
|
||||
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/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/base_manager.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:regroup/sidemenu/view_model/getmethod.dart';
|
||||
import 'package:regroup/sidemenu/view_model/postmethod.dart';
|
||||
|
||||
class SideMenu extends StatefulWidget {
|
||||
const SideMenu({super.key});
|
||||
@@ -14,9 +19,13 @@ class SideMenu extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _SideMenuState extends State<SideMenu> {
|
||||
late Future myfuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
myfuture = Sidegetmethod().getUserpinnedList();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -54,7 +63,17 @@ class _SideMenuState extends State<SideMenu> {
|
||||
Color sideBarBackgroundColor = const Color(0xFF222935);
|
||||
Color whitecolor = Colors.white;
|
||||
|
||||
var selectedIndices = <int>{}.obs;
|
||||
// var selectedIndices = <int>{}.obs;
|
||||
|
||||
// void toggleSelectedIndex(int index) {
|
||||
// if (selectedIndices.contains(index)) {
|
||||
// selectedIndices.remove(index);
|
||||
// } else {
|
||||
// selectedIndices.add(index);
|
||||
// }
|
||||
// }
|
||||
|
||||
final RxSet<int> selectedIndices = <int>{}.obs;
|
||||
|
||||
void toggleSelectedIndex(int index) {
|
||||
if (selectedIndices.contains(index)) {
|
||||
@@ -64,179 +83,542 @@ class _SideMenuState extends State<SideMenu> {
|
||||
}
|
||||
}
|
||||
|
||||
final RxSet<int> selectedIndicescommunity = <int>{}.obs;
|
||||
|
||||
void toggleSelectedIndexComunity(int index) {
|
||||
if (selectedIndicescommunity.contains(index)) {
|
||||
selectedIndicescommunity.remove(index);
|
||||
} else {
|
||||
selectedIndicescommunity.add(index);
|
||||
}
|
||||
}
|
||||
|
||||
final RxSet<int> selectedIndicesuser = <int>{}.obs;
|
||||
|
||||
void toggleSelectedIndexUser(int index) {
|
||||
if (selectedIndicesuser.contains(index)) {
|
||||
selectedIndicesuser.remove(index);
|
||||
} else {
|
||||
selectedIndicesuser.add(index);
|
||||
}
|
||||
}
|
||||
|
||||
pinunpinTag(int tagid) async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_tags_xid": tagid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
toggleSelectedIndex(tagid);
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
pinunpinCommunities(int communityid) async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_communities_xid": communityid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
toggleSelectedIndexComunity(communityid);
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
pinunpinUser(int userid) async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"pin_iam_principal_xid": userid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
toggleSelectedIndexUser(userid);
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
body: Column(
|
||||
children: [
|
||||
sizedBoxHeight(50.h),
|
||||
Expanded(
|
||||
child: ListView(children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: text16w400_FCFCFC("My pinned content"),
|
||||
),
|
||||
const Spacer(),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFFC18948),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occured',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("Tags"),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mycommunity);
|
||||
},
|
||||
child: text14w400_FCFCFC("View all")),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return userpinnedobj!.data!.isBlank!
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBody(context) {
|
||||
return Column(
|
||||
children: [
|
||||
sizedBoxHeight(50.h),
|
||||
Expanded(
|
||||
child: ListView(physics: ScrollPhysics(), children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mycommunity);
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("My communities"),
|
||||
sizedBoxWidth(4.w),
|
||||
Image.asset('assets/images/png/sidemenu/rightarrow.png')
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
firstRowTile(
|
||||
text: "Row bridge",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/rowing 1 (traced).png",
|
||||
index: 4),
|
||||
firstRowTile(
|
||||
text: "Advice",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/solar_cloud-outline.png",
|
||||
index: 5),
|
||||
firstRowTile(
|
||||
text: "Crush",
|
||||
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
|
||||
index: 6),
|
||||
firstRowTile(
|
||||
text: "Row bridge",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/rowing 1 (traced).png",
|
||||
index: 7),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("Communities"),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mycommunity);
|
||||
},
|
||||
child: text14w400_FCFCFC("View all")),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
firstRowTile(
|
||||
text: "Row bridge",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/rowing 1 (traced).png",
|
||||
index: 4),
|
||||
firstRowTile(
|
||||
text: "Advice",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/solar_cloud-outline.png",
|
||||
index: 5),
|
||||
firstRowTile(
|
||||
text: "Crush",
|
||||
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
|
||||
index: 6),
|
||||
firstRowTile(
|
||||
text: "Row bridge",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/rowing 1 (traced).png",
|
||||
index: 7),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("Users"),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.mycommunity);
|
||||
},
|
||||
child: text14w400_FCFCFC("View all")),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
firstRowTile(
|
||||
text: "Row bridge",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/rowing 1 (traced).png",
|
||||
index: 8),
|
||||
firstRowTile(
|
||||
text: "Advice",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/solar_cloud-outline.png",
|
||||
index: 9),
|
||||
firstRowTile(
|
||||
text: "Crush",
|
||||
leadingimage: "assets/images/png/sidemenu/Vector (4).png",
|
||||
index: 10),
|
||||
firstRowTile(
|
||||
text: "Row bridge",
|
||||
leadingimage:
|
||||
"assets/images/png/sidemenu/rowing 1 (traced).png",
|
||||
index: 11),
|
||||
sizedBoxHeight(18.h),
|
||||
sizedBoxHeight(80.h),
|
||||
]),
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
const Spacer(),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: text16w400_FCFCFC("My pinned content"),
|
||||
),
|
||||
const Spacer(),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("interest"),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.viewalltags);
|
||||
},
|
||||
child: text14w400_FCFCFC("View all")),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
userpinnedobj!.data!.pinnedTag!.isEmpty
|
||||
? Center(child: text16400white("Pin tags"))
|
||||
: SizedBox(
|
||||
height: 200.h,
|
||||
child:
|
||||
// Obx( () {
|
||||
// return
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: userpinnedobj!.data!.pinnedTag!.take(5).length,
|
||||
itemBuilder: (context, index) {
|
||||
final tagid = userpinnedobj!
|
||||
.data!.pinnedTag![index].manageTagsXid!;
|
||||
|
||||
return ListTile(
|
||||
leading: commonContainer(
|
||||
width: 29.w,
|
||||
height: 29.h,
|
||||
borderwidth: 0.9,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/sidemenu/rowing 1 (traced).png',
|
||||
width: 13.w,
|
||||
height: 13.h,
|
||||
),
|
||||
)),
|
||||
title: userpinnedobj!.data!.pinnedTag![index].tag ==
|
||||
null ||
|
||||
userpinnedobj!.data!.pinnedTag![index].tag!
|
||||
.name!.isEmpty
|
||||
? text14w400_FCFCFC('')
|
||||
: text14w400_FCFCFC(userpinnedobj!
|
||||
.data!.pinnedTag![index].tag!.name!),
|
||||
trailing: InkWell(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
pinunpinTag(tagid);
|
||||
userpinnedobj!.data!.pinnedTag!.removeWhere(
|
||||
(item) => item.manageTagsXid == tagid);
|
||||
});
|
||||
|
||||
// toggleSelectedIndex(tagid);
|
||||
},
|
||||
child:
|
||||
// Obx(
|
||||
// () {
|
||||
// return selectedIndices.contains(tagid)
|
||||
// ?
|
||||
// Image.asset(
|
||||
// "assets/images/png/sidemenu/f7_pin-fill (1).png",
|
||||
// width: 19,
|
||||
// height: 19,
|
||||
// )
|
||||
// :
|
||||
Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
width: 19,
|
||||
height: 19,
|
||||
),
|
||||
// },
|
||||
// ),
|
||||
),
|
||||
// onTap: () {},
|
||||
);
|
||||
},
|
||||
),
|
||||
// }
|
||||
|
||||
// )
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("Communities"),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.viewallcommunitiespinned);
|
||||
},
|
||||
child: text14w400_FCFCFC("View all")),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
userpinnedobj!.data!.pinnedCommunity!.isEmpty
|
||||
? Center(child: text16400white("Pin communities"))
|
||||
: SizedBox(
|
||||
height: 200.h,
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount:
|
||||
userpinnedobj!.data!.pinnedCommunity!.take(5).length,
|
||||
itemBuilder: (context, index) {
|
||||
final commnityid = userpinnedobj!.data!
|
||||
.pinnedCommunity![index].manageCommunitiesXid!;
|
||||
|
||||
return ListTile(
|
||||
leading: Container(
|
||||
width: 29.w,
|
||||
height: 29.h,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
// color: Colors.amber,
|
||||
),
|
||||
child:
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityProfilePhoto ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityProfilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/sidemenu/rowing 1 (traced).png',
|
||||
),
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityProfilePhoto!),
|
||||
)
|
||||
|
||||
),
|
||||
title: userpinnedobj!.data!.pinnedCommunity![index]
|
||||
.community ==
|
||||
null ||
|
||||
userpinnedobj!.data!.pinnedCommunity![index]
|
||||
.community!.communityName!.isEmpty
|
||||
? text14w400_FCFCFC('')
|
||||
: text14w400_FCFCFC(userpinnedobj!
|
||||
.data!
|
||||
.pinnedCommunity![index]
|
||||
.community!
|
||||
.communityName!),
|
||||
trailing: InkWell(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
pinunpinCommunities(commnityid);
|
||||
userpinnedobj!.data!.pinnedCommunity!
|
||||
.removeWhere((item) =>
|
||||
item.manageCommunitiesXid ==
|
||||
commnityid);
|
||||
});
|
||||
|
||||
// toggleSelectedIndex(tagid);
|
||||
},
|
||||
// () {
|
||||
// pinunpinTag(tagid);
|
||||
// // toggleSelectedIndex(tagid);
|
||||
// },
|
||||
child: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
width: 19,
|
||||
height: 19,
|
||||
),
|
||||
// Obx(
|
||||
// () {
|
||||
// return selectedIndicescommunity.contains(tagid)
|
||||
// ? Image.asset(
|
||||
// "assets/images/png/sidemenu/f7_pin-fill (1).png",
|
||||
// width: 19,
|
||||
// height: 19,
|
||||
// )
|
||||
// : Image.asset(
|
||||
// "assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
// width: 19,
|
||||
// height: 19,
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
width: 1.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC("Users"),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.viewalluserspinned);
|
||||
},
|
||||
child: text14w400_FCFCFC("View all")),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
userpinnedobj!.data!.pinnedUser!.isEmpty
|
||||
? Center(child: text16400white("Pin users"))
|
||||
: SizedBox(
|
||||
height: 200.h,
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount:
|
||||
userpinnedobj!.data!.pinnedUser!.take(5).length,
|
||||
itemBuilder: (context, index) {
|
||||
final userid = userpinnedobj!
|
||||
.data!.pinnedUser![index].pinIamPrincipalXid!;
|
||||
|
||||
return ListTile(
|
||||
leading: commonContainer(
|
||||
width: 29.w,
|
||||
height: 29.h,
|
||||
borderwidth: 0.9,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: userpinnedobj!.data!.pinnedUser![index]
|
||||
.pinUser!.profilePhoto ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedUser![index]
|
||||
.pinUser!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? Image.asset(
|
||||
'assets/images/png/sidemenu/rowing 1 (traced).png',
|
||||
width: 13.w,
|
||||
height: 13.h,
|
||||
)
|
||||
: Image.network(
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedUser![index]
|
||||
.pinUser!
|
||||
.profilePhoto!,
|
||||
width: 13.w,
|
||||
height: 13.h,
|
||||
errorBuilder:
|
||||
(context, error, stackTrace) {
|
||||
// Error handling when image fails to load
|
||||
return Image.asset(
|
||||
'assets/images/png/sidemenu/rowing 1 (traced).png',
|
||||
width: 13.w,
|
||||
height: 13.h,
|
||||
);
|
||||
},
|
||||
))),
|
||||
title: userpinnedobj!.data!.pinnedUser![index]
|
||||
.pinUser!.fullName ==
|
||||
null ||
|
||||
userpinnedobj!.data!.pinnedUser![index]
|
||||
.pinUser!.fullName!.isEmpty
|
||||
? text14w400_FCFCFC('')
|
||||
: text14w400_FCFCFC(userpinnedobj!
|
||||
.data!.pinnedUser![index].pinUser!.fullName!),
|
||||
trailing: InkWell(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
pinunpinUser(userid);
|
||||
userpinnedobj!.data!.pinnedUser!.removeWhere(
|
||||
(item) =>
|
||||
item.pinIamPrincipalXid == userid);
|
||||
});
|
||||
|
||||
// toggleSelectedIndex(tagid);
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
width: 19,
|
||||
height: 19,
|
||||
),
|
||||
// Obx(
|
||||
// () {
|
||||
// return selectedIndicesuser.contains(userid)
|
||||
// ? Image.asset(
|
||||
// "assets/images/png/sidemenu/f7_pin-fill (1).png",
|
||||
// width: 19,
|
||||
// height: 19,
|
||||
// )
|
||||
// : Image.asset(
|
||||
// "assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
// width: 19,
|
||||
// height: 19,
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(18.h),
|
||||
sizedBoxHeight(80.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget firstRowTile({
|
||||
|
||||
178
lib/sidemenu/tags.dart
Normal file
178
lib/sidemenu/tags.dart
Normal file
@@ -0,0 +1,178 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:regroup/sidemenu/view_model/getmethod.dart';
|
||||
import 'package:regroup/sidemenu/view_model/postmethod.dart';
|
||||
|
||||
class Viewtags extends StatefulWidget {
|
||||
const Viewtags({super.key});
|
||||
|
||||
@override
|
||||
State<Viewtags> createState() => _ViewtagsState();
|
||||
}
|
||||
|
||||
class _ViewtagsState extends State<Viewtags> {
|
||||
late Future myfuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
myfuture = Sidegetmethod().getUserpinnedList();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Pinned interest",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFFC18948),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occured',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return userpinnedobj!.data!.pinnedTag!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
pinunpinTag(int tagid) async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"manage_tags_xid": tagid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildBody(context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
userpinnedobj!.data!.pinnedTag!.isEmpty
|
||||
? Center(child: text16400white("Pin tags"))
|
||||
: ListView.separated(
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 1,
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
physics: const ScrollPhysics(),
|
||||
itemCount: userpinnedobj!.data!.pinnedTag!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tagid =
|
||||
userpinnedobj!.data!.pinnedTag![index].manageTagsXid!;
|
||||
return ListTile(
|
||||
leading: commonContainer(
|
||||
width: 29.w,
|
||||
height: 29.h,
|
||||
borderwidth: 0.9,
|
||||
boxShape: BoxShape.circle,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/sidemenu/price-tag 1.png',
|
||||
width: 13.w,
|
||||
height: 13.h,
|
||||
),
|
||||
)),
|
||||
title: userpinnedobj!.data!.pinnedTag![index].tag ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!.pinnedTag![index].tag!.name!.isEmpty
|
||||
? text14w400_FCFCFC('')
|
||||
: text14w400_FCFCFC(userpinnedobj!
|
||||
.data!.pinnedTag![index].tag!.name!),
|
||||
trailing: InkWell(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
pinunpinTag(tagid);
|
||||
userpinnedobj!.data!.pinnedTag!.removeWhere(
|
||||
(item) => item.manageTagsXid == tagid);
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
width: 19,
|
||||
height: 19,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(
|
||||
thickness: 1,
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
203
lib/sidemenu/users.dart
Normal file
203
lib/sidemenu/users.dart
Normal file
@@ -0,0 +1,203 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:regroup/sidemenu/view_model/getmethod.dart';
|
||||
import 'package:regroup/sidemenu/view_model/postmethod.dart';
|
||||
|
||||
class Viewtusertags extends StatefulWidget {
|
||||
const Viewtusertags({super.key});
|
||||
|
||||
@override
|
||||
State<Viewtusertags> createState() => _ViewtusertagsState();
|
||||
}
|
||||
|
||||
class _ViewtusertagsState extends State<Viewtusertags> {
|
||||
late Future myfuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
myfuture = Sidegetmethod().getUserpinnedList();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Pinned users",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Color(0xFFC18948),
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occured',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
return userpinnedobj!.data!.pinnedUser!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: _buildBody(context);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No Data Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
pinunpinUser(int userid) async {
|
||||
utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"pin_iam_principal_xid": userid,
|
||||
};
|
||||
final data = await SidebarTags().postUserpin(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildBody(context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
userpinnedobj!.data!.pinnedUser!.isEmpty
|
||||
? Center(child: text16400white("Pin tags"))
|
||||
: ListView.separated(
|
||||
separatorBuilder: (context, index) {
|
||||
return Divider(
|
||||
thickness: 1,
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
physics: const ScrollPhysics(),
|
||||
itemCount: userpinnedobj!.data!.pinnedUser!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tagid =
|
||||
userpinnedobj!.data!.pinnedUser![index].pinIamPrincipalXid!;
|
||||
return ListTile(
|
||||
leading:
|
||||
Container(
|
||||
height: 65.h,
|
||||
width: 65.h,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
// color: Colors.amber,
|
||||
),
|
||||
child:
|
||||
// Center(
|
||||
// child: Image.asset(imagepath, fit: BoxFit.cover)),
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedUser![
|
||||
index]
|
||||
.pinUser!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedUser![index]
|
||||
.pinUser!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage: AssetImage(
|
||||
'assets/images/png/sidemenu/rowing 1 (traced).png',
|
||||
),
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
userpinnedobj!
|
||||
.data!
|
||||
.pinnedUser![
|
||||
index]
|
||||
.pinUser!
|
||||
.profilePhoto!),
|
||||
)),
|
||||
title: userpinnedobj!.data!.pinnedUser![index].pinUser ==
|
||||
null ||
|
||||
userpinnedobj!
|
||||
.data!.pinnedUser![index].pinUser!.fullName!.isEmpty
|
||||
? text14w400_FCFCFC('')
|
||||
: text14w400_FCFCFC(userpinnedobj!
|
||||
.data!.pinnedUser![index].pinUser!.fullName!),
|
||||
trailing: InkWell(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
pinunpinUser(tagid);
|
||||
userpinnedobj!.data!.pinnedUser!.removeWhere(
|
||||
(item) => item.pinIamPrincipalXid == tagid);
|
||||
});
|
||||
},
|
||||
child: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
width: 19,
|
||||
height: 19,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(
|
||||
thickness: 1,
|
||||
color: const Color.fromRGBO(255, 255, 255, 0.3),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,10 @@ 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/sidemenu/Model/joineGroupsModel.dart';
|
||||
import 'package:regroup/sidemenu/Model/userpinnedlist.dart';
|
||||
|
||||
GetmyJoinedGroupsModel? joinedgroupsobj;
|
||||
|
||||
UserpinnedModelList? userpinnedobj;
|
||||
|
||||
class Sidegetmethod {
|
||||
|
||||
@@ -22,5 +23,17 @@ class Sidegetmethod {
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getUserpinnedList() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.getuserpinlist,
|
||||
// optionalpar: false
|
||||
);
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
userpinnedobj = UserpinnedModelList.fromJson(response.data);
|
||||
log(userpinnedobj!.data.toString());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
|
||||
class SidebarTags {
|
||||
SidebarTags();
|
||||
|
||||
|
||||
Future<ResponseData<dynamic>> postUserpin(updata) async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postusertag,
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
24
pubspec.lock
24
pubspec.lock
@@ -89,6 +89,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
comment_tree:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: comment_tree
|
||||
sha256: f99978c6f4a47f9aec284753cc10442e509851d7d86192b963db70e6873f2ddb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
connectivity_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -808,6 +816,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: nested
|
||||
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
nm:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -968,6 +984,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
provider:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: provider
|
||||
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
remove_emoji_input_formatter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -76,6 +76,7 @@ dependencies:
|
||||
sign_in_with_apple: any
|
||||
timer_button: ^2.1.1
|
||||
flutter_html: ^3.0.0-beta.2
|
||||
comment_tree: ^0.3.0
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user