coolIndicator function
Widget
coolIndicator(
{ - int? slideIndex = 0,
- int? index = 0,
- Color? activeColor = const Color(0xff000000),
- Color? unactiveColor = const Color(0xffFFFFFF),
})
Implementation
Widget coolIndicator({
int? slideIndex = 0,
int? index = 0,
Color? activeColor = const Color(0xff000000),
Color? unactiveColor = const Color(0xffFFFFFF),
}) {
return Container(
margin: const EdgeInsets.only(left: 1.0, right: 1.0, bottom: 0.0),
height: slideIndex == index ? 4 : 3,
width: slideIndex == index ? 20 : 3,
decoration: BoxDecoration(
color: index! <= slideIndex! ? activeColor : unactiveColor,
borderRadius: BorderRadius.all(
Radius.circular(
70.0,
),
),
),
);
}