copyWith method

Pubspec copyWith({
  1. String? name,
  2. String? description,
  3. String? version,
  4. String? homepage,
  5. String? repository,
  6. String? issueTracker,
  7. String? documentation,
  8. String? publishTo,
  9. Environment? environment,
  10. Dependencies? dependencies,
  11. Dependencies? devDependencies,
  12. Dependencies? dependenciesOverride,
  13. FlutterData? flutter,
  14. Map<String, dynamic>? others,
})

Implementation

Pubspec copyWith({
  String? name,
  String? description,
  String? version,
  String? homepage,
  String? repository,
  String? issueTracker,
  String? documentation,
  String? publishTo,
  Environment? environment,
  Dependencies? dependencies,
  Dependencies? devDependencies,
  Dependencies? dependenciesOverride,
  FlutterData? flutter,
  Map<String, dynamic>? others,
}) {
  return Pubspec(
    name: name ?? this.name,
    description: description ?? this.description,
    version: version ?? this.version,
    homepage: homepage ?? this.homepage,
    repository: repository ?? this.repository,
    issueTracker: issueTracker ?? this.issueTracker,
    documentation: documentation ?? this.documentation,
    publishTo: publishTo ?? this.publishTo,
    environment: environment ?? this.environment,
    dependencies: dependencies ?? this.dependencies,
    devDependencies: devDependencies ?? this.devDependencies,
    dependenciesOverride: dependenciesOverride ?? this.dependenciesOverride,
    flutter: flutter ?? this.flutter,
    others: others ?? this.others,
  );
}