当前位置:网站首页>flutter_ Swiper carousel map plug-in

flutter_ Swiper carousel map plug-in

2022-06-11 01:51:00 weixin_ thirty-eight million one hundred and seven thousand fou

flutter_swiper_null_safety: ^1.0.2 # Shuffling figure

Attribute interpretation ( Commonly used )

Swiper(
  scrollDirection: Axis.horizontal,//  Direction  Axis.horizontal  Axis.vertical
  itemCount: 4, //  Number of displays 
  autoplay: true,//  AutoPager Chrome 
  itemBuilder:(){...},//  Layout construction 
  onTap:(){...}, //  Click time 
  pagination: SwiperPagination(), //  Paging instructions 
  viewportFraction: 0.8, //  Window scale 
  layout: SwiperLayout.STACK, //  layout  
  itemWidth: MediaQuery.of(context).size.width, //  Item width 
  itemHeight: MediaQuery.of(context).size.height, //  Entry height 
  autoplayDisableOnInteraction: true, //  Stop automatic page turning when the user is operating 
  loop: true, //  Wireless rotation 
  indicatorLayout: PageIndicatorLayout.SLIDE, //  Indicator layout   After trying for a long time, I didn't find out what it was 
)

Get rid of control: attribute , The left and right page turning buttons in the figure will disappear .

 

Container(
  height: ScreenUtil().setHeight(300), //  Height   plug-in unit  flutter_screenutil
  child: Swiper(
    
原网站

版权声明
本文为[weixin_ thirty-eight million one hundred and seven thousand fou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110045000224.html