Open hagen00 opened 4 years ago
Is there any solution about this issue?
@Selecao found an amazing solution in https://github.com/serenader2014/flutter_carousel_slider/issues/175#issuecomment-657736568_
Hello. I have done this but doesn't work still:
CarouselSlider(
items: imageSliders,
carouselController: carouselController,
options: CarouselOptions(
autoPlay: true,
autoPlayInterval: Duration(seconds: 7),
enlargeCenterPage: true,
aspectRatio: 1.5,
viewportFraction: 1.0,
onPageChanged: (index, reason) {
setState(() {
_current = index;
});
}),
),
I fix this, by adding key to Carousel Slider.
CarouselSlider(
key: ValueKey(carouselController),
carouselController: carouselController,
),
Getting the following error
Using this code: