mirrored_repositories/ecommerce-riverpod-clean-architecture/lib/feature/category/presentation
import 'package:flutter/material.dart';

class CategoryLoadingShimmer extends StatelessWidget {
  const CategoryLoadingShimmer({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 50,
      margin: const EdgeInsets.symmetric(
        vertical: 16,
      ).copyWith(left: 16),
      child: ListView.separated(
        scrollDirection: Axis.horizontal,
        itemCount: 5,
        itemBuilder: (context, index) {
          return Container(
            padding: const EdgeInsets.symmetric(
              horizontal: 16,
              vertical: 10,
            ),
            decoration: BoxDecoration(
              color: Colors.grey[200],
              borderRadius: BorderRadius.circular(8),
            ),
            child: Center(
              child: Container(
                height: 50,
                width: 100,
                color: Colors.grey[200],
              ),
            ),
          );
        },
        separatorBuilder: (context, index) {
          return const SizedBox(width: 8);
        },
      ),
    );
  }
}
