import 'package:cpt_main/modules/feedback/feedback_page.dart';
import 'package:cs_resources/theme/app_colors_theme.dart';
import 'package:domain/entity/latest_news_page_entity.dart';
import 'package:flutter/material.dart';
import 'package:widgets/my_load_image.dart';
import 'package:widgets/my_text_view.dart';

class ManagementGuideItem extends StatelessWidget {
  final LatestNewsList? item;

  ManagementGuideItem({
    this.item,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: context.appColors.lightBlueBg,
        borderRadius: BorderRadius.circular(5.0), // 5个圆角
        boxShadow: [
          BoxShadow(
            color: context.appColors.itemBGShadow, // 阴影颜色，并且设置透明度
            offset: const Offset(0, 1.5), // 阴影的偏移量
            blurRadius: 2.5, // 模糊半径
            spreadRadius: 1.5, // 扩散半径
          ),
        ],
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          AspectRatio(
            aspectRatio: 165 / 108, // 设置宽高比例为 165:108
            child: MyLoadImage(
              item?.coverImage,
              width: double.infinity,
              height: double.infinity,
            ),
          ),
          MyTextView(
            item?.title ?? "-",
            marginLeft: 9,
            marginTop: 15,
            maxLines: 2,
            fontSize: 15,
            isFontMedium: true,
            textColor: context.appColors.tabTextUnSelectedPrimary,
          ),
        ],
      ),
    );
  }
}
