clone method
Create a clone with updated values in one step. For omitted parameters values of the original instance are copied.
Implementation
RunOptions clone(
{String? workingDirectory,
Map<String, String>? environment,
bool? includeParentEnvironment,
bool? runInShell,
Encoding? stdoutEncoding,
Encoding? stderrEncoding}) {
return RunOptions(
workingDirectory: workingDirectory ?? this.workingDirectory,
environment: environment != null
? Map.from(environment)
: Map.from(this.environment),
includeParentEnvironment:
includeParentEnvironment ?? this.includeParentEnvironment,
runInShell: runInShell ?? this.runInShell,
stdoutEncoding: stdoutEncoding ?? this.stdoutEncoding,
stderrEncoding: stderrEncoding ?? this.stderrEncoding);
}