优化问卷调查界面

hmxc
张萌 4 years ago
parent 416e9c96fb
commit 6590c166e9

@ -104,7 +104,7 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
vertical: 50.w, horizontal: 32.w), vertical: 50.w, horizontal: 32.w),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
constraints: BoxConstraints( constraints: BoxConstraints(
minHeight: 631.w + 96.w, minWidth: 686.w), minHeight: 650.w + 96.w, minWidth: 686.w),
child: BeeRadio( child: BeeRadio(
value: items[index].id, groupValues: _select), value: items[index].id, groupValues: _select),
), ),

@ -5,6 +5,7 @@ import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_detail_page.dart'; import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_detail_page.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart'; import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/others/stack_avatar.dart'; import 'package:akuCommunity/widget/others/stack_avatar.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:akuCommunity/utils/headers.dart'; import 'package:akuCommunity/utils/headers.dart';
@ -38,94 +39,107 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
} }
Widget _buildCard(QuestionnaireModel model) { Widget _buildCard(QuestionnaireModel model) {
return Container( return GestureDetector(
decoration: BoxDecoration( onTap: () {
borderRadius: BorderRadius.circular(8.w), QuestionnaireDetailPage(
color: kForeGroundColor, id: model.id,
), ).to();
width: double.infinity, },
// height: 236.w, child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 12.w), decoration: BoxDecoration(
child: Column( borderRadius: BorderRadius.circular(8.w),
mainAxisSize: MainAxisSize.min, color: kForeGroundColor,
children: [ ),
Row( width: double.infinity,
children: [ // height: 236.w,
Container( padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 12.w),
decoration: child: Column(
BoxDecoration(borderRadius: BorderRadius.circular(8.w)), mainAxisSize: MainAxisSize.min,
width: 160.w, children: [
height: 120.w, Row(
child: ClipRRect( children: [
child: FadeInImage.assetNetwork( Container(
placeholder: R.ASSETS_IMAGES_LOGO_PNG, decoration:
image: API.image(model.imgUrls.first.url)), BoxDecoration(borderRadius: BorderRadius.circular(8.w)),
width: 160.w,
height: 120.w,
child: ClipRRect(
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_LOGO_PNG,
image: API.image(model.imgUrls.first.url)),
),
), ),
), 20.w.widthBox,
20.w.widthBox, Column(
Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ model.title.text.black.size(28.sp).make(),
model.title.text.black.size(28.sp).make(), 6.w.heightBox,
6.w.heightBox, model.description.text
model.description.text .color(ktextSubColor)
.color(ktextSubColor) .size(28.sp)
.size(28.sp) .maxLines(1)
.maxLines(1) .overflow(TextOverflow.ellipsis)
.overflow(TextOverflow.ellipsis) .make(),
.make(), 6.w.heightBox,
6.w.heightBox, RichText(
RichText( text: TextSpan(
text: TextSpan( text: '参与时间:',
text: '参与时间:', style: TextStyle(
style: TextStyle( color: ktextSubColor,
color: ktextSubColor, fontSize: 24.sp,
fontSize: 24.sp, ),
), children: [
children: [ TextSpan(
TextSpan( style: TextStyle(
style: TextStyle( color: ktextPrimary,
color: ktextPrimary, fontSize: 24.sp,
fontSize: 24.sp, ),
text: DateUtil.formatDateStr(model.beginDate,
format: "MM月dd日 HH:mm") +
'' +
DateUtil.formatDateStr(model.endDate,
format: "MM月dd日 HH:mm"),
), ),
text: model.beginDate + '' + model.endDate, ])),
), ],
])), ).expand()
], ],
).expand() ),
], 40.w.heightBox,
), Row(
40.w.heightBox, children: [
Row( StackAvatar(
children: [ avatars: model.headImgURls.map((e) => e.url).toList()),
StackAvatar( 26.w.widthBox,
avatars: model.headImgURls.map((e) => e.url).toList()), '${model.answerNum}人已参加'.text.black.size(20.sp).make(),
26.w.widthBox, Spacer(),
'${model.answerNum}人已参加'.text.black.size(20.sp).make(), MaterialButton(
Spacer(), shape: RoundedRectangleBorder(
MaterialButton( borderRadius: BorderRadius.circular(22.w)),
shape: RoundedRectangleBorder( color: model.status == 3 ? kDarkSubColor : kPrimaryColor,
borderRadius: BorderRadius.circular(22.w)), minWidth: 120.w,
color: model.status == 3 ? kDarkSubColor : kPrimaryColor, height: 44.w,
minWidth: 120.w, // padding:
height: 44.w, // EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w),
// padding: elevation: 0,
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w), onPressed: () {
elevation: 0, QuestionnaireDetailPage(
onPressed: () { id: model.id,
QuestionnaireDetailPage(id: model.id,).to(); ).to();
}, },
child: (_getButtonText(model.status)) child: (_getButtonText(model.status))
.text .text
.black .black
.size(20.sp) .size(20.sp)
.bold .bold
.make(), .make(),
), ),
], ],
) )
], ],
), ),
).material(color: Colors.transparent),
); );
} }

Loading…
Cancel
Save