Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion lib/src/build_system/extended_environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,29 @@ class ExtendedEnvironment implements Environment {
final MoreOperatingSystemUtils operatingSystemUtils;

@override
// In 3.38.4 this overrides, in 3.38.3 and before this is a new method.
// ignore: override_on_non_overriding_member
ExtendedEnvironment copyWith({Directory? outputDir}) {
return ExtendedEnvironment.wrap(
delegate: _delegate.copyWith(outputDir: outputDir),
// can't use _delegate.copyWith because it doesn't exist in 3.38.3 and before
delegate: Environment(
projectDir: projectDir,
packageConfigPath: packageConfigPath,
outputDir: outputDir ?? this.outputDir,
cacheDir: cacheDir,
flutterRootDir: flutterRootDir,
fileSystem: fileSystem,
logger: logger,
artifacts: artifacts,
processManager: processManager,
platform: platform,
analytics: analytics,
generateDartPluginRegistry: generateDartPluginRegistry,
engineVersion: engineVersion,
buildDir: buildDir,
defines: defines,
inputs: inputs,
),
operatingSystemUtils: operatingSystemUtils,
artifacts: artifacts,
);
Expand Down