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

class GoodsDetailsFooterSkeleton extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      color: Colors.white,
      padding: const EdgeInsets.only(left: 21, right: 12.5, top: 12.5, bottom: 12.5),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          Row(
            children: <Widget>[
              _shimmerWidget(width: 30, height: 30,),
              const SizedBox(width: 35),
              _shimmerWidget(width: 30, height: 30,),
            ],
          ),

          _shimmerWidget( height: 44, width: 180, radius: 22),
        ],
      ),
    );
  }

  Widget _shimmerWidget({double width, double height, double radius = 0}) {
    return Shimmer.fromColors(
      baseColor: Colors.grey[300],
      highlightColor: Colors.grey[100],
      child: Container(
        width: width,
        height: height,
        decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(radius)),
      ),
    );
  }
}
