当前位置:网站首页>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边栏推荐
- High quality pump SolidWorks model material recommended, not to be missed
- Date类的实现
- 双位置继电器ST2-2L/AC220V
- Docsify building a personal minimalist knowledge warehouse
- leetcode 474. Ones and Zeroes 一和零(中等)
- P4 learning - p4runtime
- [daily record] - bug encountered in BigDecimal division operation
- 第53章 从业务逻辑实现角度整体性理解程序
- Vnctf 2022 cm CM1 re reproduction
- Problem solving: how to manage thread_local pointer variables
猜你喜欢

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

High quality pump SolidWorks model material recommended, not to be missed

Chapter 53 overall understanding of procedures from the perspective of business logic implementation
![[original] PLSQL index sorting optimization](/img/91/dcd0262705a19645f1a87d4cf03bc8.jpg)
[original] PLSQL index sorting optimization

Docsify building a personal minimalist knowledge warehouse

冲击继电器ZC-23/DC220V

Two-stage RO: part 1

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

软硬件基础知识学习--小日记(1)

Host FL Studio fruit music production daw20.9
随机推荐
K210工地安全帽
Unit test concept and purpose
The real topic of the 11th provincial competition of Bluebridge cup 2020 - crop hybridization
Authentication principle of Ranger plug-in
双位置继电器ST2-2L/AC220V
PyTorch安装并使用gpu加速
MySQL storage engine
The question of IBL precomputation is finally solved
Two-stage RO: part 1
2021电赛F题openmv和K210调用openmv api巡线,完全开源。
冲击继电器ZC-23/DC220V
Oracle-数据完整性
Mindjet mindmanager2022 mind map decompression installer tutorial
DLS-20型双位置继电器 220VDC
DX-11Q信号继电器
Exercises on recursion in C language
Web interface testing of software testing
P4学习——p4runtime
ArrayList分析1-循环、扩容、版本
What is the difference between Pipeline and Release Pipeline in azure devops?