fixing conflict
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/utils/size_config.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';
|
||||
|
||||
class NotificationUnreadTab extends StatelessWidget {
|
||||
@@ -13,16 +12,17 @@ class NotificationUnreadTab extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final viewModel = context.watch<NotificationViewModel>();
|
||||
|
||||
if (viewModel.isLoadingUnread){
|
||||
if (viewModel.isLoadingUnread &&
|
||||
(viewModel.unreadNotificationResponse?.data?.isEmpty ?? true)) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
final notifications =
|
||||
viewModel.unreadNotificationResponse?.data ?? [];
|
||||
final notifications = viewModel.unreadNotificationResponse?.data ?? [];
|
||||
|
||||
if (notifications.isEmpty) {
|
||||
return const Center(child: Text(NotificationStrings.noUnreadNotifications,));
|
||||
return const Center(
|
||||
child: Text(NotificationStrings.noUnreadNotifications),
|
||||
);
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
|
||||
Reference in New Issue
Block a user