copyWith method
NotificationSettingsEntity
copyWith({
- bool? isEnabled,
- bool? allowSound,
- bool? allowVibration,
- bool? allowLights,
- bool? allowBadge,
- String? soundPath,
- List<
int> ? vibrationPattern, - bool? quietHoursEnabled,
- TimeOfDay? quietHoursStart,
- TimeOfDay? quietHoursEnd,
- Map<
String, NotificationChannelSettings> ? channels, - Map<
String, NotificationGroupSettings> ? groupSettings,
Creates a copy of this settings entity with updated fields.
Implementation
NotificationSettingsEntity copyWith({
bool? isEnabled,
bool? allowSound,
bool? allowVibration,
bool? allowLights,
bool? allowBadge,
String? soundPath,
List<int>? vibrationPattern,
bool? quietHoursEnabled,
TimeOfDay? quietHoursStart,
TimeOfDay? quietHoursEnd,
Map<String, NotificationChannelSettings>? channels,
Map<String, NotificationGroupSettings>? groupSettings,
}) {
return NotificationSettingsEntity(
isEnabled: isEnabled ?? this.isEnabled,
allowSound: allowSound ?? this.allowSound,
allowVibration: allowVibration ?? this.allowVibration,
allowLights: allowLights ?? this.allowLights,
allowBadge: allowBadge ?? this.allowBadge,
soundPath: soundPath ?? this.soundPath,
vibrationPattern: vibrationPattern ?? this.vibrationPattern,
quietHoursEnabled: quietHoursEnabled ?? this.quietHoursEnabled,
quietHoursStart: quietHoursStart ?? this.quietHoursStart,
quietHoursEnd: quietHoursEnd ?? this.quietHoursEnd,
channels: channels ?? this.channels,
groupSettings: groupSettings ?? this.groupSettings,
);
}