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