我想RefreshIndicator用布尔参数标记我的。
是否可以?有什么窍门呢?因为没有太多选择...
return RefreshIndicator(
onRefresh: () async {
return Future.value();
},
backgroundColor: Colors.white,
color: Colors.pink,
strokeWidth: 2.75,
child: SingleChildScrollView(...)
)
Run Code Online (Sandbox Code Playgroud)
Sim*_*eon 18
要禁用 RefreshIndicator,请传递返回 false 的 notificationPredicate 函数。
执行此操作后,将不会显示刷新指示器或调用 onRefresh。
RefreshIndicator(
notificationPredicate: enabled ? (_) => true : (_) => false,
...
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3067 次 |
| 最近记录: |