copy method
PubSpec
copy({
- String? name,
- String? author,
- Version? version,
- String? homepage,
- String? documentation,
- String? description,
- Uri? publishTo,
- Environment? environment,
- Map<
String, DependencyReference> ? dependencies, - Map<
String, DependencyReference> ? devDependencies, - Map<
String, DependencyReference> ? dependencyOverrides, - Map<
String, Executable> ? executables, - Map? unParsedYaml,
creates a copy of the pubspec with the changes provided
Implementation
PubSpec copy(
{String? name,
String? author,
Version? version,
String? homepage,
String? documentation,
String? description,
Uri? publishTo,
Environment? environment,
Map<String, DependencyReference>? dependencies,
Map<String, DependencyReference>? devDependencies,
Map<String, DependencyReference>? dependencyOverrides,
Map<String, Executable>? executables,
Map? unParsedYaml}) {
return PubSpec(
name: name ?? this.name,
author: author ?? this.author,
version: version ?? this.version,
homepage: homepage ?? this.homepage,
documentation: documentation ?? this.documentation,
description: description ?? this.description,
publishTo: publishTo ?? this.publishTo,
environment: environment ?? this.environment,
dependencies: dependencies ?? this.dependencies,
devDependencies: devDependencies ?? this.devDependencies,
dependencyOverrides: dependencyOverrides ?? this.dependencyOverrides,
executables: executables ?? this.executables,
unParsedYaml: unParsedYaml ?? this.unParsedYaml);
}