flutter_swiper_view는 높은 성능을 제공하는 플러터용 카루셀 위젯으로, 다양한 레이아웃 옵션과 무한 반복 기능을 제공합니다. 안드로이드, iOS, 웹, macOS, Windows, 리눅스에서 부드럽고 반응성 있는 스와이프 경험을 위해 설계되었으며, 사용자 정의 애니메이션을 지원하는 수평 및 수직 스크롤을 모두 지원합니다. 이미지 갤러리, 제품 전시, 인터랙티브 콘텐츠 슬라이더에 적합하며, 동적 UI를 위한 유연한 기반을 제공합니다. 이 패키지는 지속적으로 유지 관리되며 모든 주요 플랫폼과 호환됩니다.
The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
:sparkles::sparkles: New Features:PageTransformer
Finally, we have PageTransformer like android, just set a transformer to Swiper,
it returns a widget that has been transformed. For now, only support for layout DEFAULT.
Thanks to @FlutterRocks ,you've done great job 👏.
The control also extends from SwiperPlugin,set SwiperControl() to show default control buttons.
Parameter
Default
Description
iconPrevious
Icons.arrow_back_ios
The icon data to display previous control button
iconNext
Icons.arrow_forward_ios
The icon data to display next.
color
Theme.of(context).primaryColor
Control button color
size
30.0
Control button size
padding
const EdgeInsets.all(5.0)
Control button padding
Controller
The Controller is used to control the index of the Swiper, start or stop autoplay.You can create a controller by SwiperController() and save the instance by futher usage.
Method
Description
void move(int index, {bool animation: true})
Move to the spicified index,with animation or not
void next({bool animation: true})
Move to next
void previous({bool animation: true})
Move to previous
void startAutoplay()
Start autoplay
void stopAutoplay()
Stop autoplay
Autoplay
Parameter
Default
Description
autoplayDelay
3000
Autoplay delay milliseconds.
autoplayDisableOnInteraction
true
If set true, autoplay is disabled when use swipes.
The CustomLayoutOption is designed to describe animations.
It is very easy to specify every state of items in Swiper.
CustomLayoutOption(
startIndex: -1, /// Which index is the first item of array below
stateCount: 3/// array length
)..addRotate([ // rotation of every item
-45.0/180,
0.0,
45.0/180
])..addTranslate([ /// offset of every itemconstOffset(-370.0, -40.0),
constOffset(0.0, 0.0),
constOffset(370.0, -40.0)
])