In a page without AppBar, the top padding will appear blank when ListView is used in the body
The code inside probably looks like this
At this time, you only need to coat the ListView with a layer of MediaQuery.removePadding to get it done
return Scaffold(
body: Container(
color: const Color.fromRGBO(250, 250, 250, 1),
//解决ListView顶部留白
child: MediaQuery.removePadding(removeTop: true,context: context, child: ListView(
children: [],
),)
),
);