Skip to content

Instantly share code, notes, and snippets.

@becek2n
Created May 8, 2020 16:00
Show Gist options
  • Save becek2n/aa9bbb43c3d78d0fb45fc04cb501f5d9 to your computer and use it in GitHub Desktop.
Save becek2n/aa9bbb43c3d78d0fb45fc04cb501f5d9 to your computer and use it in GitHub Desktop.
CarouselSlider(
items: items,
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,
pauseAutoPlayOnTouch: Duration(seconds: 10),
enlargeCenterPage: true,
onPageChanged: callbackFunction,
scrollDirection: Axis.horizontal,
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment