copyWith method
Version
copyWith({})
Implementation
Version copyWith({
int? major,
int? minor,
int? patch,
String? pre = _undefined,
String? build = _undefined,
}) {
return Version(
major ?? this.major,
minor ?? this.minor,
patch ?? this.patch,
pre: pre == _undefined
? (preRelease.isNotEmpty
? preRelease.map((p) => p.toString()).join('.')
: null)
: pre,
build: build == _undefined
? (this.build.isNotEmpty
? this.build.map((b) => b.toString()).join('.')
: null)
: build,
);
}