Comments (8)
先 jumpTo 一个 maxScrollExtent - X 的值,然后在 then 里去 scrollto maxScrollExtent 试试
from gsy_flutter_demo.
感谢你的回答。X是取什么值合适点呢?我之前有试过先滚动到maxScrollExtent *0.5然后then0.6-0.7-0.8-0.9-1这种方式,但是任然会有概率会跳动一下。
from gsy_flutter_demo.
一般我是取 0.7 左右,然后 then 的时候直接就用 animate to 不用 jump 了,在 animate to 的时候重新get maxScrollExtent
from gsy_flutter_demo.
第一次jump到0.7的时候需要延时再去animate不?还有就是我这边RefreshIndicator+physics:const AlwaysScrollableScrollPhysics().applyTo(const BouncingScrollPhysics()),下拉刷新时,偶现会一直触发BouncingScrollPhysics的回弹效果,来回一直弹。我将cacheExtent设置到超级大的情况下才解决了此问题。其核心问题大概也是因为maxScrollExtent 高度不确定导致的。
from gsy_flutter_demo.
另外一个思路,跳转到末尾滚动期间修改为 ClampingScrollPhysics
,跳转结束后才改为 BouncingScrollPhysics
from gsy_flutter_demo.
这个我试过了,没用 哪怕是ClampingScrollPhysics 也会跳动一下。
from gsy_flutter_demo.
嗯嗯,我想叉了,jump 直接改的 position ,可以越过 physics ,我以前大概就是这样
scroller.jumpTo(
scroller.position.maxScrollExtent * 0.7);
Future.delayed(Duration(milliseconds: 400), () {
scroller.animateTo(scroller.position.maxScrollExtent,
duration: Duration(milliseconds: 500),
curve: Curves.linear);
});
```
from gsy_flutter_demo.
嗯,这种方式我也试过,但是不能100%保证不跳动一下。我现在使用的方式就是将cacheExtent的值修改到很大,再附带你所说的跳转方式勉强能达到大部分时间不跳动。但是还是不能保证问题。就想找一下看看有没有什么方式避免这种问题。
from gsy_flutter_demo.
Related Issues (20)
- 大佬 请问你文章中提到的ios企业签名在哪可以买 HOT 1
- 请问一下如何获取ios的唯一标识符? HOT 1
- 测试
- demo手机上打不开啊 HOT 1
- 仿真翻页动画页面ios push 进入好卡呀
- demo中的StickWidget可点击,拷贝到自己的flutter工程中,无法点击 HOT 2
- 运行报错 HOT 1
- 绘制气泡代码逻辑 HOT 1
- 引用的动画库simple_animations问题 HOT 1
- 时钟动画 HOT 2
- 列表滑动停靠效果2进入页面再出来会报错 HOT 1
- 翻页动画为啥翻不过去呢。并且可以支持其他Widget翻页吗
- web版在线测试打不开 HOT 1
- 我想问一下flutter web支持微前端框架吗 HOT 2
- ListViewLinkListView tag:bug
- 编译报错
- 项目报错,有劳郭大 HOT 3
- 编译报错啊 HOT 1
- 大佬,Flutter自定义相机录制视频的库,全网貌似都没有。请问你有兴趣撸一个么?😂
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 gsy_flutter_demo.