1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| body: CustomScrollView( slivers: <Widget>[
SliverGrid.count( //具体的配置 ), //列表 SliverFixedExtentList( delegate: SliverChildBuilderDelegate( (context, index) => ConversationListItem( delegate: this, conversation: conList[index] ), childCount: conList.length, ), itemExtent: 100, ), ], ),
|
解析:大的容器叫做custom scroll view,子控件叫做slivers,是一个数组,在数组里面从上到下排布sliver控件,有sliver grid,有sliver fixed extent list
- 效果大概长这样