fixed pagination

This commit is contained in:
llsajjad
2025-09-27 15:27:45 +03:30
parent ca81da026d
commit 1fdbff77a1
6 changed files with 57 additions and 57 deletions
@@ -13,14 +13,18 @@ class NotificationImportantTab extends StatelessWidget {
Widget build(BuildContext context) {
final viewModel = context.watch<NotificationViewModel>();
if (viewModel.isLoadingImportant) {
if (viewModel.isLoadingImportant &&
(viewModel.importantNotificationResponse?.data?.isEmpty ?? true)) {
return const Center(child: CircularProgressIndicator());
}
final importantNotifications = viewModel.importantNotificationResponse?.data ?? [];
final importantNotifications =
viewModel.importantNotificationResponse?.data ?? [];
if (importantNotifications.isEmpty) {
return const Center(child: Text(NotificationStrings.noImportantNotifications));
return const Center(
child: Text(NotificationStrings.noImportantNotifications),
);
}
return ListView.builder(
@@ -30,9 +34,7 @@ class NotificationImportantTab extends StatelessWidget {
final notification = importantNotifications[index];
return Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: NotificationCard(
notification: notification,
),
child: NotificationCard(notification: notification),
);
},
);