copyWith method

ReleaseContext copyWith({
  1. String? projectPath,
  2. ReleaseType? type,
  3. bool? dryRun,
  4. bool? isCi,
  5. bool? allowDirty,
  6. VersionBumpMode? versionBumpMode,
  7. String? targetPlatform,
  8. String? versionName,
  9. int? buildNumber,
  10. ReleaseConfig? config,
  11. Map<String, String>? environment,
})

Creates a copy of this context with updated properties.

Implementation

ReleaseContext copyWith({
  String? projectPath,
  ReleaseType? type,
  bool? dryRun,
  bool? isCi,
  bool? allowDirty,
  VersionBumpMode? versionBumpMode,
  String? targetPlatform,
  String? versionName,
  int? buildNumber,
  ReleaseConfig? config,
  Map<String, String>? environment,
}) {
  return ReleaseContext(
    projectPath: projectPath ?? this.projectPath,
    type: type ?? this.type,
    dryRun: dryRun ?? this.dryRun,
    isCi: isCi ?? this.isCi,
    allowDirty: allowDirty ?? this.allowDirty,
    versionBumpMode: versionBumpMode ?? this.versionBumpMode,
    targetPlatform: targetPlatform ?? this.targetPlatform,
    versionName: versionName ?? this.versionName,
    buildNumber: buildNumber ?? this.buildNumber,
    config: config ?? this.config,
    environment: environment ?? this.environment,
  );
}