|
|
@ -27,7 +27,6 @@ import 'package:aku_new_community/widget/views/bee_grid_image_view.dart';
|
|
|
|
class ChatCard extends StatefulWidget {
|
|
|
|
class ChatCard extends StatefulWidget {
|
|
|
|
final AllDynamicListModel model;
|
|
|
|
final AllDynamicListModel model;
|
|
|
|
final VoidCallback refresh;
|
|
|
|
final VoidCallback refresh;
|
|
|
|
|
|
|
|
|
|
|
|
final bool hideLine;
|
|
|
|
final bool hideLine;
|
|
|
|
final bool canTap;
|
|
|
|
final bool canTap;
|
|
|
|
|
|
|
|
|
|
|
@ -253,50 +252,13 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
CommunityPopButton(
|
|
|
|
CommunityPopButton(
|
|
|
|
isMyself: _isMyself,
|
|
|
|
isMyself: _isMyself,
|
|
|
|
onSelect: (int value) async {
|
|
|
|
onSelect: (int value) async {
|
|
|
|
if (LoginUtil.isNotLogin) return;
|
|
|
|
if (LoginUtil.isNotLogin) return;
|
|
|
|
if (widget.model.createId == userProvider.userInfoModel?.id) {
|
|
|
|
if (!_isMyself) {
|
|
|
|
if (value == 3) {
|
|
|
|
if (value == 3) {
|
|
|
|
//bool? result =
|
|
|
|
await Get.dialog(CupertinoAlertDialog(
|
|
|
|
await Get.dialog(CupertinoAlertDialog(
|
|
|
|
title: '你确定要拉黑他吗'.text.isIntrinsic.make(),
|
|
|
|
title: '你确定要拉黑他吗'.text.isIntrinsic.make(),
|
|
|
|
|
|
|
|
actions: [
|
|
|
|
|
|
|
|
CupertinoDialogAction(
|
|
|
|
|
|
|
|
child: '取消'.text.black.isIntrinsic.make(),
|
|
|
|
|
|
|
|
onPressed: () => Get.back(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
CupertinoDialogAction(
|
|
|
|
|
|
|
|
child: '确定'
|
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.color(Colors.orange)
|
|
|
|
|
|
|
|
.isIntrinsic
|
|
|
|
|
|
|
|
.make(),
|
|
|
|
|
|
|
|
onPressed: () //=> Get.back(result: true),
|
|
|
|
|
|
|
|
async {
|
|
|
|
|
|
|
|
var isShielding =
|
|
|
|
|
|
|
|
await BlackListFunc.Block(widget.model.id);
|
|
|
|
|
|
|
|
if (isShielding) {
|
|
|
|
|
|
|
|
Get.back();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)); // if (result == true) {
|
|
|
|
|
|
|
|
// await BlackListFunc.Block(widget.model.id);
|
|
|
|
|
|
|
|
// widget.refresh();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (!_isMyself) {
|
|
|
|
|
|
|
|
VoidCallback cancel = BotToast.showLoading();
|
|
|
|
|
|
|
|
await Future.delayed(Duration(
|
|
|
|
|
|
|
|
milliseconds: 500 + Random().nextInt(500)));
|
|
|
|
|
|
|
|
cancel();
|
|
|
|
|
|
|
|
BotToast.showText(text: '举报成功');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
bool? result = await Get.dialog(CupertinoAlertDialog(
|
|
|
|
|
|
|
|
title: '你确定删除吗'.text.isIntrinsic.make(),
|
|
|
|
|
|
|
|
actions: [
|
|
|
|
actions: [
|
|
|
|
CupertinoDialogAction(
|
|
|
|
CupertinoDialogAction(
|
|
|
|
child: '取消'.text.black.isIntrinsic.make(),
|
|
|
|
child: '取消'.text.black.isIntrinsic.make(),
|
|
|
@ -308,23 +270,24 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
.color(Colors.orange)
|
|
|
|
.color(Colors.orange)
|
|
|
|
.isIntrinsic
|
|
|
|
.isIntrinsic
|
|
|
|
.make(),
|
|
|
|
.make(),
|
|
|
|
onPressed: () => Get.back(result: true),
|
|
|
|
onPressed: () //=> Get.back(result: true),
|
|
|
|
|
|
|
|
async {
|
|
|
|
|
|
|
|
var isShielding =
|
|
|
|
|
|
|
|
await BlackListFunc.Block(widget.model.id);
|
|
|
|
|
|
|
|
if (isShielding) {
|
|
|
|
|
|
|
|
Get.back();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
));
|
|
|
|
));
|
|
|
|
if (result == true) {
|
|
|
|
} else {
|
|
|
|
await CommunityFunc.deleteDynamic(widget.model.id);
|
|
|
|
VoidCallback cancel = BotToast.showLoading();
|
|
|
|
widget.refresh();
|
|
|
|
await Future.delayed(Duration(
|
|
|
|
}
|
|
|
|
milliseconds: 500 + Random().nextInt(500)));
|
|
|
|
|
|
|
|
cancel();
|
|
|
|
|
|
|
|
BotToast.showText(text: '举报成功');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
if (!_isMyself) {
|
|
|
|
|
|
|
|
VoidCallback cancel = BotToast.showLoading();
|
|
|
|
|
|
|
|
await Future.delayed(
|
|
|
|
|
|
|
|
Duration(milliseconds: 500 + Random().nextInt(500)));
|
|
|
|
|
|
|
|
cancel();
|
|
|
|
|
|
|
|
BotToast.showText(text: '举报成功');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
bool? result = await Get.dialog(CupertinoAlertDialog(
|
|
|
|
bool? result = await Get.dialog(CupertinoAlertDialog(
|
|
|
|
title: '你确定删除吗'.text.isIntrinsic.make(),
|
|
|
|
title: '你确定删除吗'.text.isIntrinsic.make(),
|
|
|
@ -348,9 +311,7 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
widget.refresh();
|
|
|
|
widget.refresh();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).paddingOnly(right: 32.w),
|
|
|
|
},
|
|
|
|
|
|
|
|
).paddingOnly(right: 32.w),
|
|
|
|
|
|
|
|
].row(crossAlignment: CrossAxisAlignment.start),
|
|
|
|
].row(crossAlignment: CrossAxisAlignment.start),
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|