|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/rendering.dart';
|
|
|
|
import 'package:one_key/models/comments_label_model.dart';
|
|
|
|
import 'package:one_key/models/comments_model.dart';
|
|
|
|
import 'package:one_key/provider/user_model.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
...
|
...
|
@@ -8,10 +11,14 @@ import 'package:one_key/widgets/system_app_bar.dart'; |
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import '../../../constant/state.dart';
|
|
|
|
import '../../../provider/comment_manage_provider.dart';
|
|
|
|
import '../../../utils/event_bus.dart';
|
|
|
|
import '../../../utils/screen_util.dart';
|
|
|
|
import '../../../utils/utils.dart';
|
|
|
|
import '../../../widgets/page_exception.dart';
|
|
|
|
import '../../online_check/photo_view_wiget.dart';
|
|
|
|
import 'package:sliding_up_panel2/sliding_up_panel2.dart';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 评价管理
|
|
...
|
...
|
@@ -24,13 +31,20 @@ class CommentManageHomePage extends StatefulWidget { |
|
|
|
|
|
|
|
class _CommentManageHomePageState extends State<CommentManageHomePage> {
|
|
|
|
CommentManageProvider commentManageProvider;
|
|
|
|
|
|
|
|
ScrollController controller = ScrollController();
|
|
|
|
Map<String, String> starTextMap = {};
|
|
|
|
bool allSelect = true;
|
|
|
|
String label = '';
|
|
|
|
bool showInput = false;
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
starTextMap = {'1': '差', '2': '有点差', '3': '一般', '4': '满意', '5': '非常满意'};
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
_getSellerComments();
|
|
|
|
_getSellerComments(isShowLoading: false);
|
|
|
|
_getCountCommentLabel(isShowLoading: false);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -41,38 +55,162 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
///我的客户首页
|
|
|
|
///评价标签
|
|
|
|
_getCountCommentLabel({bool isShowLoading = true}) async {
|
|
|
|
Map<String, String> pramas = {
|
|
|
|
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
};
|
|
|
|
// label
|
|
|
|
await commentManageProvider.getCountCommentLabel(context, pramas,
|
|
|
|
isShowLoading: isShowLoading);
|
|
|
|
}
|
|
|
|
|
|
|
|
///评价列表
|
|
|
|
_getSellerComments({bool isShowLoading = true}) async {
|
|
|
|
Map<String, String> pramas = {
|
|
|
|
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
'scene': '3',
|
|
|
|
'status': '1'
|
|
|
|
};
|
|
|
|
// label
|
|
|
|
if (label != '') {
|
|
|
|
pramas['label'] = label;
|
|
|
|
}
|
|
|
|
|
|
|
|
await commentManageProvider.getSellerComments(context, pramas,
|
|
|
|
isShowLoading: isShowLoading);
|
|
|
|
}
|
|
|
|
|
|
|
|
List<Widget> _labelWidget() {
|
|
|
|
List<Widget> data = [];
|
|
|
|
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
|
|
data.add(Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
color: true ? MyColours.color_33438E93 : MyColours.color_F8F7F3),
|
|
|
|
child: Text(
|
|
|
|
'全部',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: true ? MyColours.color_438E93 : MyColours.color_515151),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
data.add(InkWell(
|
|
|
|
onTap: () {
|
|
|
|
allSelect = true;
|
|
|
|
commentManageProvider.commentsLabeldata.forEach((element) {
|
|
|
|
element.select = false;
|
|
|
|
});
|
|
|
|
setState(() {});
|
|
|
|
label = '';
|
|
|
|
_getSellerComments(isShowLoading: true);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
color: allSelect
|
|
|
|
? MyColours.color_33438E93
|
|
|
|
: MyColours.color_F8F7F3),
|
|
|
|
child: Text(
|
|
|
|
'全部',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: allSelect
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
)));
|
|
|
|
for (int i = 0; i < commentManageProvider.commentsLabeldata.length; i++) {
|
|
|
|
CommentsLabelSunModel sunModel =
|
|
|
|
commentManageProvider.commentsLabeldata[i];
|
|
|
|
data.add(InkWell(
|
|
|
|
onTap: () {
|
|
|
|
commentManageProvider.commentsLabeldata.forEach((element) {
|
|
|
|
element.select = false;
|
|
|
|
});
|
|
|
|
allSelect = false;
|
|
|
|
sunModel.select = true;
|
|
|
|
setState(() {});
|
|
|
|
label = sunModel.name;
|
|
|
|
_getSellerComments(isShowLoading: true);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
color: sunModel.select
|
|
|
|
? MyColours.color_33438E93
|
|
|
|
: MyColours.color_F8F7F3),
|
|
|
|
child: Text(
|
|
|
|
sunModel.name,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: sunModel.select
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 九宫格
|
|
|
|
Widget _getGridImg(List<CommentsImageModel> imags) {
|
|
|
|
return GridView.builder(
|
|
|
|
controller: controller,
|
|
|
|
padding: EdgeInsets.symmetric(vertical: w(7)),
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: imags.length,
|
|
|
|
|
|
|
|
//SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
//横轴元素个数
|
|
|
|
crossAxisCount: 3,
|
|
|
|
//纵轴间距
|
|
|
|
mainAxisSpacing: w(7),
|
|
|
|
//横轴间距
|
|
|
|
crossAxisSpacing: w(7),
|
|
|
|
//子组件宽高长度比例
|
|
|
|
childAspectRatio: 1.0),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
List<String> images = imags.map((e) => e.url).toList();
|
|
|
|
_showPhotoView(context, index, images);
|
|
|
|
},
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(r(8)),
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
imageUrl: imags[index].url,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
// width: w(),
|
|
|
|
// height: ScreenUtil().setWidth(100 * 2),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//查看大图
|
|
|
|
_showPhotoView(BuildContext context, int index, List imgs,
|
|
|
|
{isShow = false, List dashName}) async {
|
|
|
|
// if (imgs.length == 1 &&
|
|
|
|
// imgs[0] ==
|
|
|
|
// 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
|
|
|
|
// imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
|
|
|
|
// }
|
|
|
|
Utils.setBarStatus(false, color: Colors.black);
|
|
|
|
dynamic result = await showGeneralDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
// barrierColor: Colors.red,
|
|
|
|
barrierLabel:
|
|
|
|
MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
Animation secondaryAnimation) {
|
|
|
|
Widget child = Stack(
|
|
|
|
children: <Widget>[
|
|
|
|
PhotoPreview(
|
|
|
|
initialIndex: index,
|
|
|
|
photoList: imgs,
|
|
|
|
isShow: isShow,
|
|
|
|
dashName: dashName)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
return child;
|
|
|
|
});
|
|
|
|
Utils.setBarStatus(true, color: Colors.white);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
commentManageProvider =
|
|
...
|
...
|
@@ -80,102 +218,184 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar('评价管理'),
|
|
|
|
body: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
child: Wrap(
|
|
|
|
runSpacing: w(10),
|
|
|
|
spacing: w(10),
|
|
|
|
children: _labelWidget()),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: 10,
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(top: w(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(0.5),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(50),
|
|
|
|
height: w(50),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: w(8), right: w(8), top: w(20)),
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(w(50)),
|
|
|
|
child: Container(
|
|
|
|
width: w(50),
|
|
|
|
height: w(50),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_d9d9d9,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(r(50))),
|
|
|
|
))),
|
|
|
|
HEmptyView(34),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
body: Consumer<CommentManageProvider>(builder: (context1, model, _) {
|
|
|
|
if (model.pageState != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
callback: () async {
|
|
|
|
_getCountCommentLabel();
|
|
|
|
_getSellerComments();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有评论列表信息哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
child: Wrap(
|
|
|
|
runSpacing: w(10),
|
|
|
|
spacing: w(10),
|
|
|
|
children: _labelWidget()),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount:
|
|
|
|
commentManageProvider.commentsData.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
CommentsSunModel sunModel =
|
|
|
|
commentManageProvider.commentsData[index];
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(top: w(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(0.5),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(50),
|
|
|
|
height: w(50),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: w(8),
|
|
|
|
right: w(8),
|
|
|
|
top: w(20)),
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(w(50)),
|
|
|
|
child: sunModel.authorImage !=
|
|
|
|
null &&
|
|
|
|
sunModel.authorImage != ''
|
|
|
|
? CachedNetworkImage(
|
|
|
|
imageUrl:
|
|
|
|
sunModel.authorImage,
|
|
|
|
width: w(50),
|
|
|
|
height: w(50),
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
width: w(50),
|
|
|
|
height: w(50),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours
|
|
|
|
.color_d9d9d9,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
r(50))),
|
|
|
|
))),
|
|
|
|
HEmptyView(34),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets
|
|
|
|
.symmetric(
|
|
|
|
vertical:
|
|
|
|
w(4)),
|
|
|
|
constraints:
|
|
|
|
BoxConstraints(
|
|
|
|
maxWidth:
|
|
|
|
w(120)),
|
|
|
|
child: Text(
|
|
|
|
sunModel.author ??
|
|
|
|
'',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow:
|
|
|
|
TextOverflow
|
|
|
|
.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
font(14),
|
|
|
|
fontWeight:
|
|
|
|
FontWeight
|
|
|
|
.bold,
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
)),
|
|
|
|
Spacer(),
|
|
|
|
Container(
|
|
|
|
width: w(75),
|
|
|
|
height: w(24),
|
|
|
|
child:
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 5,
|
|
|
|
shrinkWrap:
|
|
|
|
true,
|
|
|
|
scrollDirection:
|
|
|
|
Axis
|
|
|
|
.horizontal,
|
|
|
|
itemBuilder:
|
|
|
|
(context,
|
|
|
|
index) {
|
|
|
|
return Image
|
|
|
|
.asset(
|
|
|
|
Utils.getImgPath(index <=
|
|
|
|
int.parse(sunModel.grade) - 1
|
|
|
|
? 'zwzp'
|
|
|
|
: 'apple'),
|
|
|
|
width:
|
|
|
|
w(15),
|
|
|
|
);
|
|
|
|
})),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets
|
|
|
|
.symmetric(
|
|
|
|
vertical:
|
|
|
|
w(4)),
|
|
|
|
child: Text(
|
|
|
|
starTextMap[
|
|
|
|
'${sunModel.grade}'] ??
|
|
|
|
'',
|
|
|
|
maxLines: 2,
|
|
|
|
overflow:
|
|
|
|
TextOverflow
|
|
|
|
.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_999999),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(8),
|
|
|
|
Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
constraints:
|
|
|
|
BoxConstraints(
|
|
|
|
maxWidth: w(120)),
|
|
|
|
child: Text(
|
|
|
|
'四处行走的花',
|
|
|
|
'就餐于 2023-8-24 午餐 二楼205',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow
|
|
|
|
.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
.color_999999),
|
|
|
|
)),
|
|
|
|
Spacer(),
|
|
|
|
Container(
|
|
|
|
width: w(75),
|
|
|
|
height: w(24),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: 5,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
itemBuilder:
|
|
|
|
(context, index) {
|
|
|
|
return Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'zwzp'),
|
|
|
|
width: w(15),
|
|
|
|
);
|
|
|
|
})),
|
|
|
|
Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
'非常满意',
|
|
|
|
maxLines: 2,
|
|
|
|
'发表于 ${sunModel.createTimeStr}',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow
|
|
|
|
.ellipsis,
|
|
|
|
style: TextStyle(
|
|
...
|
...
|
@@ -183,85 +403,137 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
|
|
color: MyColours
|
|
|
|
.color_999999),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(8),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
'就餐于 2023-8-24 午餐 二楼205',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_999999),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
'发表于 2023-8-25',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow:
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_999999),
|
|
|
|
)),
|
|
|
|
VEmptyView(8),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
'第二次来了,味道还是一如既往的好吃,包间也很干净整洁,',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.8,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
'#口味佳,服务热情',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.8,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_438E93),
|
|
|
|
)),
|
|
|
|
VEmptyView(8),
|
|
|
|
Align(
|
|
|
|
alignment:
|
|
|
|
Alignment.centerRight,
|
|
|
|
child: RoundButton(
|
|
|
|
text: '回复',
|
|
|
|
width: w(54),
|
|
|
|
height: w(24),
|
|
|
|
gradientStart:
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
gradientEnd:
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
textColor:
|
|
|
|
MyColours.color_000000,
|
|
|
|
fontSize: 24,
|
|
|
|
borderColor:
|
|
|
|
MyColours.color_999999,
|
|
|
|
radius: r(15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(26),
|
|
|
|
]))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}))
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
VEmptyView(8),
|
|
|
|
if (sunModel.text != null &&
|
|
|
|
sunModel.text.length > 0)
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets
|
|
|
|
.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
sunModel.text ?? '',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.8,
|
|
|
|
fontSize:
|
|
|
|
font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(
|
|
|
|
vertical: w(4)),
|
|
|
|
child: Text(
|
|
|
|
'#${sunModel.evalLabel ?? ''}',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.8,
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_438E93),
|
|
|
|
)),
|
|
|
|
if (sunModel
|
|
|
|
.enclosure.length >
|
|
|
|
0)
|
|
|
|
_getGridImg(
|
|
|
|
sunModel.enclosure),
|
|
|
|
VEmptyView(8),
|
|
|
|
sunModel.reply != null
|
|
|
|
? Container(
|
|
|
|
width:
|
|
|
|
double.infinity,
|
|
|
|
padding:
|
|
|
|
EdgeInsets.all(
|
|
|
|
w(4)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours
|
|
|
|
.color_33438E93,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
r(8))),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment
|
|
|
|
.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'回复内容',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_515151,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight
|
|
|
|
.bold,
|
|
|
|
fontSize:
|
|
|
|
font(
|
|
|
|
12)),
|
|
|
|
),
|
|
|
|
VEmptyView(6),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets
|
|
|
|
.symmetric(
|
|
|
|
vertical:
|
|
|
|
w(4)),
|
|
|
|
child: Text(
|
|
|
|
sunModel.reply
|
|
|
|
.text ??
|
|
|
|
"",
|
|
|
|
style: TextStyle(
|
|
|
|
height:
|
|
|
|
1.8,
|
|
|
|
fontSize:
|
|
|
|
font(
|
|
|
|
12),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
:
|
|
|
|
// showInput
|
|
|
|
// ? SlidingUpPanel(
|
|
|
|
// panel: Center(
|
|
|
|
// child: Text(
|
|
|
|
// "This is the sliding Widget"),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// :
|
|
|
|
Align(
|
|
|
|
alignment: Alignment
|
|
|
|
.centerRight,
|
|
|
|
child: RoundButton(
|
|
|
|
text: '回复',
|
|
|
|
width: w(54),
|
|
|
|
height: w(24),
|
|
|
|
gradientStart:
|
|
|
|
MyColours
|
|
|
|
.color_ffffff,
|
|
|
|
gradientEnd: MyColours
|
|
|
|
.color_ffffff,
|
|
|
|
textColor: MyColours
|
|
|
|
.color_000000,
|
|
|
|
fontSize: 24,
|
|
|
|
borderColor: MyColours
|
|
|
|
.color_999999,
|
|
|
|
radius: r(15),
|
|
|
|
onPressed: () {
|
|
|
|
setState(() {
|
|
|
|
showInput =
|
|
|
|
!showInput;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(26),
|
|
|
|
]))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}))
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|