copyWith method
PackageInfo
copyWith({
- String? name,
- bool? installed,
- bool? incomplete,
- bool? preinstalled,
- bool? compatible,
- bool? hasUpdate,
- Optional<
PackageInfoError?> ? error, - PackageUpdateStatus? updateStatus,
- Optional<
int?> ? finalSizeOnDisk, - int? currentSizeOnDisk,
Implementation
PackageInfo copyWith({
String? name,
bool? installed,
bool? incomplete,
bool? preinstalled,
bool? compatible,
bool? hasUpdate,
Optional<PackageInfoError?>? error,
PackageUpdateStatus? updateStatus,
Optional<int?>? finalSizeOnDisk,
int? currentSizeOnDisk
}) {
return PackageInfo(
name: name ?? this.name,
installed: installed ?? this.installed,
incomplete: incomplete ?? this.incomplete,
preinstalled: preinstalled ?? this.preinstalled,
compatible: compatible ?? this.compatible,
hasUpdate: hasUpdate ?? this.hasUpdate,
error: error != null ? error.value : this.error,
updateStatus: updateStatus ?? this.updateStatus,
finalSizeOnDisk: finalSizeOnDisk != null ? finalSizeOnDisk.value : this.finalSizeOnDisk,
currentSizeOnDisk: currentSizeOnDisk ?? this.currentSizeOnDisk
);
}