【问题标题】:how to use slider and timer together in Flutter如何在 Flutter 中同时使用滑块和计时器
【发布时间】:2020-07-26 13:40:26
【问题描述】:

我是 Flutter 的新手,需要您的帮助。 我想在滑块中使用图像,我已经在其中创建了没有问题的图像,但我需要一个建议,我想使用计时器滑动该滑块。 我该怎么做,请帮忙。我,从 2 周开始就卡在这个问题上。

谢谢

【问题讨论】:

标签: flutter widget slider flutter-slider flutter-timer


【解决方案1】:
CarouselSlider(
   items: items,
   options: CarouselOptions(
      height: 400,
      aspectRatio: 16/9,
      viewportFraction: 0.8,
      initialPage: 0,
      enableInfiniteScroll: true,
      reverse: false,
      autoPlay: true,
      autoPlayInterval: Duration(seconds: 3),
      autoPlayAnimationDuration: Duration(milliseconds: 800),
      autoPlayCurve: Curves.fastOutSlowIn,
      enlargeCenterPage: true,
      onPageChanged: callbackFunction,
      scrollDirection: Axis.horizontal,
   )
 )

用户轮播滑块封装到带有计时器的滑块

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-10-02
    • 2021-04-11
    • 2023-01-25
    • 2020-02-23
    • 2018-02-11
    • 2019-10-13
    • 1970-01-01
    • 2021-07-15
    相关资源
    最近更新 更多