Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
notification_card.dart
Go to the documentation of this file.
1import '/features/notifications/domain/entities/notification_entity.dart';
2import 'package:flutter/material.dart';
3import 'package:flutter_screenutil/flutter_screenutil.dart';
4import 'package:intl/intl.dart';
5
6class NotificationCard extends StatelessWidget {
8
10 super.key,
11 required this.notification,
12 });
13
14 @override
15 Widget build(BuildContext context) {
16 return Container(
17 decoration: BoxDecoration(
18 borderRadius: BorderRadius.circular(10),
19 color: Theme.of(context).colorScheme.surface,
20 ),
21 child: Padding(
22 padding: EdgeInsets.all(10.sp),
23 child: Row(
24 crossAxisAlignment: CrossAxisAlignment.center,
25 children: [
26 Expanded(
27 child: Column(
28 crossAxisAlignment: CrossAxisAlignment.start,
29 children: [
30 Text(
31 DateFormat('d MMMM yyyy').format(
32 notification.createDate ?? DateTime.now(),
33 ),
34 style: Theme.of(context).textTheme.bodySmall?.copyWith(
35 color: Theme.of(context).colorScheme.primary,
36 fontSize: 11.sp,
37 ),
38 ),
39 SizedBox(height: 5.sp),
40 Text(
41 notification.name ?? '',
42 style: Theme.of(context).textTheme.bodySmall,
43 ),
44 ],
45 ),
46 )
47 ],
48 ),
49 ),
50 );
51 }
52}
final NotificationEntity notification
final Widget child
override Widget build(BuildContext context)
const NotificationCard({ super.key, required this.notification, })