copyWith method

ProviderBinaryDescriptor copyWith({
  1. String? binaryName,
  2. String? environmentKey,
  3. List<String>? validationArguments,
  4. bool validateVersion(
    1. String version
    )?,
  5. Object? homeRelativePath = _absentCopyWithValue,
  6. List<String>? commonPaths,
  7. bool? searchNpmGlobal,
  8. Duration? validationTimeout,
})

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,
  );
}