有没有办法扑来,让PageView跳过当前屏幕和新选择的屏幕之间的屏幕?
我有一个带有5个屏幕的pageView,当我从屏幕[0]开始时,动画播放到屏幕[4]时,它也加载了它们之间的所有屏幕,并简要显示它们。
结果是在每个“中间”屏幕上都调用了Initstate,这些屏幕仅在AnimateTapage Animation的屏幕上非常简短地显示,这是我不想要的。
无论如何,是否可以跳过“中间”页面,或者只是在动画播放时根本不让它们加载?提前致谢。
I have a PageView with 5 screens in it, when I start at screen [0], and animateToPage over to screen [4], it loads all the screens between them as well and also shows them briefly.
The consequence is that initState is called on each of those 'in-between' screens that are only very briefly shown on screen in the animateToPage animation, which is what I don't want.
Is there anyway to skip the 'in-between' pages, or just not let them load at all while the animateToPage is playing? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用“ jumptopage”而不是“ animateTopage”
或使用像该图像的“ pagecontroller”
在此处输入图像描述
use "jumpToPage" instead of "animateToPage"
Or use "PageController" like that image
enter image description here