flutter_swiper icon indicating copy to clipboard operation
flutter_swiper copied to clipboard

Page indicator colors

Open Ibrahim229 opened this issue 3 years ago • 1 comments

When screen open with swiper on it, Indicator color shows in black and then changed to the color that i choose in DotSwiperPaginationBuilder 155299156_1101210256972166_1259945028945106458_n

that's my code: new Swiper( itemBuilder: (BuildContext context, int index) { return new Container( padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 0), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Image.asset( introContent[index], fit: BoxFit.contain, height: MediaQuery.of(context).size.height * 0.205, width: MediaQuery.of(context).size.width * 0.5912, ), SizedBox( height: MediaQuery.of(context).size.height * 0.05, ), Text( AppLocalizations.of(context) .translate('intro_title_${index + 1}'), style: Theme.of(context) .textTheme .headline5 .copyWith(height: 1.4), textAlign: TextAlign.center, ), SizedBox( height: 12, ), Text( AppLocalizations.of(context) .translate('intro_content_${index + 1}'), style: Theme.of(context).textTheme.subtitle1.copyWith( color: AppColors.charcoal100, height: 1.6), textAlign: TextAlign.center, ) ], )); }, autoplayDelay: 5000, indicatorLayout: PageIndicatorLayout.SCALE, autoplay: true, itemCount: introContent.length, pagination: new SwiperPagination( alignment: Alignment.bottomCenter, builder: new DotSwiperPaginationBuilder( space: 8, size: 12, activeSize: 12, color: AppColors.silverGreen, activeColor: AppColors.darkBlueGreen), ), ),

Ibrahim229 avatar Feb 27 '21 13:02 Ibrahim229

If anyone else has this issue in the future, I found that setting:

indicatorLayout: PageIndicatorLayout.NONE

Solved the issue. The size and activeSize parameters of DotSwiperPaginationBuilder will give you active and not active page size difference.

Hope this helps!

jamesnicholls04 avatar Apr 20 '21 22:04 jamesnicholls04