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

class TeamDetailsMonthDataWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container();
  }




  /// content
  Widget _getContentWidget() {
    return Container(
      decoration: BoxDecoration(
        color: HexColor.fromHex('#FFFFFF'),
        borderRadius: BorderRadius.circular(10),
      ),
      padding: const EdgeInsets.only(top: 31, bottom: 10),
      child: Row(
        children: <Widget>[
          /// 今日贡献
          _getLeftValueWidget(),

          /// 分割线
          VerticalDivider(width: 19, thickness: 0.5, color: HexColor.fromHex('#D8D8D8')),

          /// 贡献收入
          _getRightValueWidget(),
        ],
      ),
    );
  }

  /// 左边
  Widget _getLeftValueWidget() {
    return _getCustomWidget(text: '自购订单(个)', textColor: '#999999', textSize: 11, number: '158.58', numberColor: '#333333', numberSize: 17, icon: 'sss');
  }

  /// 右边
  Widget _getRightValueWidget() {
    return _getCustomWidget(text: '预估收益(元）', textColor: '#999999', textSize: 11, number: '158.58', numberColor: '#333333', numberSize: 17, icon: 'sss');
  }

  /// 自定义Widget
  Widget _getCustomWidget({String text, String textColor, double textSize, String number, String numberColor, double numberSize, String icon}) {
    return Column(
      children: <Widget>[
        /// number
        Text(number, style: TextStyle(color: HexColor.fromHex(numberColor), fontSize: numberSize, fontWeight: FontWeight.bold)),

        /// text
        Row(
          children: <Widget>[
            Text(text, style: TextStyle(color: HexColor.fromHex(textColor), fontSize: textSize)),

            /// icon
            Visibility(visible: !EmptyUtil.isEmpty(icon), child: Container(width: 11, height: 11, color: Colors.red))
          ],
        )
      ],
    );
  }
}
