copyWith method
Implementation
ProviderBinaryDescriptor copyWith({
String? binaryName,
String? environmentKey,
List<String>? validationArguments,
bool Function(String version)? validateVersion,
Object? homeRelativePath = _absentCopyWithValue,
List<String>? commonPaths,
bool? searchNpmGlobal,
Duration? validationTimeout,
}) {
assert(
identical(homeRelativePath, _absentCopyWithValue) ||
homeRelativePath is String?,
'homeRelativePath must be a String or null.',
);
return ProviderBinaryDescriptor(
binaryName: binaryName ?? this.binaryName,
environmentKey: environmentKey ?? this.environmentKey,
validationArguments: validationArguments ?? this.validationArguments,
validateVersion: validateVersion ?? this.validateVersion,
homeRelativePath: identical(homeRelativePath, _absentCopyWithValue)
? this.homeRelativePath
: homeRelativePath as String?,
commonPaths: commonPaths ?? this.commonPaths,
searchNpmGlobal: searchNpmGlobal ?? this.searchNpmGlobal,
validationTimeout: validationTimeout ?? this.validationTimeout,
);
}