We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
code
Swiper( itemBuilder: (BuildContext context, int index) { return Image.asset( 'images/part1_header_background.png', fit: BoxFit.fill, ); }, itemCount: 3, pagination: new SwiperPagination( alignment: Alignment.bottomRight, margin: EdgeInsets.only(bottom: 20, right: 25), builder: SwiperPagination.rect, ), autoplay: true)
The text was updated successfully, but these errors were encountered:
Modify the code under RectSwiperPaginationBuilder
for (int i = 0; i < itemCount; ++i) { bool active = i == activeIndex; Size size = active ? this.activeSize : this.size; list.add(SizedBox( width: size.width, height: size.height, child: Container( color: active ? activeColor : color, key: Key("pagination_$i"), margin: EdgeInsets.all(space), ), )); }
to
for (int i = 0; i < itemCount; ++i) { bool active = i == activeIndex; Size size = active ? this.activeSize : this.size; list.add(Container( width: size.width, height: size.height, color: active ? activeColor : color, key: Key("pagination_$i"), margin: EdgeInsets.all(space), )); }
Can solve this problem
Sorry, something went wrong.
Thanks @chenghui-0829 this fixed worked for me :)
No branches or pull requests
code
Swiper(
itemBuilder: (BuildContext context, int index) {
return Image.asset(
'images/part1_header_background.png',
fit: BoxFit.fill,
);
},
itemCount: 3,
pagination: new SwiperPagination(
alignment: Alignment.bottomRight,
margin: EdgeInsets.only(bottom: 20, right: 25),
builder: SwiperPagination.rect,
),
autoplay: true)
The text was updated successfully, but these errors were encountered: