当前位置:网站首页>How to remove the blank at the top of listview

How to remove the blank at the top of listview

2022-06-10 23:48:00 Dense information

Reference resources
solve listview Top blank question . use MediaQuery.removePadding Wrap up . Set up removeTop:true.

MediaQuery.removePadding(

removeTop:true,

context:context,

)

MediaQuery.removePadding(// solve listview There is a blank question at the top .
    removeTop: true,
    context: context, child: ListView.builder(
    itemCount: searchModel?.data?.length ?? 0,
    // If he's empty . Or he takes the default value for null 0
    itemBuilder: (BuildContext context, int position) {
    
      return _item(position);
    }))
原网站

版权声明
本文为[Dense information]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206102228533292.html