【发布时间】:2019-12-21 18:53:02
【问题描述】:
我在我的颤振应用程序中使用CarouselSlider。我为我的轮播显示了显示点指示器。我需要在我的轮播中放置指示器。我做到了:
Stack(children: [
//my carusel
....
//my indicators
Positioned(
bottom: 2.0,
right: 20.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: _map<Widget>(
imgList,
(index, url) {
return Container(
width: 8.0,
height: 8.0,
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 2.0),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: _current == index
? Color.fromRGBO(0, 0, 0, 0.9)
: Color.fromRGBO(0, 0, 0, 0.4)),
);
},
),
),
),
]);
但我仍然需要将指标显示为:
那些:我需要在指标周围使用“圆形背景颜色”。 我怎样才能做到这一点?
我只需要“圆角背景色”。 “红色”是图像的一部分。
【问题讨论】:
标签: flutter dart flutter-layout