Use flutter to achieve infinite intercast image effect, customize indicator color and position, there is no time limit to page turning controller.



Version:

Flutter_swiper: ^ 1.1.6Copy the code

The website address

use

Class SwiperDiy extends StatelessWidget{final List<String> swiperList; SwiperDiy({Key key,this.swiperList}):super(key:key); @override Widget build(BuildContext context) {return Padding(Padding: EdgeInsets. FromLTRB (15,10,15,10),child: Container( height: 90, child: Swiper( itemCount: swiperList.length, pagination: SwiperPagination( builder: DotSwiperPaginationBuilder (/ / / set the color indicator color: Colors. White, activeColor: Colors. BlueAccent,),), the autoplay: True, onTap: (index){return scaffold.of (context).showsnackbar (SnackBar(content: Text(" click :$index"))); }, itemBuilder: (BuildContext context,int index){ return Image.asset(swiperList[index],fit: BoxFit.fill,); },),),); }}Copy the code