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.w,
            color: Colors.red,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(title.toString()),
                Row(
                  children: [
                    const Text('查看全部'),
                    SizedBox(width: 10.w,),
                    Container(
                      height: 10.w,
                      width: 4.w,
                      color: Colors.cyan,
                    )
                  ],
                )
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.all(10.w),
            color: Colors.blueAccent,
            // color: Colors.cyan,
           child: Row(
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
               Container(
                 height: 160.w,
                 width: 100.w,
                 color: Colors.cyan,
               ),
               Expanded(
                 child: Container(
                   color: Colors.red,
                   margin: EdgeInsets.all(10.w),
                   child:  Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     // mainAxisAlignment: MainAxisAlignment.start,
                     children: [
                       Text('名称',textAlign: TextAlign.start,),
                       SizedBox(height: 20.w,),
                       Text(
                         '描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述',
                         maxLines: 3,
                         overflow: TextOverflow.ellipsis,
                       )
                     ],
                   ),
                 ),
               )
             ],
           ),
          ),
        ],
      ),
    );
  }
}
