当前位置:网站首页>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边栏推荐
- Self examination before school starts
- Chapter 53 overall understanding of procedures from the perspective of business logic implementation
- PyTorch安装并使用gpu加速
- What if the disk of datanode is full?
- 2022 is half way through. It's hard to make money
- How to do the performance pressure test of "Health Code"
- Gavin's insight on the transformer live broadcast course - rasa project's actual banking financial BOT Intelligent Business Dialogue robot system startup, language understanding, dialogue decision-mak
- 写给 5000 粉丝的一封信!
- 5. TPM module initialization
- NE555波形发生器手把手教程之NE555内部结构(一)
猜你喜欢

Cmu15445 (fall 2019) project 1 - buffer pool details

left join左连接匹配数据为NULL时显示指定值

解决IDEA:Class ‘XXX‘ not found in module ‘XXX‘

Oracle temporary table explanation

ORB-SLAM2源码学习(二)地图初始化

5. TPM module initialization

DX-11Q信号继电器

PHP online confusion encryption tutorial sharing + basically no solution

【go】go 实现行专列 将集合进行转列

C#生成putty格式的ppk文件(支持passphrase)
随机推荐
TCP三次握手为什么不是两次或四次
What should I do without 50W bride price
Oracle temporary table explanation
NE555波形发生器手把手教程之NE555内部结构(一)
Host FL Studio fruit music production daw20.9
A letter to 5000 fans!
From January 11, 2007 to January 11, 2022, I have been in SAP Chengdu Research Institute for 15 years
Practical shell knowledge
ArrayList analysis 1-cycle, capacity expansion, version
Experiment 8 T-SQL, stored procedure
Hoo research | coinwave production - nym: building the next generation privacy infrastructure
【go】go 实现行专列 将集合进行转列
P4学习——p4runtime
Get to know the drawing component of flutter - custompaint
魔王冷饭||#101 魔王解惑数量多与质量;员工管理;高考志愿填报;游戏架构设计
Basic data structure of redis
Two-stage RO: part 1
ESP8266 RC522
Unit test concept and purpose
HDU 2488 A Knight's Journey(DFS)