1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| List<int> _list =[1, 2, 3,]; CustomScrollView( physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()), slivers: <Widget>[ //const CupertinoSliverNavigationBar(largeTitle: Text('Scroll down')), CupertinoSliverRefreshControl( refreshTriggerPullDistance: 100.0, refreshIndicatorExtent: 60.0, onRefresh: () async { await Future<void>.delayed(const Duration(milliseconds: 1000)); setState(() { _list.add(_list.length+1); }); }, ), SliverList(delegate: SliverChildBuilderDelegate((BuildContext context, int index) => Center(child: Column(children: [Text("数据${_list[index]}"), Divider(height: 10,color: Colors.red,)],),), childCount: _list.length,),), ], )
|