card_swiper icon indicating copy to clipboard operation
card_swiper copied to clipboard

await SwiperController.Next() problem

Open anton-dot opened this issue 7 months ago • 0 comments

When i use await in my custom loop function the app hangs

SwiperController SwiperUI = SwiperController();
 while (IsAutoPlay) {
      await SwiperUI.next();
     //some other logics goes here
}

When i use without await - app works fine, but i need to use delay

SwiperController SwiperUI = SwiperController();
 while (IsAutoPlay) {
      SwiperUI.next();
    await Future.delayed(const Duration(seconds: 2));
}

anton-dot avatar Jul 22 '24 07:07 anton-dot