当前位置:网站首页>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.
边栏推荐
- Global and Chinese market of search engine optimization (SEO) software 2022-2028: Research Report on technology, participants, trends, market size and share
- Single page application
- Actual combat: gateway api-2022.2.13
- 字符输入流与字符输出流
- Global and Chinese markets of gps/gnss receiver modules 2022-2028: Research Report on technology, participants, trends, market size and share
- 提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
- Implementation of distributed lock
- Distributed architecture system splitting principles, requirements and microservice splitting steps
- More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so‘.
- Solution: thread 1:[< *> setvalue:forundefined key]: this class is not key value coding compliant for the key*
猜你喜欢

CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记

Principle, technology and implementation scheme of data consistency in distributed database

Go learning notes (5) basic types and declarations (4)

Mathematical knowledge: finding the number of divisors

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

el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;
![[NLP Li Hongyi] notes](/img/8e/a51ca5eee638facd54270fb28d2fce.jpg)
[NLP Li Hongyi] notes

el-cascader回显失败;el-cascader回显不出来

Use and modification of prior network model

LevelDB源码分析之LRU Cache
随机推荐
How to traverse massive data in redis
LeetCode522-最长特殊序列II-哈希表-字符串-双指针
线程安全问题
Pytoch (I) -- basic grammar
Neural networks - use of maximum pooling
Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system
Detailed explanation of distributed global unique ID solution
使用 Nocalhost 开发 Rainbond 上的微服务应用
Is there any good website or software for learning programming? [introduction to programming]?
线程类的几大创建方法
QDataStream的簡單讀寫驗證
Use and principle of Park unpark
Application of industrial conductive slip ring
Solution: thread 1:[< *> setvalue:forundefined key]: this class is not key value coding compliant for the key*
第05天-文件操作函数
Use and principle of reentrantlock
Mathematical knowledge: finding the number of divisors
Use and principle of wait notify
Flutter 实现每次进来界面都刷新数据
Global and Chinese markets of superconductor 2022-2028: Research Report on technology, participants, trends, market size and share