import 'package:flutter/material.dart';

class StepIndicator extends StatelessWidget{
  final int max;
  final int current;
  final Color color;

  const StepIndicator({super.key, required this.max, required this.current, required this.color});

  @override
  Widget build(BuildContext context) {
    return Row(
      spacing: 12,
      children: [
        Spacer(),
        ...List<Widget>.generate(max, (int index){
          return DecoratedBox(
            decoration: ShapeDecoration(
                shape: CircleBorder(side: BorderSide(color: color)),
                color: (index < current)? color: Colors.transparent
            ),
            child: SizedBox(width: 16, height: 16),
          );
        }),
        Spacer()
      ]
    );
  }
}