import 'package:flutter/material.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/AttentionEntity.dart';
import 'package:gmalpha_flutter/commonModel/ui/ALColors.dart';

class AttentionListItem extends StatelessWidget {
  var item;
  AttentionListItem(this.item);
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      child: Card(
        elevation: 0.0,
        child: Row(
          children: <Widget>[
            Padding(
              padding: const EdgeInsets.only(left: 16.0, right: 10.0),
              child: CircleAvatar(
                radius: 21.0,
                backgroundImage: NetworkImage(item.icon),
              ),
            ),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Container(
                    child: Text(
                      '${item.title}',
                      style: TextStyle(
                        color: ALColors.Color323232,
                        fontSize: 13.0
                      ),
                    ),
                  ),
                  Container(
                    child: Text(
                      '${item.content}',
                      style: TextStyle(
                        color: ALColors.Color323232,
                        fontSize: 13.0
                      ),
                    ),
                  ),
                  Container(
                    child: Text(
                      '${item.pushTime}',
                      style: TextStyle(
                        color: ALColors.Color8E8E8E,
                        fontSize: 10.0
                      ),
                    ),
                  )
                ],
              ),
            ),
            Padding(
              padding: const EdgeInsets.only(left: 12.0, right: 16.0),
              child: Container(
                width: 54.0,
                height: 29.0,
                child: OutlineButton(
                  padding: const EdgeInsets.only(left: 0.0, right: 0.0,),
                  borderSide: BorderSide(
                    color: ALColors.Color323232
                  ),
                  shape: RoundedRectangleBorder(borderRadius: BorderRadius.zero),
                  onPressed: () {
                    // TODO 跳转到详情页面
                  },
                  child: Text(
                    '详情',
                    style: TextStyle(
                      color: ALColors.Color323232,
                      fontSize: 13.0
                    ),
                  ),
                ),
              )
            )
          ],
        ),
      ),
    );
  }
}
