import 'package:flutter/material.dart';
import 'package:niogu_app/core/constants/app_color.dart';
import 'package:sizer/sizer.dart';

class CheckboxProductCard extends StatelessWidget {
  final bool isSelected;
  const CheckboxProductCard({super.key, required this.isSelected});

  @override
  Widget build(BuildContext context) {
    return AnimatedContainer(
      duration: const Duration(milliseconds: 200),
      width: 7.w,
      height: 7.w,
      decoration: BoxDecoration(
        color: isSelected ? AppColor.primaryColor : Colors.transparent,
        shape: BoxShape.circle,
        border: Border.all(
          color: isSelected ? AppColor.primaryColor : Colors.grey.shade400,
          width: 2,
        ),
      ),
      child: isSelected
          ? Icon(Icons.check, color: Colors.white, size: 5.w)
          : null,
    );
  }
}
