当前位置:网站首页>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.
边栏推荐
- 【暑期每日一题】洛谷 P1629 邮递员送信(未完待续...)
- FileOutPutStream
- [hard ten treasures] - 1 [basic knowledge] classification of power supply
- Explanation of characteristics of hydraulic slip ring
- LevelDB源码分析之memtable
- 字符输入流与字符输出流
- Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
- Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system
- Print stream and system setout();
- FileInputStream
猜你喜欢

解决:拖动xib控件到代码文件中,报错setValue:forUndefinedKey:this class is not key value coding-compliant for the key

And search: the suspects (find the number of people related to the nth person)
![[summer daily question] Luogu p5886 Hello, 2020!](/img/ac/4be05f80aab7fb766674e6e2d16fbc.png)
[summer daily question] Luogu p5886 Hello, 2020!

C# wpf 使用DockPanel实现截屏框

Leetcode316- remove duplicate letters - stack - greedy - string

Unity drags and modifies scene camera parameters under the editor

轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷

How to meet the requirements of source code confidentiality and source code security management

LevelDB源码分析之LRU Cache

Mathematical knowledge: finding the number of divisors
随机推荐
第05天-文件操作函数
Youqitong [vip] v3.7.2022.0106 official January 22 Edition
Simple read / write verification of qdatastream
Precautions for use of conductive slip ring
Several methods of creating thread classes
Global and Chinese market of broadband amplifiers 2022-2028: Research Report on technology, participants, trends, market size and share
[daily question in summer] first time, second time, deal!
导电滑环短路的原因以及应对措施
LeetCode316-去除重复字母-栈-贪心-字符串
STM32 expansion board digital tube display
Thread safety issues
Use and principle of wait notify
Intelligent operation and maintenance: visual management system based on BIM Technology
每日一题-LeetCode1175-质数排列-数学
使用 Nocalhost 开发 Rainbond 上的微服务应用
字符输入流与字符输出流
AcWing 886. Finding combinatorial number II (pretreatment factorial)
Pytoch (IV) -- visual tool visdom
提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
导电滑环使用的注意事项