fixing conflict
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/view_models/notification_view_model.dart';
|
||||
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
||||
|
||||
import 'notification_card.dart';
|
||||
|
||||
@@ -12,8 +13,17 @@ class NotificationAllTab extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final viewModel = context.watch<NotificationViewModel>();
|
||||
final notifications =
|
||||
viewModel.allNotificationResponse?.data ?? [];
|
||||
|
||||
if (viewModel.isLoadingAll &&
|
||||
(viewModel.allNotificationResponse?.data?.isEmpty ?? true)) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
final notifications = viewModel.allNotificationResponse?.data ?? [];
|
||||
|
||||
if (notifications.isEmpty) {
|
||||
return const Center(child: Text(NotificationStrings.noNotifications));
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
controller: scrollController,
|
||||
@@ -28,3 +38,4 @@ class NotificationAllTab extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user