
您可以通过在列表视图内使用listview来实现此目的,下面是示例代码,请检查
body: ListView( children: <Widget>[ Container( height: 40, color: Colors.deepOrange, child: Center( child: Text( 'Header', style: TextStyle(color: Colors.white, fontSize: 16), ), ), ), ListView.builder( physics: ScrollPhysics(), shrinkWrap: true, itemCount: 50, itemBuilder: (BuildContext context, int index) { return Container( color: Colors.lime, height: 60, child: Center( child: Text( 'Child $index', style: TextStyle(color: Colors.black, fontSize: 16), ), ), ); }, ), Container( height: 40, color: Colors.deepOrange, child: Center( child: Text( 'Footer', style: TextStyle(color: Colors.white, fontSize: 16), ), ), ), ], ),欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)