copyWith method
Creates a copy of this notification settings but with the given fields replaced with the new values.
Implementation
NotificationSettings copyWith({
String? title,
String? body,
String? stopButton,
String? icon,
}) {
assert(title != null, 'NotificationSettings.title cannot be null');
assert(body != null, 'NotificationSettings.body cannot be null');
return NotificationSettings(
title: title ?? this.title,
body: body ?? this.body,
stopButton: stopButton ?? this.stopButton,
icon: icon ?? this.icon,
);
}