我在 Flutter Activity 中使用 Swiper 作为 slider 我想将 Swiper 点指示器颜色从蓝色(默认)更改为自定义,但我无法找到如何更改指示器颜色的方法,我也想更改指示器内部的位置容器。
最佳答案
我通过在 Swiper 小部件中添加以下代码找到了此问题的解决方案。
pagination: new SwiperPagination(
alignment: Alignment.bottomCenter,
builder: new DotSwiperPaginationBuilder(
color: Colors.grey, activeColor: Color(0xff38547C)),
),
control: new SwiperControl(
color: Color(0xff38547C),
),
添加此代码后,输出如下所示:关于android-studio - 如何在 Flutter 中更改 Swiper 分页颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62737307/