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

class LastNewsItem extends StatelessWidget {
  final Map<String, dynamic> lastNews;
  void Function() onItemTap;

  LastNewsItem({required this.lastNews, required this.onItemTap});

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        MyAssetImage(
          lastNews['category_icon'],
          width: 80,
          height: 80,
        ),
        MyTextView(
          lastNews['category_name'],
          marginTop: 9,
          fontSize: 14,
          isFontMedium: true,
          textColor: context.appColors.textBlack,
        ),
      ],
    ).marginOnly(right: 5).onTap(onItemTap);
  }
}
