Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
notifications_loaded_view.dart
Go to the documentation of this file.
1import '/features/notifications/domain/entities/notification_entity.dart';
2import '/features/notifications/presentation/notifications_screen/widgets/notification_card.dart';
3import 'package:flutter/material.dart';
4import 'package:flutter_screenutil/flutter_screenutil.dart';
5
6class NotificationLoadedView extends StatelessWidget {
8 super.key,
9 required this.notifications,
10 });
11
12 final List<NotificationEntity> notifications;
13
14 @override
15 Widget build(BuildContext context) {
16 return notifications.isEmpty
17 ? Center(
18 child: Text(
19 "Nothing to show here right now.",
20 style: Theme.of(context).textTheme.bodySmall,
21 ),
22 )
23 : ListView.separated(
24 padding: EdgeInsets.symmetric(
25 horizontal: 15.sp,
26 vertical: 10,
27 ),
28 itemCount: notifications.length,
29 separatorBuilder: (context, index) => SizedBox(height: 10.sp),
30 itemBuilder: (context, index) {
31 final notification = notifications[index];
33 },
34 );
35 }
36}
final List< NotificationEntity > notifications
final NotificationEntity notification
final Widget child
override Widget build(BuildContext context)
const NotificationCard({ super.key, required this.notification, })
const NotificationLoadedView({ super.key, required this.notifications, })