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

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

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      padding: EdgeInsets.fromLTRB(20.w, 20.w, 20.w, 20.w),
      margin: EdgeInsets.fromLTRB(0, 7, 0, 7),
      width: 345.w,
      height: 120.w,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(20),
        gradient: LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
          colors: [
            Color(0xffE7B820),
            Color(0xff0069B7),
          ],
        ),

        // border: Border.all(
        //   color: Colors.blue,
        //   width: 2,
        // ),
      ),
      child: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,

            children: [
              Row(
                children: [
                  Container(
                    width: 32.w,
                    height: 32.w,
                    alignment: Alignment.center,
                    // margin: EdgeInsets.fromLTRB(20.w, 20.w, 0, 0),
                    padding: EdgeInsets.fromLTRB(5, 5, 5, 5),
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(100),
                        color: Colors.white),
                    child: Image(
                      image: NetworkImage(
                          'https://yz-offical.oss-accelerate.aliyuncs.com/bank-logo/3.png'),
                      width: 20.w,
                      height: 20.w,
                    ),
                  ),
                  Container(
                    margin: EdgeInsets.fromLTRB(15.w,0, 0, 0),
                    padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
                    child: Text('中国瑞士军刀银行', style: TextStyle(
                      color: Colors.white,
                    ),),
                  )
                ],
              ),
              Container(
                padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
                child: Text('**** 8888', style: TextStyle(
                  fontSize: 18.sp,
                  color: Colors.white,
                ),),
              )

            ],
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              Container(
                height: 45.w,
                alignment: Alignment.bottomRight,
                child:  GestureDetector(
                  onTap: () {
                    print('点我接触绑定');
                  },
                  child: Text(
                    '解除绑定',
                    style: TextStyle(
                      color: Colors.white,
                    ),
                  ),
                ),
              ),

            ],
          ),
        ],
      ),
    );
  }
}
