UserPreferencesModel class

User preferences for notification management.

Constructors

UserPreferencesModel({bool globalNotificationsEnabled = true, bool soundEnabled = true, bool vibrationEnabled = true, bool badgeEnabled = true, NotificationAlertStyle alertStyle = NotificationAlertStyle.banner, bool showPreviews = true, bool groupNotifications = true, bool notificationHistory = true, bool criticalAlertsEnabled = false, bool scheduledDelivery = false, QuietHoursSettings quietHours = const QuietHoursSettings(), Map<String, CategoryPreference> categoryPreferences = const <String, CategoryPreference>{}, List<String> blockedSenders = const <String>[], List<String> allowedSenders = const <String>[], DateTime? lastUpdated})
Creates a new user preferences model.
const
UserPreferencesModel.fromMap(Map<String, dynamic> map)
Creates user preferences from a map.
factory

Properties

alertStyle → NotificationAlertStyle
The preferred alert style for notifications.
final
allowedSenders → List<String>
List of explicitly allowed sender identifiers.
final
badgeEnabled → bool
Whether app badge updates are enabled.
final
blockedSenders → List<String>
List of blocked sender identifiers.
final
categoryPreferences → Map<String, CategoryPreference>
Preferences for specific notification categories.
final
criticalAlertsEnabled → bool
Whether critical alerts are enabled.
final
globalNotificationsEnabled → bool
Whether global notifications are enabled.
final
groupNotifications → bool
Whether to group notifications.
final
hashCode → int
The hash code for this object.
no setterinherited
lastUpdated → DateTime?
When these preferences were last updated.
final
notificationHistory → bool
Whether to keep notification history.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
quietHours → QuietHoursSettings
Quiet hours configuration.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scheduledDelivery → bool
Whether scheduled delivery is enabled.
final
showPreviews → bool
Whether to show notification previews.
final
soundEnabled → bool
Whether notification sounds are enabled.
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
vibrationEnabled → bool
Whether notification vibration is enabled.
final

Methods

copyWith({bool? globalNotificationsEnabled, bool? soundEnabled, bool? vibrationEnabled, bool? badgeEnabled, NotificationAlertStyle? alertStyle, bool? showPreviews, bool? groupNotifications, bool? notificationHistory, bool? criticalAlertsEnabled, bool? scheduledDelivery, QuietHoursSettings? quietHours, Map<String, CategoryPreference>? categoryPreferences, List<String>? blockedSenders, List<String>? allowedSenders, DateTime? lastUpdated}) → UserPreferencesModel
Creates a copy of these preferences with updated fields.
fromJson(String json) → UserPreferencesModel
Converts the object from a JSON string representation.
inherited
fromMap(Map<String, dynamic> map) → UserPreferencesModel
Converts the object from a Map representation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → String
Converts the object to a JSON string representation.
inherited
toMap() → Map<String, dynamic>
Converts the BaseDataModel object to a Map representation.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited