diff --git a/lib/src/swiper_pagination.dart b/lib/src/swiper_pagination.dart index a866de2..50c7038 100644 --- a/lib/src/swiper_pagination.dart +++ b/lib/src/swiper_pagination.dart @@ -115,14 +115,12 @@ class RectSwiperPaginationBuilder extends SwiperPlugin { for (int i = 0; i < itemCount; ++i) { bool active = i == activeIndex; Size size = active ? this.activeSize : this.size; - list.add(SizedBox( + list.add(Container( width: size.width, height: size.height, - child: Container( - color: active ? activeColor : color, - key: Key("pagination_$i"), - margin: EdgeInsets.all(space), - ), + color: active ? activeColor : color, + key: Key("pagination_$i"), + margin: EdgeInsets.all(space), )); }