Giter Site home page Giter Site logo

在GetX框架下使用card_swiper有几个问题,设置loop=true的时候,卡片会随机滚动一会才会停下来 about card_swiper HOT 8 OPEN

zjypp avatar zjypp commented on August 18, 2024 2
在GetX框架下使用card_swiper有几个问题,设置loop=true的时候,卡片会随机滚动一会才会停下来

from card_swiper.

Comments (8)

pangyu646182805 avatar pangyu646182805 commented on August 18, 2024 1

加个Visibility 没有数据的隐藏 有数据的时候显示

from card_swiper.

86linksrain avatar 86linksrain commented on August 18, 2024

哥们问题解决了么

from card_swiper.

zjypp avatar zjypp commented on August 18, 2024

from card_swiper.

LiuDongCai avatar LiuDongCai commented on August 18, 2024

我也遇到这个问题了。。你换成什么插件了啊?

你也碰见这个问题了吗?没有解决。但是我感觉这个问题很基础啊,如果这个问题都有的话,应该有很多人反馈。但是我看反馈区几乎没有人反馈这个问题。我感觉是不是我们在哪里使用错了,在使用getx的时候。最后我换了另外一个插件。

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年02月20日 19:44 | | 收件人 | @.> | | 抄送至 | Jason @.>@.> | | 主题 | Re: [TheAnkurPanchani/card_swiper] 在GetX框架下使用card_swiper有几个问题,设置loop=true的时候,卡片会随机滚动一会才会停下来 (Issue #98) | 哥们问题解决了么 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

from card_swiper.

zjypp avatar zjypp commented on August 18, 2024

from card_swiper.

gcks568 avatar gcks568 commented on August 18, 2024

Widget getSwiper(){ return Obx(() { return Swiper( itemBuilder:(BuildContext context,int index){ return _swiperItem(context,index); }, itemCount: state.ktszWordListEntity.value.result.length, pagination: null, control: null, loop: false, viewportFraction: 0.9, scale: 1, index: 0,///插件有bug,只有0起作用。 onIndexChanged: (index){ controller.slide(index); }, ); }); } 1.当设置loop=true的时候,页面刚开始卡片会随机滚动一会,才会停下来,停下来的位置也是随机的,设置loop=false以后没这个问题 2.当设置index 非0点时候,这个参数不起作用。

第1个问题,如果不是要Getx的Obx包裹的话,loop=true是起作用。 是不是在GetX下使用card_swiper不是这样的用法吗?

You can add a key to Swiper:

 final list  = ....; // your data.
Swiper(
 key: ValueKey(list.isNotEmpty),
 itemCount: list.length,
)

from card_swiper.

giantss avatar giantss commented on August 18, 2024

有解决方案吗?

from card_swiper.

zjypp avatar zjypp commented on August 18, 2024

from card_swiper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.