当前位置:网站首页>pull_ to_ refresh
pull_ to_ refresh
2022-07-01 01:10:00 【weixin_ thirty-eight million one hundred and seven thousand fou】
dependencies:
pull_to_refresh: ^1.5.7class _MyHomePageState extends State<MyHomePage> {
List<String> items = ["1", "2", "3", "4", "5", "6", "7", "8"];
RefreshController _refreshController =
RefreshController(initialRefresh: false);
void _onRefresh() async {
// monitor network fetch
await Future.delayed(Duration(milliseconds: 1000));
// if failed,use refreshFailed()
_refreshController.refreshCompleted();
}
void _onLoading() async {
// monitor network fetch
await Future.delayed(Duration(milliseconds: 1000));
// if failed,use loadFailed(),if no data return,use LoadNodata()
items.add((items.length + 1).toString());
if (mounted) setState(() {});
_refreshController.loadComplete();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: SmartRefresher(
enablePullDown: true,
ena边栏推荐
- 酒旅板块复苏,亚朵继续上市梦,距离“新住宿经济第一股“还有多远?
- A proper job is a good job
- Implementation of date class
- 【日常记录】——对BigDecimal除法运算时遇到的Bug
- 给按钮的边框和文字设置不同的背景色
- Host FL Studio fruit music production daw20.9
- Pytorch auto derivation
- Is the public read-only field with immutable structure valid- Does using public readonly fields for immutable structs work?
- Member management applet actual development 07 page Jump
- Pytorch installs and uses GPU acceleration
猜你喜欢

Deployment of mini version message queue based on redis6.0

蒹葭苍苍,白露为霜。

ESP8266 RC522

Member management applet actual development 07 page Jump

Mindjet mindmanager2022 mind map decompression installer tutorial

Shift operators

Oracle-数据完整性

Share your own terminal DIY display banner

K210工地安全帽

ORB-SLAM2源码学习(二)地图初始化
随机推荐
CMU15445 (Fall 2019) 之 Project#1 - Buffer Pool 详解
K210门禁毕设
JS bubble sort and select sort
解决 error MSB8031: Building an MFC project for a non-Unicode character set is deprecated.
How to scroll uitableview to a specific position - how to scroll uitableview to specific position
MySQL storage engine
关于VCTK数据集
ArrayList分析1-循环、扩容、版本
闭锁继电器YDB-100、100V
Oracle table creation and management
Koa koa-combine-routers 分路由管理
Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support
left join左连接匹配数据为NULL时显示指定值
Mindjet mindmanager2022 mind map decompression installer tutorial
给按钮的边框和文字设置不同的背景色
C language file operation for conquering C language
【学习笔记】简单dp
Get screen height
Line number of Jenkins pipeline script execution exception
[LeetCode] 爬楼梯【70】