在listview外层加入MediaQuery.removePadding,以及需要去除的位置
MediaQuery.removePadding(
context: context,
removeTop: true,
removeBottom: true,
child: ListView.builder(
itemBuilder: (context, index) => Container(
color: Colors.blue,
padding: EdgeInsets.symmetric(vertical: 5.0),
alignment: Alignment.topCenter,
child: Text('data'),
),
itemCount: 10,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
),
);