123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- import 'package:cpt_main/modules/demo_page.dart';
- import 'package:cpt_main/modules/notification/notification_group_data.dart';
- import 'package:cs_resources/generated/assets.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 NotificationItem extends StatelessWidget {
- final String item;
- final int index;
- const NotificationItem({
- required this.item,
- required this.index,
- });
- @override
- Widget build(BuildContext context) {
- return Container(
- width: double.infinity,
- color: context.appColors.whiteBG,
- padding: const EdgeInsets.only(left: 11, right: 15, top: 10.5),
- child: Column(
- children: [
- Row(
- children: [
- const MyAssetImage(Assets.mainNotificationItemIcon, width: 42.5, height: 42.5).marginOnly(right: 16),
- Column(
- children: [
- //标题
- Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- //未读的小圆点
- Container(
- width: 6,
- height: 6,
- margin: const EdgeInsets.only(right: 8.5),
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: context.appColors.tabBgSelectedPrimary,
- ),
- ),
- //消息标题
- MyTextView(
- "NEW ANNOUNCEMENT",
- fontSize: 16,
- isFontBold: true,
- textColor: context.appColors.textBlack,
- maxLines: 2,
- ).expanded(),
- //消息时间
- MyTextView(
- "10:19 AM",
- fontSize: 13,
- isFontRegular: true,
- textColor: context.appColors.textLightPurple,
- ),
- ],
- ),
- //内容
- Row(
- children: [
- //文本内容
- MyTextView(
- "Standard operating procedure for replacement vehicles andover night parking vehicles.",
- fontSize: 15,
- marginRight: 15,
- isFontRegular: true,
- textColor: context.appColors.textBlack,
- ).expanded(),
- //图片
- MyLoadImage(
- "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
- width: 87.5,
- height: 60.5,
- ),
- ],
- ).marginOnly(top: 9),
- ],
- ).expanded(),
- ],
- ),
- const SizedBox(height: 17.5),
- Divider(
- height: 0.5,
- color: context.appColors.backgroundDark,
- ),
- ],
- ),
- );
- }
- }
|