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

///
/// 商品详情评价Widget
///
class GoodsDetailsEvaluateWidget extends StatelessWidget {
  final Map<String, dynamic> model;

  const GoodsDetailsEvaluateWidget(this.model);

  /// 点击查看更多
  void _openLookMore() {}

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () => _openLookMore(),
      behavior: HitTestBehavior.opaque,
      child: Container(
        width: double.infinity,
        padding: const EdgeInsets.only(top: 15, bottom: 15, left: 12.5, right: 12.5),
        child: getMainWidget(),
      ),
    );
  }

  /// 评价以及查看更多
  Widget getMainWidget() {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: <Widget>[
        Text('宝贝评价', style: TextStyle(color: HexColor.fromHex('#333333'), fontSize: 12)),
        Text('查看更多 >', style: TextStyle(color: HexColor.fromHex('#999999'), fontSize: 11)),
      ],
    );
  }
}
