createPainter method

FlIndicatorPainter createPainter(
  1. Color activeColor,
  2. Color color
)

Implementation

FlIndicatorPainter createPainter(Color activeColor, Color color) {
  final Paint paint = Paint();
  switch (layout) {
    case FlIndicatorType.none:
      return _NonePainter(this, position, index, paint, activeColor, color);
    case FlIndicatorType.slide:
      return _SlidePainter(this, position, index, paint, activeColor, color);
    case FlIndicatorType.warm:
      return _WarmPainter(this, position, index, paint, activeColor, color);
    case FlIndicatorType.color:
      return _ColorPainter(this, position, index, paint, activeColor, color);
    case FlIndicatorType.scale:
      return _ScalePainter(this, position, index, paint, activeColor, color);
    case FlIndicatorType.drop:
      return _DropPainter(this, position, index, paint, activeColor, color);
    default:
      throw Exception('Not a valid layout');
  }
}