如何在SingleChildScrollView中使用Expanded?我有Image.network,ListView.builder和Row(TextFormField和Icon按钮)的屏幕。我用Expanded包装ListView。如何用SingleChildScrollView包装此列?打开滑水板时,我需要移动屏幕才能看到我写的东西。当我包装我的专栏时,我有此错误。
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
child: GestureDetector(
child:
Image.network(
postOne.imageUrl,
fit: BoxFit.fitWidth,
height: MediaQuery
.of(context)
.size
.width,
width: MediaQuery
.of(context)
.size
.width,
),
onLongPress: () {},
onDoubleTap: () {},
),
),
Expanded(
//height: MediaQuery.of(context).size.width*0.33,
child: ListView.builder(
itemCount: commentList.length,
itemBuilder: (context, position) {
return GestureDetector(
onLongPress: () {},
child: Card(
child: Padding(
padding: EdgeInsets.all(5.0),
child: new CheckboxListTile(
title: new Text(commentList
.elementAt(position)
.coment,
style: TextStyle(fontSize: 18.0),),
value: values[commentList
.elementAt(position)
.coment],
onChanged: (bool value) {}),
),
)
);
}
), …Run Code Online (Sandbox Code Playgroud) flutter ×1