我正在尝试将一个小部件居中放置在listView
中。
我尝试了这个方法,但是Text('ABC')
没有垂直居中。
我该怎么做才能实现这个目标呢?
new Scaffold(
appBar: new AppBar(),
body: new ListView(
padding: const EdgeInsets.all(20.0),
children: [
new Center(
child: new Text('ABC')
)
]
)
);