showpostlikers method
void
showpostlikers(
- Post post
)
Implementation
void showpostlikers(Post post) {
Rxn<List<Like>> likerList = Rxn<List<Like>>();
postlikesfetch(likerList, post);
showModalBottomSheet(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(10),
),
),
isScrollControlled: true,
backgroundColor: Get.theme.cardColor,
context: Get.context!,
builder: (BuildContext context) {
return FractionallySizedBox(
heightFactor: 0.8,
child: RefreshIndicator(
onRefresh: () => postlikesfetch(
likerList,
post,
fetchRestart: true,
),
child: SafeArea(
child: Column(
children: [
const SizedBox(height: 10),
Text(
SocialKeys.socialLikers.tr.toUpperCase(),
),
const SizedBox(height: 5),
const Divider(),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
alignment: Alignment.center,
child: Obx(
() => likerList.value == null
? Column(
children: [
ShimmerPlaceholder.listTilePlaceholder(),
ShimmerPlaceholder.listTilePlaceholder(),
ShimmerPlaceholder.listTilePlaceholder(),
ShimmerPlaceholder.listTilePlaceholder(),
ShimmerPlaceholder.listTilePlaceholder(),
ShimmerPlaceholder.listTilePlaceholder(),
],
)
: likerList.value!.isEmpty
? CustomText.costum1(CommonKeys.empty.tr)
: ListView.builder(
itemCount: likerList.value!.length,
itemBuilder: (context, index) {
return WidgetPostLikersView(
date: likerList.value![index].date,
islike: 1,
user: likerList.value![index].user,
).build(context, profileFunction: () {
log(likerList
.value![index].user.userID
.toString());
});
},
),
),
),
),
),
],
),
),
),
);
},
);
return;
}