postfeedback method
void
postfeedback(
- Post post
)
Implementation
void postfeedback(Post post) {
showModalBottomSheet<void>(
backgroundColor: Get.theme.cardColor,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(10),
),
),
context: Get.context!,
builder: (BuildContext context) {
return SafeArea(
child: Wrap(
children: [
Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Container(
decoration: BoxDecoration(
color: Colors.grey[900],
borderRadius: const BorderRadius.all(
Radius.circular(30),
),
),
width: ARMOYU.screenWidth / 4,
height: 5,
),
),
Visibility(
child: InkWell(
onTap: () async {
PostRemoveResponse response = await service
.postsServices
.remove(postID: post.postID);
if (!response.result.status) {
log(response.result.description);
return;
}
log(response.result.description);
},
child: ListTile(
leading: const Icon(
Icons.star_rate_sharp,
),
title: Text(SocialKeys.socialAddFavorite.tr),
),
),
),
Visibility(
visible: post.owner.userID == currentUser!.userID,
child: InkWell(
onTap: () async {},
child: ListTile(
leading: const Icon(
Icons.edit_note_sharp,
),
title: Text(SocialKeys.socialedit.tr),
),
),
),
const Visibility(
//Çizgi ekler
child: Divider(),
),
Visibility(
visible: post.owner.userID != currentUser!.userID,
child: InkWell(
onTap: () {},
child: ListTile(
textColor: Colors.red,
leading: const Icon(
Icons.flag,
color: Colors.red,
),
title: Text(SocialKeys.socialReport.tr),
),
),
),
Visibility(
visible: post.owner.userID != currentUser!.userID,
child: InkWell(
onTap: () async {
Get.back();
BlockingAddResponse response =
await service.blockingServices.add(
userID: post.owner.userID!,
);
ARMOYUWidget.toastNotification(
response.result.description,
);
},
child: ListTile(
textColor: Colors.red,
leading: const Icon(
Icons.person_off_outlined,
color: Colors.red,
),
title: Text(SocialKeys.socialBlock.tr),
),
),
),
Visibility(
visible: post.owner.userID == currentUser!.userID,
child: InkWell(
onTap: () async => ARMOYUWidget.showConfirmationDialog(
context,
accept: () async => await removepost(post),
),
child: ListTile(
textColor: Colors.red,
leading: const Icon(
Icons.delete,
color: Colors.red,
),
title: Text(SocialKeys.socialdelete.tr),
),
),
),
const SizedBox(height: 10),
],
),
],
),
);
},
);
}