Update .gitignore to exclude Firebase configuration files and refactor notification handling in the app. Removed redundant logging and notification data storage in SharedPreferences. Introduced NotificationCheckService and NotificationStateService for improved notification management. Updated view models and UI components to utilize the new services, enhancing notification state tracking and user experience.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
/// Service to manage notification state across the app
|
||||
class NotificationStateService extends ChangeNotifier {
|
||||
bool _hasUnreadNotification = false;
|
||||
|
||||
bool get hasUnreadNotification => _hasUnreadNotification;
|
||||
|
||||
void setHasUnreadNotification(bool value) {
|
||||
if (_hasUnreadNotification != value) {
|
||||
_hasUnreadNotification = value;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
void clearUnreadNotification() => setHasUnreadNotification(false);
|
||||
}
|
||||
Reference in New Issue
Block a user