当前位置:网站首页>Flutter can refresh data every time the interface comes in
Flutter can refresh data every time the interface comes in
2022-07-01 05:16:00 【Bright as water】
Preface
Recently do flutter When the project is , I want to refresh data every time I enter my interface , Found a good way to use , Let's share with you :
@override
Widget build(BuildContext context) {
return VisibilityDetector(
key: const Key('my-menu-key'),
onVisibilityChanged: (VisibilityInfo visibilityInfo) {
if (visibilityInfo.visibleFraction == 0.0) {
} else {
_getMemberInfo();
}
},
child: Scaffold(
backgroundColor: color_FFFFFFFF,
body: Container(
color: Colors.red,
),
),
);
}
}
The key is VisibilityDetector, Then judge whether it is displayed , You can achieve your own effect !
END.
边栏推荐
- AcWing 889. 01 sequence satisfying the condition (Cartland number)
- LeetCode316-去除重复字母-栈-贪心-字符串
- QDataStream的简单读写验证
- 3D建模与处理软件简介 刘利刚 中国科技大学
- Pytoch (I) -- basic grammar
- How to traverse massive data in redis
- Single page application
- Explanation of characteristics of hydraulic slip ring
- 1076 Forwards on Weibo
- el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;
猜你喜欢

LevelDB源码分析之LRU Cache

Unity drags and modifies scene camera parameters under the editor

Data consistency between redis and database

Causes of short circuit of conductive slip ring and Countermeasures

Solution: drag the Xib control to the code file, and an error setvalue:forundefined key:this class is not key value coding compliant for the key is reported

Rainbond结合NeuVector实践容器安全管理

Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards

如何选择导电滑环材料

Copier le matériel de conseils de bébé ne peut pas être vide, comment résoudre?

Neural network - nonlinear activation
随机推荐
[daily question in summer] Luogu p7222 [rc-04] informatics competition
Flutter 实现每次进来界面都刷新数据
担心侵权?必备无版权素材网站分享,不用担心视频剪辑缺素材
Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
[NLP Li Hongyi] notes
LeetCode316-去除重复字母-栈-贪心-字符串
Causes of short circuit of conductive slip ring and Countermeasures
Neural networks - use of maximum pooling
Use and principle of AQS related implementation classes
线程类的几大创建方法
Implementation of distributed lock
【暑期每日一题】洛谷 P7222 [RC-04] 信息学竞赛
Distributed architecture system splitting principles, requirements and microservice splitting steps
[hard ten treasures] - 1 [basic knowledge] classification of power supply
Pytoch (II) -- activation function, loss function and its gradient
[hardware ten treasures catalogue] - reprinted from "hardware 100000 whys" (under continuous update ~ ~)
导电滑环使用的注意事项
在Rainbond中一键部署高可用 EMQX 集群
AcWing 884. Gauss elimination for solving XOR linear equations
HCIP Day13