hide notification circular when call mark as read
This commit is contained in:
@@ -224,4 +224,10 @@ class HomeViewModel with ChangeNotifier {
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void serUnreadNotificationFalse(){
|
||||
_hasUnreadNotification = false;
|
||||
notifyListeners();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/utils/app_toast.dart';
|
||||
import 'package:tm_app/core/utils/result.dart';
|
||||
import 'package:tm_app/data/repositories/notification_repository.dart';
|
||||
import 'package:tm_app/data/services/model/notification__response/notification_response_model.dart';
|
||||
import 'package:tm_app/view_models/home_view_model.dart';
|
||||
import 'package:tm_app/views/notification/strings/notification_strings.dart';
|
||||
|
||||
class NotificationViewModel with ChangeNotifier {
|
||||
@@ -291,6 +293,8 @@ class NotificationViewModel with ChangeNotifier {
|
||||
NotificationStrings.allNotificationMarkedAsRead,
|
||||
);
|
||||
}
|
||||
final homeViewModel = context.read<HomeViewModel>();
|
||||
homeViewModel.serUnreadNotificationFalse();
|
||||
} else {
|
||||
_errorMessage = message;
|
||||
if (context.mounted) {
|
||||
|
||||
Reference in New Issue
Block a user