添加点赞效果、话题取消效果

pull/1/head
戴余标 3 years ago
parent 30d99681f6
commit 9941d43f98

@ -103,7 +103,7 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
),
),
TextButton(
onPressed: () {},
onPressed: Get.back,
child: '取消'
.text
.size(28.sp)

@ -1,5 +1,6 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:aku_new_community/models/community/dynamic_detail_model.dart';
import 'package:aku_new_community/provider/user_provider.dart';
@ -12,6 +13,7 @@ import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:like_button/like_button.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
@ -136,17 +138,25 @@ class _ChatCardDetailState extends State<ChatCardDetail> {
],
),
Spacer(),
Image.asset(
R.ASSETS_ICONS_COMMUNITY_LIKE_PNG,
width: 40.w,
height: 40.w,
LikeButton(
size: 40.w,
likeBuilder: (bool isLiked){
return Image.asset(
isLiked ? Assets.icons.communityLikeIs.path : Assets.icons.communityLike.path,);
},
likeCount:widget.model.likes,
),
5.wb,
'${widget.model.likes}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
// Image.asset(
// Assets.icons.communityLikeIs.path,
// width: 40.w,
// height: 40.w,
// ),
// 5.wb,
// '${widget.model.likes}'
// .text
// .size(24.sp)
// .color(Color(0xFF999999))
// .make(),
32.wb,
].row(),
Column(
@ -191,6 +201,7 @@ class _ChatCardDetailState extends State<ChatCardDetail> {
]).paddingOnly(bottom: 16.w);
}
// _renderLikeAndComment() {
// if (widget.model!.likeNames!.isEmpty &&
// widget.model!.gambitThemeCommentVoList!.isEmpty) return SizedBox();

File diff suppressed because it is too large Load Diff

@ -120,7 +120,8 @@ dependencies:
just_audio: ^0.9.20
#录音
flutter_sound: ^9.1.3
#点赞
like_button: ^2.0.4
dev_dependencies:
flutter_test:

Loading…
Cancel
Save