Я новичок в трепетании и пытаюсь избежать проблемы с прокруткой внизу. Я хотел использовать ListView
для прокрутки ряда элементов. У меня вопрос, почему у меня проблема A RenderFlex overflowed by 94 pixels on the bottom.
? элемент, который превышает эти пиксели, - это мой ListView
, но у этого элемента должна быть собственная прокрутка внутри.
это мой код:
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
//here
FocusScope.of(context).unfocus();
new TextEditingController().clear();
},
child: Scaffold(
backgroundColor: Colors.black,
body: SafeArea(
child: Stack(children: <Widget>[
Align(
alignment: Alignment.bottomCenter,
child: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(top: 40),
color: Colors.white,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height * 0.78,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Container(),
Expanded(
child: Container(
child: Container(),
))
],
),
SizedBox(height: 20),
Row(
children: <Widget>[Container()],
),
SizedBox(height: 20),
Container(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
SizedBox(width: 10),
],
),
SizedBox(height: 10),
Row(
children: <Widget>[(Container())],
),
SizedBox(height: 10),
],
)),
Divider(
height: 50.0,
color: Colors.red,
),
SizedBox(height: 35), //SingleChildScrollView
Container(
child: ListView(shrinkWrap: true, children: <Widget>[
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
Text("LOREM "),
]),
)
],
),
),
)),
])),
),
);
}
