# Conflicts:
#	lib/widget/picker/bee_city_picker.dart
pull/1/head
张萌 3 years ago
commit 7f6d97c230

@ -1297,10 +1297,6 @@ class $AssetsImagesGen {
AssetGenImage get wxpay => const AssetGenImage('assets/images/wxpay.png');
}
class $AssetsJsonGen {
const $AssetsJsonGen();
}
class $AssetsNewIconGen {
const $AssetsNewIconGen();
@ -1533,7 +1529,6 @@ class Assets {
static const $AssetsHomeGen home = $AssetsHomeGen();
static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsJsonGen json = $AssetsJsonGen();
static const $AssetsNewIconGen newIcon = $AssetsNewIconGen();
static const $AssetsStaticGen static = $AssetsStaticGen();
static const $AssetsTabGen tab = $AssetsTabGen();

@ -7,8 +7,9 @@ part 'reply_list_model.g.dart';
@JsonSerializable()
class ReplyListModel {
final int id;
final int type;
final int status;
final String content;
final String? content;
final int sendId;
final String sendName;
final String sendDate;
@ -26,6 +27,7 @@ class ReplyListModel {
const ReplyListModel({
required this.id,
required this.type,
required this.status,
required this.content,
required this.sendId,

@ -9,8 +9,9 @@ part of 'reply_list_model.dart';
ReplyListModel _$ReplyListModelFromJson(Map<String, dynamic> json) =>
ReplyListModel(
id: json['id'] as int,
type: json['type'] as int,
status: json['status'] as int,
content: json['content'] as String,
content: json['content'] !=null? json['content'] as String:'',
sendId: json['sendId'] as int,
sendName: json['sendName'] as String,
sendDate: json['sendDate'] as String,

@ -47,6 +47,8 @@ class _MessageCenterPageState extends State<MessageCenterPage>
@override
Widget build(BuildContext context) {
return BeeScaffold(
bgColor: Colors.white,
bodyColor: Color(0xFFF9F9F9),
title: '消息',
actions: [
MaterialButton(
@ -65,21 +67,28 @@ class _MessageCenterPageState extends State<MessageCenterPage>
padding: EdgeInsets.symmetric(horizontal: 32.w),
),
],
appBarBottom: BeeTabBar(
appBarBottom:
TabBar(
controller: _tabController,
tabs: _tabs,
indicatorColor: Color(0xffffc40c),
tabs: _tabs.map((e) => Tab(text: e)).toList(),
indicatorPadding: EdgeInsets.only(bottom: 15.w,left: 35.w,right: 35.w),
),
body: TabBarView(
children: [
ReplayView(
controller: _controllers[0],
),
ThumbsUpView(
controller: _controllers[1],
),
AnnounceView(),
],
controller: _tabController,
body:
Padding(
padding: EdgeInsets.only(top: 10.w),
child: TabBarView(
children: [
ReplayView(
controller: _controllers[0],
),
ThumbsUpView(
controller: _controllers[1],
),
AnnounceView(),
],
controller: _tabController,
),
),
);
}

@ -38,7 +38,9 @@ class _ReplayViewState extends State<ReplayView> {
itemBuilder: (context, index) {
return ReplyCard(model: items[index]);
},
separatorBuilder: (_, __) =>1.w.heightBox,
separatorBuilder: (_, __) =>Container(
color: Color(0xFFF0F0F0),height: 2.w,
),
itemCount: items.length);
});
}

@ -42,7 +42,13 @@ class ReplyCard extends StatelessWidget {
children: [
model.sendName.text.size(26.sp).black.bold.make(),
5.heightBox,
model.content.text
model.content==null?''.text
.size(26.sp)
.color(ktextSubColor)
.maxLines(1)
.ellipsis
.make():
(model.content!).text
.size(26.sp)
.color(ktextSubColor)
.maxLines(1)

@ -1,5 +1,6 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/message/reply_list_model.dart';
import 'package:aku_new_community/models/message/thumbs_up_list_model.dart';
import 'package:aku_new_community/pages/message_center_page/message_func.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
@ -8,7 +9,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class ThumbsUpCard extends StatelessWidget {
final ThumbsUpListModel model;
final ReplyListModel model;
const ThumbsUpCard({Key? key, required this.model}) : super(key: key);
@ -36,8 +37,10 @@ class ThumbsUpCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.sendName.text.size(26.sp).black.bold.make(),
5.heightBox,
Assets.icons.communityLikeIs
.image(width: 28.w, height: 28.w, fit: BoxFit.contain),
5.heightBox,
model.sendDate.text.size(24.sp).color(ktextSubColor).make(),
],
),

@ -300,134 +300,134 @@ class _EventDetailPageState extends State<EventDetailPage> {
}
Widget _commentWidget(CommentListModel model, int rootIndex) {
return Container(
// key: UniqueKey(),
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
[
Material(
color: Color(0xFFF5F5F5),
borderRadius: BorderRadius.circular(48.w),
clipBehavior: Clip.antiAlias,
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: SAASAPI.image(ImgModel.first(model.avatarImgList)),
height: 96.w,
width: 96.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
height: 86.w,
width: 86.w,
);
},
),
),
20.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model.createName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black.withOpacity(0.85),
fontSize: 30.sp,
fontWeight: FontWeight.w500),
return GestureDetector(
onTap: () {
_rootId = model.id;
_parentId = model.id;
_focusNode.requestFocus();
_currentCommentIndex = rootIndex;
},
child: Container(
// key: UniqueKey(),
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
[
Material(
color: Color(0xFFF5F5F5),
borderRadius: BorderRadius.circular(48.w),
clipBehavior: Clip.antiAlias,
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: SAASAPI.image(ImgModel.first(model.avatarImgList)),
height: 96.w,
width: 96.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
height: 86.w,
width: 86.w,
);
},
),
12.hb,
BeeDateUtil(DateUtil.getDateTime(model.createDate))
.timeAgoWithHm
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
),
Spacer(),
CommunityPopButton(
isMyself: _isMyself,
onSelect: (value) async {
if (_isMyself) {
await CommunityFunc.deleteComment(model.id);
_refreshController.callRefresh();
}
})
].row(),
40.hb,
model.content.text.size(28.sp).color(ktextSubColor).make(),
30.hb,
GestureDetector(
onTap: () async {
var res =
await NetUtil().get(SAASAPI.community.commentLike, params: {
'commentId': model.id,
});
if (res.success) {
_likes[rootIndex] = !_likes[rootIndex];
setState(() {});
}
},
child: Row(
children: [
Spacer(),
GestureDetector(
onTap: () async {
var base = await NetUtil().get(
SAASAPI.community.commentLike,
params: {'commentId': model.id});
if (base.success) {
_likes[rootIndex] = !_likes[rootIndex];
if (_likes[rootIndex]) {
_likeNums[rootIndex] += 1;
),
20.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model.createName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black.withOpacity(0.85),
fontSize: 30.sp,
fontWeight: FontWeight.w500),
),
12.hb,
BeeDateUtil(DateUtil.getDateTime(model.createDate))
.timeAgoWithHm
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
),
Spacer(),
CommunityPopButton(
isMyself: _isMyself,
onSelect: (value) async {
if (_isMyself) {
await CommunityFunc.deleteComment(model.id);
_refreshController.callRefresh();
}
})
].row(),
40.hb,
model.content.text.size(28.sp).color(ktextSubColor).make(),
30.hb,
GestureDetector(
onTap: () async {
var res =
await NetUtil().get(SAASAPI.community.commentLike, params: {
'commentId': model.id,
});
if (res.success) {
_likes[rootIndex] = !_likes[rootIndex];
setState(() {});
}
},
child: Row(
children: [
Spacer(),
GestureDetector(
onTap: () async {
var base = await NetUtil().get(
SAASAPI.community.commentLike,
params: {'commentId': model.id});
if (base.success) {
_likes[rootIndex] = !_likes[rootIndex];
if (_likes[rootIndex]) {
_likeNums[rootIndex] += 1;
} else {
_likeNums[rootIndex] -= 1;
}
BotToast.showText(
text: _likes[rootIndex] ? '点赞成功' : '取消点赞成功');
} else {
_likeNums[rootIndex] -= 1;
BotToast.showText(text: base.msg);
}
BotToast.showText(
text: _likes[rootIndex] ? '点赞成功' : '取消点赞成功');
} else {
BotToast.showText(text: base.msg);
}
setState(() {});
},
child: Material(
color: Colors.transparent,
child: Row(
children: [
Image.asset(
R.ASSETS_ICONS_COMMUNITY_LIKE_PNG,
width: 32.w,
height: 32.w,
color: !_likes[rootIndex]
? Colors.black.withOpacity(0.45)
: kPrimaryColor,
),
5.wb,
'${_likeNums[rootIndex]}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
setState(() {});
},
child: Material(
color: Colors.transparent,
child: Row(
children: [
Image.asset(
R.ASSETS_ICONS_COMMUNITY_LIKE_PNG,
width: 32.w,
height: 32.w,
color: !_likes[rootIndex]
? Colors.black.withOpacity(0.45)
: kPrimaryColor,
),
5.wb,
'${_likeNums[rootIndex]}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
),
),
),
),
32.wb,
GestureDetector(
onTap: () {
_rootId = model.id;
_parentId = model.id;
_focusNode.requestFocus();
_currentCommentIndex = rootIndex;
},
child: Row(
32.wb,
Row(
children: [
Image.asset(
R.ASSETS_ICONS_COMMUNITY_COMMENT_PNG,
@ -436,46 +436,46 @@ class _EventDetailPageState extends State<EventDetailPage> {
),
],
),
),
5.wb,
'${model.commentNum}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
5.wb,
'${model.commentNum}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
),
),
),
40.hb,
model.commentTwoList.isEmpty
? SizedBox.shrink()
: Container(
alignment: Alignment.topLeft,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.06),
borderRadius: BorderRadius.circular(16.w)),
margin: EdgeInsets.only(left: 125.w),
width: 600.w,
padding:
EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
...List.generate(
model.commentTwoList.length < 3
? model.commentTwoList.length
: 3,
(index) => _subCommentWidget(
model.commentTwoList[index],
model.createId,
model.id,
rootIndex)),
if (model.commentTwoList.length > 3)
_foldComment(model, rootIndex)
].sepWidget(separate: 24.hb),
40.hb,
model.commentTwoList.isEmpty
? SizedBox.shrink()
: Container(
alignment: Alignment.topLeft,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.06),
borderRadius: BorderRadius.circular(16.w)),
margin: EdgeInsets.only(left: 125.w),
width: 600.w,
padding:
EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
...List.generate(
model.commentTwoList.length < 3
? model.commentTwoList.length
: 3,
(index) => _subCommentWidget(
model.commentTwoList[index],
model.createId,
model.id,
rootIndex)),
if (model.commentTwoList.length > 3)
_foldComment(model, rootIndex)
].sepWidget(separate: 24.hb),
),
),
),
],
],
),
),
);
}

@ -73,6 +73,7 @@ class BeeScaffold extends StatelessWidget {
actions: actions,
bottom: appBarBottom,
titleSpacing: titleSpacing,
);
return AnnotatedRegion<SystemUiOverlayStyle>(

@ -145,7 +145,11 @@ class _BeeCityPickerState extends State<BeeCityPicker> {
: districts
.map((e) => Center(
child: Padding(
padding: EdgeInsets.only(left: 20.w, right: 20.w,top: 10.w,bottom: 10.w),
padding: EdgeInsets.only(
left: 20.w,
right: 20.w,
top: 10.w,
bottom: 10.w),
child: Text(e.name, textAlign: TextAlign.center),
),
))

Loading…
Cancel
Save