添加简答题

hmxc
张萌 4 years ago
parent 9c3c3078b1
commit e52b704972

@ -30,6 +30,7 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
List<int> _radio = []; List<int> _radio = [];
int _expanded; int _expanded;
String _expand; String _expand;
String _short;
Widget _emptyWidget() { Widget _emptyWidget() {
return Container(); return Container();
} }
@ -100,6 +101,42 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
); );
} }
Widget _shortAnswer(String title) {
return Container(
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
title.text.color(ktextPrimary).size(28.sp).make(),
24.w.heightBox,
Container(
decoration: BoxDecoration(
border: Border.all(
width: 1.w,
color: Color(0xFFD4CFBE),
),
borderRadius: BorderRadius.circular(8.w),
),
child: TextField(
minLines: 5,
maxLines: 10,
scrollPadding: EdgeInsets.zero,
decoration: InputDecoration(
border: InputBorder.none,
contentPadding:
EdgeInsets.symmetric(horizontal: 32.w, vertical: 28.w),
isDense: true),
onChanged: (value) {
_short = value;
setState(() {});
},
),
)
],
),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
@ -169,7 +206,8 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
_expandedCheck( _expandedCheck(
'title', 'title',
_model.questionnaireTopicVoList.first _model.questionnaireTopicVoList.first
.questionnaireChoiceVoList) .questionnaireChoiceVoList),
_shortAnswer('title')
], ],
), ),
), ),

Loading…
Cancel
Save