赞
踩
| backgroundColor | 指示器的背景颜色 | Color |
List _list =[1, 2, 3,];
body: RefreshIndicator(
color: Colors.red,
backgroundColor: Colors.lightBlue,
onRefresh: () {
setState(() {
_list.add(_list.length+1);
});
return Future.delayed(Duration(seconds:1));
},
child: ListView.separated(itemCount: _list.length,
separatorBuilder: (context,index){return Divider(height: 10,color: Colors.red,);} ,
itemBuilder: (BuildContext context, int index){
return Center(child: Text(“数据${_list[index]}”),heightFactor: 1.5,);
}, ),
)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。