Comments (11)
这个设置下
from pull_to_refresh_notification.
pullBackDuration是回弹动画的时间
_kIndicatorSnapDuration是下拉后刷新状态下停留的时间
from pull_to_refresh_notification.
pullBackDuration是回弹动画的时间
_kIndicatorSnapDuration是下拉后刷新状态下停留的时间
刷新状态多久。。跟 onrefresh 多久返回有关系
from pull_to_refresh_notification.
PullToRefreshNotification(
onRefresh: () {
return Future<bool>.delayed(Duration.zero, () {
return true;
});
},
pullBackOnRefresh: true,
maxDragOffset: 200,
pullBackCurve: Curves.linear,
pullBackDuration: const Duration(milliseconds: 300),
),
使用场景不同,我并不是刷新场景,我直接返回了,依然有停留时间。
from pull_to_refresh_notification.
200毫秒?? 你是啥场景??你着急就fork 改下。我并不清楚你这样做的目的
from pull_to_refresh_notification.
PullToRefreshNotification(
onRefresh: () {
return Future<bool>.delayed(Duration.zero, () {
return true;
});
},
pullBackOnRefresh: true,
maxDragOffset: 200,
pullBackCurve: Curves.linear,
pullBackDuration: const Duration(milliseconds: 300),
child: PullToRefreshContainer((info) {
double offset = info?.dragOffset ?? 0;
return Container(
width: double.infinity,
height: 220 + offset,
color: Colors.red,
);
}),
),
以上是我的使用场景。
maxDragOffset:下拉最大距离。
pullBackDuration:回弹动画时长。
当我下拉到最大距离后,放手,会有停留时间。
当我修改为,
const Duration _kIndicatorSnapDuration = Duration.zero;
就没有停留时间了。
所以我希望可以开放此参数。
from pull_to_refresh_notification.
那你完全可以不用这个组件呢。。你这个动作都没有刷新效果,你用ios 的物理效果就行了。也没有任何状态可言,把产品打一顿吧
from pull_to_refresh_notification.
可以看_show这个方法,是在执行 animateTo 后才调用了onRefresh
from pull_to_refresh_notification.
NestedScrollView-TabBarView
SliverAppBar-FlexibleSpaceBar-zoomBackground
效果失效
所以很尴尬
from pull_to_refresh_notification.
我的意思是。你可以自己写。这是刷新组件。不是动画组件
from pull_to_refresh_notification.
我明白您的意思。
单纯以刷新组件来说,onRefresh的返回应该是可以控制停留时长的吧。
如果以测试的角度来看,这会是个BUG。App停留了150毫秒后调用onRefresh,访问后台50毫秒返回数据,总停留了200毫秒,App端不看源码的话会很纳闷,怎么会停留这么长时间。
您觉得呢?
from pull_to_refresh_notification.
Related Issues (20)
- 报错'_notificationDragOffset == null': is not true.
- How can i make the typical material pull to refresh? HOT 1
- 克隆下来的例子都不能跑起来 HOT 1
- never call done event when use pullBackOnRefresh HOT 2
- 嵌套Stack的时候不可用啊
- Support null-safety HOT 1
- Show error and dismiss instead of wait for user input HOT 2
- Delay pull back HOT 2
- 滚动条 jumpTo到顶部 会触发刷新
- 能不能判断最后手指松开的时候是否达到出发条件,而不是一旦到达出发位置就开始刷新,有可能又上划到取消位置。
- 下拉刷新的动作会被内部的自动滚动的widget打断 HOT 6
- 希望可以联动,即列表下拉的过程中到顶部后接着下拉刷新,需要松开再下拉 HOT 3
- Nested scroll HOT 1
- SDK HOT 1
- support flutter 3.10 HOT 1
- [Bug report] auto refresh HOT 2
- 如何设置下啦刷新,松手滚动到设置刷新的位置才出发刷新?
- 嵌套nested_scrollview刷新过程中,下啦往上滚动,会触发bug
- [3.13.0] 出错了 ,求更新下 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pull_to_refresh_notification.