copyWith method

NotificationDTO copyWith({
  1. int? id,
  2. String? tag,
  3. NotificationTypeDTO? type,
  4. String? message,
  5. DateTime? timestamp,
  6. int? deviceId,
  7. String? serialNumber,
  8. String? displayName,
})

Implementation

NotificationDTO copyWith(
    {int? id,
    String? tag,
    enums.NotificationTypeDTO? type,
    String? message,
    DateTime? timestamp,
    int? deviceId,
    String? serialNumber,
    String? displayName}) {
  return NotificationDTO(
      id: id ?? this.id,
      tag: tag ?? this.tag,
      type: type ?? this.type,
      message: message ?? this.message,
      timestamp: timestamp ?? this.timestamp,
      deviceId: deviceId ?? this.deviceId,
      serialNumber: serialNumber ?? this.serialNumber,
      displayName: displayName ?? this.displayName);
}