使用 Carousel Slider 包 Flutter 确定是否有上一张或下一张图像

问题描述

我正在使用 Corousel Slider 包。

我希望能够消除控制所述轮播图像更改的箭头图标,以便当只有一张图像时不显示这些图标,或者如果是初始图像,则删除图标左边,让用户明白那一边没有更多的图像,同样的,当最后没有更多的图像时,我需要删除右侧的箭头图标。

这是我的代码,谢谢!!

enter image description here

                    Container(
                  //carrusel imagenes
                  margin: EdgeInsets.only(bottom: 0,top: 3),width: size.width,height: size.height * 0.5,color: IdtColors.white,child: CarouselSlider(
                      carouselController: buttonCarouselController,options: CarouselOptions(enableInfiniteScroll: false,height: double.infinity,viewportFraction: 1),items: widget._detail.gallery!
                          .map((item) => Container(
                        child: Image.network(IdtConstants.url_image + item,fit: BoxFit.cover),))
                          .toList()),)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)