import 'package:e_commerce_training/res/R.dart';

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

class CouponCardItem extends StatelessWidget {
//  final SaleData coupon;

  CouponCardItem({
    Key? key,
    //@required this.coupon,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    double width = MediaQuery.of(context).size.width;
    return Container(
      color: R.color.white,
      width: width - 200,
      child: Stack(
        alignment: Alignment.center,
        children: <Widget>[
          Card(
              child: Container(
            decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(4)),
              // image: DecorationImage(
              //     image:
              //         CachedNetworkImageProvider(coupon.featuredImageLink),
              //     fit: BoxFit.cover)),)
            ),
          )),
          Positioned(
            top: 5,
            left: 5,
            child: Card(
              shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
              child: Padding(
                padding: EdgeInsets.all(5),
                // child: Text(
                //   R.string.now,
                //   style: TextStyle(
                //     fontSize: size(30),
                //     color: green,
                //     fontWeight: FontWeight.bold,
                //   ),
                // ),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
