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

class WalletDataSkeleton extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
      decoration: BoxDecoration(
          color: Colors.white, borderRadius: BorderRadius.circular(7.5)),
      child: Shimmer.fromColors(
        baseColor: Colors.grey[300],
        highlightColor: Colors.grey[100],
        child: Column(
          children: <Widget>[
            Container(
              width: double.infinity,
              height: 85,
              child: Row(
                children: <Widget>[
                  Container(
                    margin: EdgeInsets.only(left: 15),
                    width: 26,
                    height: 34,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(4)),
                  ),
                  Expanded(
                      child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      Row(
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: <Widget>[
                          Expanded(
                            child: _createText1(),
                          )
                        ],
                      )
                    ],
                  ))
                ],
              ),
            ),
            Container(
              width: double.infinity,
              height: 60,
              child: Row(
                crossAxisAlignment: CrossAxisAlignment.center,
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Expanded(
                    child: _createText2(),
                  ),
                  Expanded(
                    child: _createText2(),
                  ),
                  Expanded(
                    child: _createText2(),
                  )
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }

  Widget _createText1() {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        Container(
          margin: EdgeInsets.only(left: 15),
          height: 15,
          width: 120,
          color: Colors.white,
        ),
        Container(
          margin: EdgeInsets.only(left: 15, right: 15, top: 4),
          height: 15,
          color: Colors.white,
        ),
      ],
    );
  }

  Widget _createText2() {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        Container(
          margin: EdgeInsets.only(left: 15),
          height: 15,
          width: 44,
          color: Colors.white,
        ),
        Container(
          margin: EdgeInsets.only(left: 15, top: 6),
          height: 15,
          width: 64,
          color: Colors.white,
        ),
      ],
    );
  }
}
