import 'package:e_commerce_training/res/R.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class NotificationRow extends StatelessWidget {
  //final PayloadData _paymentData;
  final VoidCallback expandCallback;

  NotificationRow(this.expandCallback);

  @override
  Widget build(BuildContext context) {
    // bool _isRead = _paymentData?.readAt != null;
    // bool _isExpand = _paymentData?.isExpand ?? false;
    return Visibility(
      //visible: _paymentData != null,
      child: Container(
        //color: _isRead ? R.color.white : R.color.grey_100,
        padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0),
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Container(
              width: 101.w,
              height: 101.w,
              margin: EdgeInsets.only(right: 10.0),
              decoration: BoxDecoration(
                image: new DecorationImage(
                  image: new AssetImage(R.drawable.ic_logo),
                  fit: BoxFit.cover,
                ),
                border: Border.all(color: Colors.blueAccent, width: 0.5),
                borderRadius: BorderRadius.all(Radius.circular(50)),
              ),
            ),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  // Text(_paymentData?.title ?? "",
                  //     maxLines: _isExpand == true ? 100 : 1,
                  //     overflow: TextOverflow.ellipsis,
                  //     style: TextStyle(
                  //         fontSize: size(45),
                  //         color: R.color.black,
                  //         fontWeight:
                  //             _isRead ? FontWeight.normal : FontWeight.bold)),
                  SizedBox(
                    height: 2.0,
                  ),
                  // Text(
                  //   Utils.parseStringDateToString(
                  //           _paymentData?.createdTime,
                  //           Const.DATE_TIME_CREATE_SV_FORMAT,
                  //           Const.DATE_FORMAT) ??
                  //       "",
                  //   style: TextStyle(
                  //       fontSize: size(30),
                  //       color: R.color.grey,
                  //       fontWeight: FontWeight.normal),
                  // ),
                  SizedBox(
                    height: 2.0,
                  ),
//                  Html(data: _paymentData?.body ?? _paymentData?.message ?? "", ),
//                   Text(_paymentData?.body ?? "",
//                       maxLines: _isExpand == true ? 100 : 3,
//                       overflow: TextOverflow.ellipsis,
//                       style: TextStyle(
//                           fontSize: size(37),
//                           color: R.color.black,
//                           fontWeight:
//                               _isRead ? FontWeight.normal : FontWeight.bold)),
                ],
              ),
            ),
            SizedBox(
              height: 10.0,
            ),
            // IconButton(
            // onPressed:()=> expandCallback(),
            //   icon: Icon(
            //   _isExpand == true ? MdiIcons.chevronUp : MdiIcons.chevronDown,
            //   color: R.color.grey,
            //   size: height(50),
            // ),
            // )
          ],
        ),
      ),
    );
  }
}
