items = [];
for(var item in _patrol_task.patrol_results){
items.add(new Row(
children:[
Expanded(
flex: 1,
child: Text("${item.patrol_template_name}") ,),
Expanded(
flex: 2,
child:
FormBuilderTextField(
attribute: "patrol_task[patrol_results_attributes][${item.id}][summary]",
decoration: InputDecoration(labelText: "备注"),
)
),
Expanded(
flex: 1,
child:
Column(
children: <Widget>[
_image == null
? Text('No image selected.')
: Image.file(_image),
RaisedButton(
onPressed: _takePhoto,
child: Text("拍照"),
),
],
),
)
],
));
} return FormBuilder(
key: _fbKey,
autovalidate: true,
child: Scrollbar(
child:
SingleChildScrollView(
child: ListView(
shrinkWrap: true,
children: items),)
)
);items为包含多个Widget的列表,目前界面可以出现结果就是无法滑动,网上的各种方法都试过,都没有反应,希望有大佬可以看一下哪里出问题了。界面里还会报底部越界错误。希望的效果是,可以滚动,滚动的时候右边出现滚动条。万分感谢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货