SliverList 高度自动,
SliverFixedExtentList 高度固定死.
CustomScrollView( slivers:[ SliverList( delegate: SliverChildBuilderDelegate((context, int index){ Container postPiece; if (index == 0){ postPiece = Container( child: Text('$index , aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', style: TextStyle(color: Colors.grey),), ); } else { postPiece = Container( child: Text('$index, bbbbbbbbbbbbb', style: TextStyle(color: Colors.black),), ); } return postPiece; }, childCount: 100, ), ), // SliverFixedExtentList( // itemExtent: 50, //child的长度或者宽度,取决于滚动方向. // delegate: SliverChildBuilderDelegate((context, int index) { // print(content.mainPost); // Container _piece; // if (index == 0){ // _piece = Container( // child: Text('dsssouu',style: TextStyle(color: Colors.black),), // ); // }else{ // _piece = Container( // child: Text('aaaa', style: TextStyle(color: Colors.grey),), // ); // } // return _piece; // }, // childCount: 20, // ), // ), ], ),