copyWith method
NAppUpdateState
copyWith({
- NAppUpdateStatus? status,
- InstalledSoftware? installed,
- SoftwareUpdate? update,
- SoftwareRelease? currentRelease,
- SoftwareRelease? latestRelease,
- SoftwareRelease? justUpdatedRelease,
- List<
SoftwareRelease> ? releases, - Map<
String, List< ? assetsByReleaseId,SoftwareAsset> > - bool clearJustUpdatedRelease = false,
- double? progress,
- bool clearProgress = false,
- DateTime? lastChecked,
- String? error,
- bool clearError = false,
Implementation
NAppUpdateState copyWith({
NAppUpdateStatus? status,
InstalledSoftware? installed,
SoftwareUpdate? update,
SoftwareRelease? currentRelease,
SoftwareRelease? latestRelease,
SoftwareRelease? justUpdatedRelease,
List<SoftwareRelease>? releases,
Map<String, List<SoftwareAsset>>? assetsByReleaseId,
bool clearJustUpdatedRelease = false,
double? progress,
bool clearProgress = false,
DateTime? lastChecked,
String? error,
bool clearError = false,
}) => NAppUpdateState(
status: status ?? this.status,
installed: installed ?? this.installed,
update: update ?? this.update,
currentRelease: currentRelease ?? this.currentRelease,
latestRelease: latestRelease ?? this.latestRelease,
justUpdatedRelease: clearJustUpdatedRelease
? null
: justUpdatedRelease ?? this.justUpdatedRelease,
releases: releases ?? this.releases,
assetsByReleaseId: assetsByReleaseId ?? this.assetsByReleaseId,
progress: clearProgress ? null : progress ?? this.progress,
lastChecked: lastChecked ?? this.lastChecked,
error: clearError ? null : error ?? this.error,
);