import 'package:hmg_patient_app/core/model/pharmacies/PharmacyProduct.dart';
import 'package:flutter/material.dart';

class DiscountDescription extends StatelessWidget {
  final PharmacyProduct? product;

  const DiscountDescription({Key? key, this.product}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: 50,
      color: Colors.yellowAccent,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Expanded(
            flex: 1,
            child: Container(
              alignment: Alignment.centerRight,
              child:  Text(
               product!
                    .discountDescription!,
                style: TextStyle(
                    fontWeight: FontWeight.bold,
                    fontSize: 17),
              ),
            ),
          ),
          SizedBox(
            width: 10,
          ),
          Expanded(
            flex: 0,
            child: Container(
              child: Image(
                image: AssetImage(
                    'assets/images/offer.png'),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
