import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class MoneyInfoCard extends StatelessWidget {
  const MoneyInfoCard({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.topLeft,
      padding: EdgeInsets.fromLTRB(15, 10, 15, 10),
      decoration: const BoxDecoration(
          border: Border(
              bottom: BorderSide(width: 1, color: Color(0x20000000)
                  // 0x17000000
                  ))),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Column(
            mainAxisAlignment: MainAxisAlignment.center,
            //交叉轴方向从起点开始，默认为center
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                alignment: Alignment.topLeft,
                child: Text(
                  '订单收入',
                  textAlign: TextAlign.left,
                  style: TextStyle(
                    fontWeight: FontWeight.w500,
                    fontSize: 17,
                  ),
                ),
              ),
              Padding(
                padding: EdgeInsets.fromLTRB(0, 8, 0, 5),
                child: Text('2022-05-01 16:66',
                    style: TextStyle(fontSize: 15, color: Color(0xff666666))),
              ),
            ],
          ),
          RichText(
            text: TextSpan(children: <InlineSpan>[
              const TextSpan(
                  text: '+',
                  style: TextStyle(
                      color: Color(
                        0xffFF3F3F,
                      ),
                      fontSize: 22,
                      fontWeight: FontWeight.bold)),
              TextSpan(
                  text: (2559 / 100).toString(),
                  style: TextStyle(
                      color: Color(
                        0xffFF3F3F,
                      ),
                      fontSize: 22,
                      fontWeight: FontWeight.bold)),
            ]),
          ),

          // RichText(
          //   text: TextSpan(children: <InlineSpan>[
          //     const TextSpan(
          //         text: '-',
          //         style: TextStyle(color: Color(0xff00AE3A,),fontSize: 15,fontWeight: FontWeight.bold)),
          //     TextSpan(
          //         text: (5500/100).toString(),
          //         style: TextStyle(color: Color(0xff00AE3A,),fontSize: 15,fontWeight: FontWeight.bold)),
          //   ]),
          // ),
        ],
      ),
    );
  }
}
