Merge branch 'main' into commentTree
This commit is contained in:
BIN
assets/images/png/background.png
Normal file
BIN
assets/images/png/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 MiB |
BIN
assets/images/png/postSaved.png
Normal file
BIN
assets/images/png/postSaved.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 218 B |
@@ -241,7 +241,7 @@ class _CommonPostUIState extends State<CommonPostUI> {
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
Get.toNamed(RouteName.tagdetailscreen);
|
||||
},
|
||||
child: containertile(text: containerTitle[index])),
|
||||
);
|
||||
|
||||
@@ -126,10 +126,20 @@ class ApiUrls {
|
||||
|
||||
static const postusertag = "${baseUrl}pin-unpin";
|
||||
|
||||
|
||||
//comments
|
||||
static const getComments = "${baseUrl}fetch-comment-with-replied-comment";
|
||||
static const storeComments = "${baseUrl}store-comment";
|
||||
static const storeRepliesOnComments = "${baseUrl}reply-on-comment";
|
||||
static const deleteComments = "${baseUrl}delete-comment";
|
||||
static const deleteRepliesComments = "${baseUrl}delete-reply-on-comment";
|
||||
|
||||
static const getLikeicons= "${baseUrl}fetch-like-icons";
|
||||
|
||||
static const postLike = "${baseUrl}like-post";
|
||||
|
||||
static const getTagsdetails = "${baseUrl}fetch-post-by-tag";
|
||||
|
||||
static const postusersave = "${baseUrl}save-post";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,197 +1,212 @@
|
||||
class FeedPostModel {
|
||||
FeedPostModel({
|
||||
required this.status,
|
||||
required this.statusCode,
|
||||
required this.message,
|
||||
required this.data,
|
||||
});
|
||||
FeedPostModel({
|
||||
required this.status,
|
||||
required this.statusCode,
|
||||
required this.message,
|
||||
required this.data,
|
||||
});
|
||||
|
||||
final String? status;
|
||||
final int? statusCode;
|
||||
final String? message;
|
||||
final Data? data;
|
||||
|
||||
factory FeedPostModel.fromJson(Map<String, dynamic> json){
|
||||
return FeedPostModel(
|
||||
status: json["status"],
|
||||
statusCode: json["status_code"],
|
||||
message: json["message"],
|
||||
data: json["data"] == null ? null : Data.fromJson(json["data"]),
|
||||
);
|
||||
}
|
||||
final String? status;
|
||||
final int? statusCode;
|
||||
final String? message;
|
||||
final Data? data;
|
||||
|
||||
factory FeedPostModel.fromJson(Map<String, dynamic> json) {
|
||||
return FeedPostModel(
|
||||
status: json["status"],
|
||||
statusCode: json["status_code"],
|
||||
message: json["message"],
|
||||
data: json["data"] == null ? null : Data.fromJson(json["data"]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
Data({
|
||||
required this.pinnedCommunityPost,
|
||||
required this.pinnedUserPost,
|
||||
required this.pinnedTagsPost,
|
||||
});
|
||||
Data({
|
||||
required this.pinnedCommunityPost,
|
||||
required this.pinnedUserPost,
|
||||
required this.pinnedTagsPost,
|
||||
});
|
||||
|
||||
final List<PinnedPost> pinnedCommunityPost;
|
||||
final List<PinnedPost> pinnedUserPost;
|
||||
final List<PinnedPost> pinnedTagsPost;
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json){
|
||||
return Data(
|
||||
pinnedCommunityPost: json["pinned_community_post"] == null ? [] : List<PinnedPost>.from(json["pinned_community_post"]!.map((x) => PinnedPost.fromJson(x))),
|
||||
pinnedUserPost: json["pinned_user_post"] == null ? [] : List<PinnedPost>.from(json["pinned_user_post"]!.map((x) => PinnedPost.fromJson(x))),
|
||||
pinnedTagsPost: json["pinned_tags_post"] == null ? [] : List<PinnedPost>.from(json["pinned_tags_post"]!.map((x) => PinnedPost.fromJson(x))),
|
||||
);
|
||||
}
|
||||
final List<PinnedPost> pinnedCommunityPost;
|
||||
final List<PinnedPost> pinnedUserPost;
|
||||
final List<PinnedPost> pinnedTagsPost;
|
||||
|
||||
factory Data.fromJson(Map<String, dynamic> json) {
|
||||
return Data(
|
||||
pinnedCommunityPost: json["pinned_community_post"] == null
|
||||
? []
|
||||
: List<PinnedPost>.from(json["pinned_community_post"]!
|
||||
.map((x) => PinnedPost.fromJson(x))),
|
||||
pinnedUserPost: json["pinned_user_post"] == null
|
||||
? []
|
||||
: List<PinnedPost>.from(
|
||||
json["pinned_user_post"]!.map((x) => PinnedPost.fromJson(x))),
|
||||
// pinnedTagsPost: json["pinned_tags_post"] == null ? [] : List<PinnedPost>.from(json["pinned_tags_post"]!.map((x) => PinnedPost.fromJson(x))),
|
||||
pinnedTagsPost: json["pinned_tags_post"] == null
|
||||
? []
|
||||
: List<PinnedPost>.from(json["pinned_tags_post"]!
|
||||
.expand((x) => x as List)
|
||||
.map((x) => PinnedPost.fromJson(x))),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class PinnedPost {
|
||||
PinnedPost({
|
||||
required this.id,
|
||||
required this.likecount,
|
||||
required this.tagsXid,
|
||||
required this.isILiked,
|
||||
required this.totalComment,
|
||||
required this.totalSave,
|
||||
required this.iamPrincipalXid,
|
||||
required this.postIn,
|
||||
required this.caption,
|
||||
required this.image,
|
||||
required this.manageTagsXids,
|
||||
required this.postAs,
|
||||
required this.ctaTitle,
|
||||
required this.ctaLink,
|
||||
required this.createdAt,
|
||||
required this.tagNames,
|
||||
required this.likeIcon,
|
||||
required this.iamPrincipal,
|
||||
required this.community,
|
||||
});
|
||||
PinnedPost({
|
||||
required this.id,
|
||||
required this.likecount,
|
||||
required this.tagsXid,
|
||||
required this.isILiked,
|
||||
required this.totalComment,
|
||||
required this.totalSave,
|
||||
required this.iamPrincipalXid,
|
||||
required this.postIn,
|
||||
required this.caption,
|
||||
required this.image,
|
||||
required this.manageTagsXids,
|
||||
required this.postAs,
|
||||
required this.ctaTitle,
|
||||
required this.ctaLink,
|
||||
required this.createdAt,
|
||||
required this.tagNames,
|
||||
required this.likeIcon,
|
||||
required this.iamPrincipal,
|
||||
required this.community,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? likecount;
|
||||
final List<int> tagsXid;
|
||||
final bool? isILiked;
|
||||
final int? totalComment;
|
||||
final int? totalSave;
|
||||
final int? iamPrincipalXid;
|
||||
final int? postIn;
|
||||
final String? caption;
|
||||
final String? image;
|
||||
final String? manageTagsXids;
|
||||
final String? postAs;
|
||||
final String? ctaTitle;
|
||||
final String? ctaLink;
|
||||
final DateTime? createdAt;
|
||||
final List<String> tagNames;
|
||||
final LikeIcon? likeIcon;
|
||||
final IamPrincipal? iamPrincipal;
|
||||
final Community? community;
|
||||
|
||||
factory PinnedPost.fromJson(Map<String, dynamic> json){
|
||||
return PinnedPost(
|
||||
id: json["id"],
|
||||
likecount: json["likecount"],
|
||||
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
|
||||
isILiked: json["is_i_liked"],
|
||||
totalComment: json["total_comment"],
|
||||
totalSave: json["total_save"],
|
||||
iamPrincipalXid: json["iam_principal_xid"],
|
||||
postIn: json["post_in"],
|
||||
caption: json["caption"],
|
||||
image: json["image"],
|
||||
manageTagsXids: json["manage_tags_xids"],
|
||||
postAs: json["post_as"],
|
||||
ctaTitle: json["cta_title"],
|
||||
ctaLink: json["cta_link"],
|
||||
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
|
||||
tagNames: json["tag_names"] == null ? [] : List<String>.from(json["tag_names"]!.map((x) => x)),
|
||||
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
|
||||
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
|
||||
community: json["community"] == null ? null : Community.fromJson(json["community"]),
|
||||
);
|
||||
}
|
||||
final int? id;
|
||||
final int? likecount;
|
||||
final List<int> tagsXid;
|
||||
final bool? isILiked;
|
||||
final int? totalComment;
|
||||
final int? totalSave;
|
||||
final int? iamPrincipalXid;
|
||||
final int? postIn;
|
||||
final String? caption;
|
||||
final String? image;
|
||||
final String? manageTagsXids;
|
||||
final String? postAs;
|
||||
final String? ctaTitle;
|
||||
final String? ctaLink;
|
||||
final DateTime? createdAt;
|
||||
final List<String> tagNames;
|
||||
final LikeIcon? likeIcon;
|
||||
final IamPrincipal? iamPrincipal;
|
||||
final Community? community;
|
||||
|
||||
factory PinnedPost.fromJson(Map<String, dynamic> json) {
|
||||
return PinnedPost(
|
||||
id: json["id"],
|
||||
likecount: json["likecount"],
|
||||
tagsXid: json["tags_xid"] == null
|
||||
? []
|
||||
: List<int>.from(json["tags_xid"]!.map((x) => x)),
|
||||
isILiked: json["is_i_liked"],
|
||||
totalComment: json["total_comment"],
|
||||
totalSave: json["total_save"],
|
||||
iamPrincipalXid: json["iam_principal_xid"],
|
||||
postIn: json["post_in"],
|
||||
caption: json["caption"],
|
||||
image: json["image"],
|
||||
manageTagsXids: json["manage_tags_xids"],
|
||||
postAs: json["post_as"],
|
||||
ctaTitle: json["cta_title"],
|
||||
ctaLink: json["cta_link"],
|
||||
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
|
||||
tagNames: json["tag_names"] == null
|
||||
? []
|
||||
: List<String>.from(json["tag_names"]!.map((x) => x)),
|
||||
likeIcon:
|
||||
json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
|
||||
iamPrincipal: json["iam_principal"] == null
|
||||
? null
|
||||
: IamPrincipal.fromJson(json["iam_principal"]),
|
||||
community: json["community"] == null
|
||||
? null
|
||||
: Community.fromJson(json["community"]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Community {
|
||||
Community({
|
||||
required this.id,
|
||||
required this.communityProfilePhoto,
|
||||
required this.communityName,
|
||||
});
|
||||
Community({
|
||||
required this.id,
|
||||
required this.communityProfilePhoto,
|
||||
required this.communityName,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String? communityProfilePhoto;
|
||||
final String? communityName;
|
||||
|
||||
factory Community.fromJson(Map<String, dynamic> json){
|
||||
return Community(
|
||||
id: json["id"],
|
||||
communityProfilePhoto: json["community_profile_photo"],
|
||||
communityName: json["community_name"],
|
||||
);
|
||||
}
|
||||
final int? id;
|
||||
final String? communityProfilePhoto;
|
||||
final String? communityName;
|
||||
|
||||
factory Community.fromJson(Map<String, dynamic> json) {
|
||||
return Community(
|
||||
id: json["id"],
|
||||
communityProfilePhoto: json["community_profile_photo"],
|
||||
communityName: json["community_name"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class IamPrincipal {
|
||||
IamPrincipal({
|
||||
required this.id,
|
||||
required this.principalTypeXid,
|
||||
required this.userName,
|
||||
required this.fullName,
|
||||
required this.profilePhoto,
|
||||
});
|
||||
IamPrincipal({
|
||||
required this.id,
|
||||
required this.principalTypeXid,
|
||||
required this.userName,
|
||||
required this.fullName,
|
||||
required this.profilePhoto,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? principalTypeXid;
|
||||
final String? userName;
|
||||
final String? fullName;
|
||||
final String? profilePhoto;
|
||||
|
||||
factory IamPrincipal.fromJson(Map<String, dynamic> json){
|
||||
return IamPrincipal(
|
||||
id: json["id"],
|
||||
principalTypeXid: json["principal_type_xid"],
|
||||
userName: json["user_name"],
|
||||
fullName: json["full_name"],
|
||||
profilePhoto: json["profile_photo"],
|
||||
);
|
||||
}
|
||||
final int? id;
|
||||
final int? principalTypeXid;
|
||||
final String? userName;
|
||||
final String? fullName;
|
||||
final String? profilePhoto;
|
||||
|
||||
factory IamPrincipal.fromJson(Map<String, dynamic> json) {
|
||||
return IamPrincipal(
|
||||
id: json["id"],
|
||||
principalTypeXid: json["principal_type_xid"],
|
||||
userName: json["user_name"],
|
||||
fullName: json["full_name"],
|
||||
profilePhoto: json["profile_photo"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class LikeIcon {
|
||||
LikeIcon({
|
||||
required this.likeIconsXid,
|
||||
required this.likeIcon,
|
||||
});
|
||||
LikeIcon({
|
||||
required this.likeIconsXid,
|
||||
required this.likeIcon,
|
||||
});
|
||||
|
||||
final int? likeIconsXid;
|
||||
final LikeIconClass? likeIcon;
|
||||
|
||||
factory LikeIcon.fromJson(Map<String, dynamic> json){
|
||||
return LikeIcon(
|
||||
likeIconsXid: json["like_icons_xid"],
|
||||
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
|
||||
);
|
||||
}
|
||||
final int? likeIconsXid;
|
||||
final LikeIconClass? likeIcon;
|
||||
|
||||
factory LikeIcon.fromJson(Map<String, dynamic> json) {
|
||||
return LikeIcon(
|
||||
likeIconsXid: json["like_icons_xid"],
|
||||
likeIcon: json["like_icon"] == null
|
||||
? null
|
||||
: LikeIconClass.fromJson(json["like_icon"]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class LikeIconClass {
|
||||
LikeIconClass({
|
||||
required this.id,
|
||||
required this.image,
|
||||
});
|
||||
LikeIconClass({
|
||||
required this.id,
|
||||
required this.image,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String? image;
|
||||
|
||||
factory LikeIconClass.fromJson(Map<String, dynamic> json){
|
||||
return LikeIconClass(
|
||||
id: json["id"],
|
||||
image: json["image"],
|
||||
);
|
||||
}
|
||||
final int? id;
|
||||
final String? image;
|
||||
|
||||
factory LikeIconClass.fromJson(Map<String, dynamic> json) {
|
||||
return LikeIconClass(
|
||||
id: json["id"],
|
||||
image: json["image"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class Datum {
|
||||
Datum({
|
||||
required this.id,
|
||||
required this.likecount,
|
||||
required this.isISaved,
|
||||
required this.tagsXid,
|
||||
required this.isILiked,
|
||||
required this.totalComment,
|
||||
@@ -39,14 +40,21 @@ class Datum {
|
||||
required this.ctaTitle,
|
||||
required this.ctaLink,
|
||||
required this.createdAt,
|
||||
required this.tagNames,
|
||||
required this.likeIcon,
|
||||
required this.totalViewCount,
|
||||
required this.totalReactionCount,
|
||||
required this.totalCommentCount,
|
||||
required this.totalImpressionCount,
|
||||
required this.totalPopularScore,
|
||||
required this.totalHoursAgo,
|
||||
required this.iamPrincipal,
|
||||
required this.community,
|
||||
required this.attachTags,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? likecount;
|
||||
final bool? isISaved;
|
||||
final List<int> tagsXid;
|
||||
final bool? isILiked;
|
||||
final int? totalComment;
|
||||
@@ -60,15 +68,22 @@ class Datum {
|
||||
final String? ctaTitle;
|
||||
final String? ctaLink;
|
||||
final DateTime? createdAt;
|
||||
final List<String> tagNames;
|
||||
final LikeIcon? likeIcon;
|
||||
final int? totalViewCount;
|
||||
final int? totalReactionCount;
|
||||
final int? totalCommentCount;
|
||||
final int? totalImpressionCount;
|
||||
final int? totalPopularScore;
|
||||
final int? totalHoursAgo;
|
||||
final IamPrincipal? iamPrincipal;
|
||||
final Community? community;
|
||||
final List<AttachTag> attachTags;
|
||||
|
||||
factory Datum.fromJson(Map<String, dynamic> json){
|
||||
return Datum(
|
||||
id: json["id"],
|
||||
likecount: json["likecount"],
|
||||
isISaved: json["is_i_saved"],
|
||||
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
|
||||
isILiked: json["is_i_liked"],
|
||||
totalComment: json["total_comment"],
|
||||
@@ -82,10 +97,58 @@ class Datum {
|
||||
ctaTitle: json["cta_title"],
|
||||
ctaLink: json["cta_link"],
|
||||
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
|
||||
tagNames: json["tag_names"] == null ? [] : List<String>.from(json["tag_names"]!.map((x) => x)),
|
||||
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
|
||||
totalViewCount: json["totalViewCount"],
|
||||
totalReactionCount: json["totalReactionCount"],
|
||||
totalCommentCount: json["totalCommentCount"],
|
||||
totalImpressionCount: json["totalImpressionCount"],
|
||||
totalPopularScore: json["totalPopularScore"],
|
||||
totalHoursAgo: json["totalHoursAgo"],
|
||||
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
|
||||
community: json["community"] == null ? null : Community.fromJson(json["community"]),
|
||||
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AttachTag {
|
||||
AttachTag({
|
||||
required this.managePostXid,
|
||||
required this.manageTagXid,
|
||||
required this.manageTag,
|
||||
});
|
||||
|
||||
final int? managePostXid;
|
||||
final int? manageTagXid;
|
||||
final ManageTag? manageTag;
|
||||
|
||||
factory AttachTag.fromJson(Map<String, dynamic> json){
|
||||
return AttachTag(
|
||||
managePostXid: json["manage_post_xid"],
|
||||
manageTagXid: json["manage_tag_xid"],
|
||||
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ManageTag {
|
||||
ManageTag({
|
||||
required this.id,
|
||||
required this.isPinned,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final bool? isPinned;
|
||||
final String? name;
|
||||
|
||||
factory ManageTag.fromJson(Map<String, dynamic> json){
|
||||
return ManageTag(
|
||||
id: json["id"],
|
||||
isPinned: json["is_pinned"],
|
||||
name: json["name"],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -115,6 +178,7 @@ class Community {
|
||||
class IamPrincipal {
|
||||
IamPrincipal({
|
||||
required this.id,
|
||||
required this.isUserPinned,
|
||||
required this.principalTypeXid,
|
||||
required this.userName,
|
||||
required this.fullName,
|
||||
@@ -122,14 +186,16 @@ class IamPrincipal {
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final bool? isUserPinned;
|
||||
final int? principalTypeXid;
|
||||
final String? userName;
|
||||
final dynamic fullName;
|
||||
final String? fullName;
|
||||
final String? profilePhoto;
|
||||
|
||||
factory IamPrincipal.fromJson(Map<String, dynamic> json){
|
||||
return IamPrincipal(
|
||||
id: json["id"],
|
||||
isUserPinned: json["is_user_pinned"],
|
||||
principalTypeXid: json["principal_type_xid"],
|
||||
userName: json["user_name"],
|
||||
fullName: json["full_name"],
|
||||
|
||||
64
lib/Main_Screens/Community/Model/fetchicons.dart
Normal file
64
lib/Main_Screens/Community/Model/fetchicons.dart
Normal file
@@ -0,0 +1,64 @@
|
||||
class FetchlikeIconsModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
FetchlikeIconsModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
FetchlikeIconsModel.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? image;
|
||||
|
||||
Data({this.id, this.image});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
image = json['image'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['image'] = this.image;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ReactionData {
|
||||
final int id;
|
||||
final String image;
|
||||
|
||||
ReactionData({required this.id, required this.image});
|
||||
|
||||
factory ReactionData.fromJson(Map<String, dynamic> json) {
|
||||
return ReactionData(
|
||||
id: json['id'],
|
||||
image: json['image'],
|
||||
);
|
||||
}
|
||||
}
|
||||
24
lib/Main_Screens/Community/ViewModel/getmethod.dart
Normal file
24
lib/Main_Screens/Community/ViewModel/getmethod.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
import 'package:regroup/Main_Screens/Community/Model/fetchicons.dart';
|
||||
|
||||
// FetchlikeIconsModel? likeiconsobj;
|
||||
|
||||
class Communityallgetmethod {
|
||||
|
||||
Future<ResponseData<dynamic>> getLikeicons() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.getLikeicons,
|
||||
// optionalpar: false
|
||||
);
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
// likeiconsobj = FetchlikeIconsModel.fromJson(response.data);
|
||||
// log(likeiconsobj!.data.toString());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
15
lib/Main_Screens/Community/ViewModel/postmethod.dart
Normal file
15
lib/Main_Screens/Community/ViewModel/postmethod.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
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>> postLikepost(updata) async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postLike,
|
||||
);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,489 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.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';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
|
||||
class CycleScreen extends StatefulWidget {
|
||||
const CycleScreen({super.key});
|
||||
|
||||
@override
|
||||
State<CycleScreen> createState() => _CycleScreenState();
|
||||
}
|
||||
|
||||
class _CycleScreenState extends State<CycleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Cycle",
|
||||
customActionWidget: Image.asset(
|
||||
"assets/images/png/sidemenu/f7_pin-fill.png",
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
)),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(children: [
|
||||
sizedBoxHeight(10.h),
|
||||
DefaultTabController(
|
||||
length: 2,
|
||||
// initialIndex: selectedIndex.value,
|
||||
child: Column(
|
||||
children: [
|
||||
const CommonTabBar(tabs: [
|
||||
Tab(
|
||||
text: 'Popular',
|
||||
),
|
||||
Tab(
|
||||
text: 'Latest',
|
||||
),
|
||||
]),
|
||||
SizedBox(
|
||||
height: 670.h,
|
||||
child: TabBarView(
|
||||
children: [
|
||||
cyclepopularTab(),
|
||||
cyclelatestTab(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
])
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
Widget cyclepopularTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
normalcardtile(
|
||||
profileImg: 'assets/images/png/Ellipse 52.png',
|
||||
title: 'Ryan Dorwat',
|
||||
mainImg: 'assets/images/png/img322.png',
|
||||
containerTitle: [
|
||||
'Football',
|
||||
'Teams player',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
sizedBoxHeight(30.h),
|
||||
normalcardtile(
|
||||
profileImg: 'assets/images/png/Ellipse 43.png',
|
||||
title: 'Edward Hackket',
|
||||
mainImg: 'assets/images/png/Rectangle 24.png',
|
||||
containerTitle: [
|
||||
'Cycle',
|
||||
'Marathon',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget cyclelatestTab() {
|
||||
return SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
normalcardtile(
|
||||
profileImg: 'assets/images/png/Ellipse 43.png',
|
||||
title: 'Edward Hackket',
|
||||
mainImg: 'assets/images/png/Rectangle 24.png',
|
||||
containerTitle: [
|
||||
'Cycle',
|
||||
'Marathon',
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
]),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget normalcardtile({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
required String mainImg,
|
||||
required List<String> containerTitle,
|
||||
}) {
|
||||
var mainImage = 'assets/images/png/uiw_like-o.png'.obs;
|
||||
void updateImage(String reaction) {
|
||||
if (reaction == 'like') {
|
||||
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
|
||||
} else if (reaction == 'heart') {
|
||||
mainImage.value = 'assets/images/png/heart 2.png';
|
||||
} else if (reaction == 'party') {
|
||||
mainImage.value = 'assets/images/png/party-popper 2.png';
|
||||
}
|
||||
}
|
||||
|
||||
return commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 570.h,
|
||||
borderwidth: 0,
|
||||
borderRadius: BorderRadius.circular( 1),
|
||||
customWidget: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: AssetImage(profileImg),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC('Active alliance network'),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC('1 Hour ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: SizedBox(
|
||||
height: 360.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
mainImg,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(20.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: containerTitle.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
},
|
||||
child: containertile(text: containerTitle[index])),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
|
||||
Row(children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.reactionview);
|
||||
},
|
||||
child: stackReaction(number: '20', containerImages: [
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
'assets/images/png/heart 2.png',
|
||||
'assets/images/png/party-popper 2.png'
|
||||
]),
|
||||
),
|
||||
const Spacer(),
|
||||
commonGlassUI(
|
||||
borderwidth: 0.43,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
borderRadius: BorderRadius.circular( 100),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('20'),
|
||||
sizedBoxWidth(20.w),
|
||||
commonGlassUI(
|
||||
borderwidth: 0.43,
|
||||
width: 30.w,
|
||||
height: 30.h,
|
||||
borderRadius: BorderRadius.circular( 100),
|
||||
opacity1: 0.05,
|
||||
opacity2: 0.06,
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('10'),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
return ReactionButton<String>(
|
||||
onReactionChanged: (reaction) {
|
||||
updateImage(reaction?.value ?? 'like');
|
||||
debugPrint('Selected value: ${reaction?.value}');
|
||||
},
|
||||
reactions: <Reaction<String>?>[
|
||||
Reaction<String>(
|
||||
value: 'like',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'heart',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'party',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
),
|
||||
],
|
||||
selectedReaction: Reaction<String>(
|
||||
value: 'like',
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
),
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 9,
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 8,
|
||||
itemScale: 0.4,
|
||||
itemSize: const Size(45, 45),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildReactionsPreviewIcon(String assetPath) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Image.asset(
|
||||
assetPath,
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildReactionsIcon(String assetPath) {
|
||||
return Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
assetPath,
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Like')
|
||||
],
|
||||
);
|
||||
}
|
||||
242
lib/Main_Screens/Community_HomePage/Model/tagdetailModel.dart
Normal file
242
lib/Main_Screens/Community_HomePage/Model/tagdetailModel.dart
Normal file
@@ -0,0 +1,242 @@
|
||||
class TagdetailsModel {
|
||||
TagdetailsModel({
|
||||
required this.status,
|
||||
required this.statusCode,
|
||||
required this.message,
|
||||
required this.data,
|
||||
});
|
||||
|
||||
final String? status;
|
||||
final int? statusCode;
|
||||
final String? message;
|
||||
final List<Datum> data;
|
||||
|
||||
factory TagdetailsModel.fromJson(Map<String, dynamic> json){
|
||||
return TagdetailsModel(
|
||||
status: json["status"],
|
||||
statusCode: json["status_code"],
|
||||
message: json["message"],
|
||||
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Datum {
|
||||
Datum({
|
||||
required this.id,
|
||||
required this.likecount,
|
||||
required this.isISaved,
|
||||
required this.tagsXid,
|
||||
required this.isILiked,
|
||||
required this.totalComment,
|
||||
required this.totalSave,
|
||||
required this.iamPrincipalXid,
|
||||
required this.postIn,
|
||||
required this.caption,
|
||||
required this.image,
|
||||
required this.manageTagsXids,
|
||||
required this.postAs,
|
||||
required this.ctaTitle,
|
||||
required this.ctaLink,
|
||||
required this.createdAt,
|
||||
required this.likeIcon,
|
||||
required this.totalViewCount,
|
||||
required this.totalReactionCount,
|
||||
required this.totalCommentCount,
|
||||
required this.totalImpressionCount,
|
||||
required this.totalPopularScore,
|
||||
required this.totalHoursAgo,
|
||||
required this.iamPrincipal,
|
||||
required this.community,
|
||||
required this.attachTags,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? likecount;
|
||||
final bool? isISaved;
|
||||
final List<int> tagsXid;
|
||||
final bool? isILiked;
|
||||
final int? totalComment;
|
||||
final int? totalSave;
|
||||
final int? iamPrincipalXid;
|
||||
final int? postIn;
|
||||
final String? caption;
|
||||
final String? image;
|
||||
final String? manageTagsXids;
|
||||
final String? postAs;
|
||||
final String? ctaTitle;
|
||||
final String? ctaLink;
|
||||
final DateTime? createdAt;
|
||||
final LikeIcon? likeIcon;
|
||||
final int? totalViewCount;
|
||||
final int? totalReactionCount;
|
||||
final int? totalCommentCount;
|
||||
final int? totalImpressionCount;
|
||||
final int? totalPopularScore;
|
||||
final int? totalHoursAgo;
|
||||
final IamPrincipal? iamPrincipal;
|
||||
final Community? community;
|
||||
final List<AttachTag> attachTags;
|
||||
|
||||
factory Datum.fromJson(Map<String, dynamic> json){
|
||||
return Datum(
|
||||
id: json["id"],
|
||||
likecount: json["likecount"],
|
||||
isISaved: json["is_i_saved"],
|
||||
tagsXid: json["tags_xid"] == null ? [] : List<int>.from(json["tags_xid"]!.map((x) => x)),
|
||||
isILiked: json["is_i_liked"],
|
||||
totalComment: json["total_comment"],
|
||||
totalSave: json["total_save"],
|
||||
iamPrincipalXid: json["iam_principal_xid"],
|
||||
postIn: json["post_in"],
|
||||
caption: json["caption"],
|
||||
image: json["image"],
|
||||
manageTagsXids: json["manage_tags_xids"],
|
||||
postAs: json["post_as"],
|
||||
ctaTitle: json["cta_title"],
|
||||
ctaLink: json["cta_link"],
|
||||
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
|
||||
likeIcon: json["likeIcon"] == null ? null : LikeIcon.fromJson(json["likeIcon"]),
|
||||
totalViewCount: json["totalViewCount"],
|
||||
totalReactionCount: json["totalReactionCount"],
|
||||
totalCommentCount: json["totalCommentCount"],
|
||||
totalImpressionCount: json["totalImpressionCount"],
|
||||
totalPopularScore: json["totalPopularScore"],
|
||||
totalHoursAgo: json["totalHoursAgo"],
|
||||
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
|
||||
community: json["community"] == null ? null : Community.fromJson(json["community"]),
|
||||
attachTags: json["attach_tags"] == null ? [] : List<AttachTag>.from(json["attach_tags"]!.map((x) => AttachTag.fromJson(x))),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AttachTag {
|
||||
AttachTag({
|
||||
required this.managePostXid,
|
||||
required this.manageTagXid,
|
||||
required this.manageTag,
|
||||
});
|
||||
|
||||
final int? managePostXid;
|
||||
final int? manageTagXid;
|
||||
final ManageTag? manageTag;
|
||||
|
||||
factory AttachTag.fromJson(Map<String, dynamic> json){
|
||||
return AttachTag(
|
||||
managePostXid: json["manage_post_xid"],
|
||||
manageTagXid: json["manage_tag_xid"],
|
||||
manageTag: json["manage_tag"] == null ? null : ManageTag.fromJson(json["manage_tag"]),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ManageTag {
|
||||
ManageTag({
|
||||
required this.id,
|
||||
required this.isPinned,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final bool? isPinned;
|
||||
final String? name;
|
||||
|
||||
factory ManageTag.fromJson(Map<String, dynamic> json){
|
||||
return ManageTag(
|
||||
id: json["id"],
|
||||
isPinned: json["is_pinned"],
|
||||
name: json["name"],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Community {
|
||||
Community({
|
||||
required this.id,
|
||||
required this.communityProfilePhoto,
|
||||
required this.communityName,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String? communityProfilePhoto;
|
||||
final String? communityName;
|
||||
|
||||
factory Community.fromJson(Map<String, dynamic> json){
|
||||
return Community(
|
||||
id: json["id"],
|
||||
communityProfilePhoto: json["community_profile_photo"],
|
||||
communityName: json["community_name"],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class IamPrincipal {
|
||||
IamPrincipal({
|
||||
required this.id,
|
||||
required this.isUserPinned,
|
||||
required this.principalTypeXid,
|
||||
required this.userName,
|
||||
required this.fullName,
|
||||
required this.profilePhoto,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final bool? isUserPinned;
|
||||
final int? principalTypeXid;
|
||||
final String? userName;
|
||||
final String? fullName;
|
||||
final String? profilePhoto;
|
||||
|
||||
factory IamPrincipal.fromJson(Map<String, dynamic> json){
|
||||
return IamPrincipal(
|
||||
id: json["id"],
|
||||
isUserPinned: json["is_user_pinned"],
|
||||
principalTypeXid: json["principal_type_xid"],
|
||||
userName: json["user_name"],
|
||||
fullName: json["full_name"],
|
||||
profilePhoto: json["profile_photo"],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class LikeIcon {
|
||||
LikeIcon({
|
||||
required this.likeIconsXid,
|
||||
required this.likeIcon,
|
||||
});
|
||||
|
||||
final int? likeIconsXid;
|
||||
final LikeIconClass? likeIcon;
|
||||
|
||||
factory LikeIcon.fromJson(Map<String, dynamic> json){
|
||||
return LikeIcon(
|
||||
likeIconsXid: json["like_icons_xid"],
|
||||
likeIcon: json["like_icon"] == null ? null : LikeIconClass.fromJson(json["like_icon"]),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class LikeIconClass {
|
||||
LikeIconClass({
|
||||
required this.id,
|
||||
required this.image,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String? image;
|
||||
|
||||
factory LikeIconClass.fromJson(Map<String, dynamic> json){
|
||||
return LikeIconClass(
|
||||
id: json["id"],
|
||||
image: json["image"],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -861,7 +861,7 @@ class _PostDetailsScreenState extends State<PostDetailsScreen> {
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
Get.toNamed(RouteName.tagdetailscreen);
|
||||
},
|
||||
child: containertile(text: containerTitle[index])),
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
|
||||
var recationid = Get.arguments['reactionId'];
|
||||
String? postId;
|
||||
|
||||
class ReactionView extends StatefulWidget {
|
||||
const ReactionView({super.key});
|
||||
@@ -149,7 +149,9 @@ class _AllTabsState extends State<AllTabs> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
alltabfuture = LikePostApi().postLike({'manage_posts_xid': recationid});
|
||||
postId = Get.arguments['postId'];
|
||||
|
||||
alltabfuture = LikePostApi().postLike({'manage_posts_xid': postId});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -224,8 +226,9 @@ class _LikeTabsState extends State<LikeTabs> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
liketabfuture = LikePostApi()
|
||||
.postLike({'manage_posts_xid': recationid, 'like_icons_xid': 1});
|
||||
postId = Get.arguments['postId'];
|
||||
|
||||
liketabfuture = LikePostApi() .postLike({'manage_posts_xid': postId, 'like_icons_xid': 1});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -300,8 +303,9 @@ class _FavouriteTabsState extends State<FavouriteTabs> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
favouritetabfuture = LikePostApi()
|
||||
.postLike({'manage_posts_xid': recationid, 'like_icons_xid': 2});
|
||||
postId = Get.arguments['postId'];
|
||||
|
||||
favouritetabfuture = LikePostApi() .postLike({'manage_posts_xid': postId, 'like_icons_xid': 2});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -376,8 +380,8 @@ class _PartyTabsState extends State<PartyTabs> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
partytabfuture = LikePostApi()
|
||||
.postLike({'manage_posts_xid': recationid, 'like_icons_xid': 3});
|
||||
postId = Get.arguments['postId'];
|
||||
partytabfuture = LikePostApi().postLike({'manage_posts_xid': postId, 'like_icons_xid': 3});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
2216
lib/Main_Screens/Community_HomePage/TagsdDetailScreen.dart
Normal file
2216
lib/Main_Screens/Community_HomePage/TagsdDetailScreen.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/Model/tagdetailModel.dart';
|
||||
|
||||
TagdetailsModel? tagdetailobj;
|
||||
|
||||
class Communitygetmethod {
|
||||
Future<ResponseData<dynamic>> getTagsdata(updata) async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
"${ApiUrls.getTagsdetails}?manage_tag_id=$updata",
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
tagdetailobj = TagdetailsModel.fromJson(response.data);
|
||||
log(tagdetailobj!.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 Communitypostmethod {
|
||||
Communitypostmethod();
|
||||
|
||||
|
||||
Future<ResponseData<dynamic>> postUserSave(updata) async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
updata,
|
||||
ApiUrls.postusersave,
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -324,6 +324,7 @@ class _FollowersTabState extends State<FollowersTab> {
|
||||
// onTap: () {},
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
|
||||
removeid = followersobj!
|
||||
.data![index]
|
||||
.follower!
|
||||
|
||||
@@ -121,7 +121,7 @@ class Profilegetmethod {
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
certificateobj = CertificateuserModel.fromJson(response.data);
|
||||
log(certificateobj!.data.toString());
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,8 +190,7 @@ class _BusSignUpScreenState extends State<BusSignUpScreen> {
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image:
|
||||
AssetImage("assets/images/png/Choice screen.png"),
|
||||
image: AssetImage("assets/images/png/background.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(
|
||||
|
||||
@@ -52,6 +52,7 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
// If the first selected container is unselected, reset the active state
|
||||
_firstSelectedIndex = null;
|
||||
_isFirstSelectionActive = false;
|
||||
_selectedIndices.clear();
|
||||
}
|
||||
} else {
|
||||
if (_firstSelectedIndex == null) {
|
||||
|
||||
@@ -29,7 +29,7 @@ class RouteName {
|
||||
static const String mainscreen = '/mainscreen';
|
||||
static const String sidemenu = '/sidemenu';
|
||||
static const String savedposts = '/savedposts';
|
||||
static const String cyclescreen = '/cyclescreen';
|
||||
static const String tagdetailscreen = '/tagdetailscreen';
|
||||
static const String postscreen = '/postscreen';
|
||||
static const String reactionview = '/reactionview';
|
||||
static const String postdetailsScreen = '/postdetailsScreen';
|
||||
|
||||
@@ -12,7 +12,7 @@ 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_HomePage/Community.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/CycleScreen.dart';
|
||||
import 'package:regroup/Main_Screens/Community_HomePage/TagsdDetailScreen.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';
|
||||
@@ -165,8 +165,8 @@ class AppRoutes {
|
||||
page: () => const SavedPosts(),
|
||||
),
|
||||
GetPage(
|
||||
name: RouteName.cyclescreen,
|
||||
page: () => const CycleScreen(),
|
||||
name: RouteName.tagdetailscreen,
|
||||
page: () => const TagdetailScreen(),
|
||||
),
|
||||
GetPage(
|
||||
name: RouteName.postscreen,
|
||||
|
||||
@@ -581,7 +581,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
Get.toNamed(RouteName.tagdetailscreen);
|
||||
},
|
||||
child: containertile(text: containerTitle[index])),
|
||||
);
|
||||
|
||||
11
pubspec.yaml
11
pubspec.yaml
@@ -2,7 +2,7 @@ name: regroup
|
||||
description: A new Flutter project.
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=2.19.6 <3.0.0'
|
||||
sdk: ">=2.19.6 <3.0.0"
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
@@ -31,7 +31,6 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
@@ -48,7 +47,7 @@ dependencies:
|
||||
image_cropper: ^6.0.0
|
||||
image_picker: ^1.0.8
|
||||
lottie: ^3.1.2
|
||||
connectivity_plus:
|
||||
connectivity_plus:
|
||||
animations: ^2.0.11
|
||||
shimmer: ^3.0.0
|
||||
device_info_plus: ^9.1.2
|
||||
@@ -79,15 +78,12 @@ dependencies:
|
||||
comment_tree: ^0.3.0
|
||||
flutter_keyboard_visibility: ^6.0.0
|
||||
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
flutter_lints: ^2.0.0
|
||||
|
||||
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
|
||||
flutter_launcher_icons:
|
||||
@@ -102,7 +98,6 @@ flutter_launcher_icons:
|
||||
|
||||
# The following section is specific to Flutter packages.
|
||||
flutter:
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
|
||||
Reference in New Issue
Block a user