decoration method

BoxDecoration decoration(
  1. bool isActive,
  2. dynamic type
)

Implementation

BoxDecoration decoration(bool isActive, type) {
  return BoxDecoration(
    shape:
        type == IndicatorType.CIRCLE ? BoxShape.circle : BoxShape.rectangle,
    color: isActive ? activeDotColor : inactiveDotColor,
    borderRadius:
        type == IndicatorType.CIRCLE || type == IndicatorType.DIAMOND
            ? null
            : BorderRadius.circular(50),
    boxShadow: [
      BoxShadow(
        color: Colors.black.withOpacity(
          .02,
        ),
        offset: Offset(0.0, 2.0),
        blurRadius: 2.0,
      )
    ],
  );
}