当前位置:网站首页>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 high-end home theater 2022-2028: Research Report on technology, participants, trends, market size and share
- 打印流与System.setout();
- Use and principle of wait notify
- 使用 Nocalhost 开发 Rainbond 上的微服务应用
- el-cascader回显失败;el-cascader回显不出来
- How to start learning editing? Detailed analysis of zero basis
- 複制寶貝提示材質不能為空,如何解决?
- Global and Chinese market of metal oxide semiconductor field effect transistors 2022-2028: Research Report on technology, participants, trends, market size and share
- 0xc000007b应用程序无法正常启动解决方案(亲测有效)
- 提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
猜你喜欢

Application and principle of ThreadPoolExecutor thread pool

Usage and principle of synchronized

Use and principle of AQS related implementation classes

RuntimeError: mean(): input dtype should be either floating point or complex dtypes. Got Long instead

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

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

Sqlplus connects using the instance name

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

LevelDB源码分析之memtable

Detailed explanation of distributed global unique ID solution
随机推荐
Flutter 实现每次进来界面都刷新数据
Neural network - nonlinear activation
Global and Chinese market of broadband amplifiers 2022-2028: Research Report on technology, participants, trends, market size and share
Pico neo3 handle grabs objects
Use and principle of Park unpark
解决:Thread 1:[<*>setValue:forUndefinedKey]:this class is not key value coding-compliant for the key *
HCIP Day13
在Rainbond中一键部署高可用 EMQX 集群
FileInputStream
Unity drags and modifies scene camera parameters under the editor
Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system
Actual combat: gateway api-2022.2.13
Global and Chinese market of solder wire 2022-2028: Research Report on technology, participants, trends, market size and share
CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记
云原生存储解决方案Rook-Ceph与Rainbond结合的实践
STM32 expansion board digital tube display
【暑期每日一题】洛谷 P5740【深基7.例9】最厉害的学生
每日一题-LeetCode1175-质数排列-数学
el-cascader回显失败;el-cascader回显不出来
Causes of short circuit of conductive slip ring and Countermeasures