mod: 自定义toast样式、详情页样式修改

This commit is contained in:
guozhigq
2023-07-26 13:38:16 +08:00
parent 9e9422a7e5
commit 54d003fdb1
6 changed files with 184 additions and 167 deletions

View File

@ -22,6 +22,7 @@ class ZanButton extends StatefulWidget {
class _ZanButtonState extends State<ZanButton> {
// 评论点赞
onLikeReply() async {
SmartDialog.showLoading(msg: 'pilipala ...');
ReplyItemModel replyItem = widget.replyItem!;
int oid = replyItem.oid!;
int rpid = replyItem.rpid!;
@ -29,8 +30,9 @@ class _ZanButtonState extends State<ZanButton> {
int action = replyItem.action == 0 ? 1 : 0;
var res = await ReplyHttp.likeReply(
type: widget.replyType!.index, oid: oid, rpid: rpid, action: action);
SmartDialog.dismiss();
if (res['status']) {
SmartDialog.showToast(replyItem.action == 0 ? '点赞成功' : '取消赞');
SmartDialog.showToast(replyItem.action == 0 ? '点赞成功 👍' : '取消赞 💔');
if (action == 1) {
replyItem.like = replyItem.like! + 1;
replyItem.action = 1;