indicators function
List<Widget>
indicators(
- dynamic imagesLength,
- dynamic currentIndex,
- dynamic height,
- dynamic width,
- dynamic activeColor,
- dynamic inactiveColor,
Implementation
List<Widget> indicators(
imagesLength, currentIndex, height, width, activeColor, inactiveColor) {
return List<Widget>.generate(imagesLength, (index) {
return Container(
margin: const EdgeInsets.all(3),
width: width,
height: height,
decoration: BoxDecoration(
color: currentIndex == index ? activeColor : inactiveColor,
shape: BoxShape.circle,
),
);
});
}