import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

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

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      color: Colors.white,
      child: Shimmer.fromColors(
        baseColor: Colors.grey[300],
        highlightColor: Colors.grey[100],
        child: Center(
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: List.generate(5, (index) {
              return Expanded(
                flex: 1,
                child: Center(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Container(
                        width: double.infinity,
                        height: 20,
                        margin: EdgeInsets.only(left: 10, right: 10, bottom: 4),
                        color: Colors.white,
                      ),
                      Container(
                        width: double.infinity,
                        height: 10,
                        margin: EdgeInsets.only(left: 20, right: 20),
                        color: Colors.white,
                      ),
                    ],
                  ),
                ),
              );
            }),
          ),
        ),
      ),
    );
  }
}
