part of study;

class HomeCard extends StatelessWidget {
  final String? title;
  const HomeCard({
    super.key,
    this.title,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      // margin:EdgeInsets.only(left: 10,right: 10,top: 100,bottom: 100),
      // height: 100,
      // margin: const EdgeInsets.fromLTRB(10, 10, 10,0),
      color: Colors.yellow,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        children: [
          Container(
            height: 40,
            color: Colors.red,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(title.toString()),
                Row(
                  children: [
                    const Text('查看全部'),
                    SizedBox(width: 10,),
                    Container(
                      height: 10,
                      width: 4,
                      color: Colors.cyan,
                    )
                  ],
                )
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.all(10),
            color: Colors.blueAccent,
            // color: Colors.cyan,
           child: Row(
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
               Container(
                 height: 160,
                 width: 100,
                 color: Colors.cyan,
               ),
               Expanded(
                 child: Container(
                   color: Colors.red,
                   margin: EdgeInsets.all(10),
                   child: const Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     // mainAxisAlignment: MainAxisAlignment.start,
                     children: [
                       Text('名称',textAlign: TextAlign.start,),
                       SizedBox(height: 20,),
                       Text(
                         '描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述',
                         maxLines: 3,
                         overflow: TextOverflow.ellipsis,
                       )
                     ],
                   ),
                 ),
               )
             ],
           ),
          ),
        ],
      ),
    );
  }
}
