TestNativePlatform.from constructor
Creates a new TestNativePlatform with the properties of platform.
Implementation
@visibleForTesting
factory TestNativePlatform.from(NativePlatform platform) =>
platform
is TestNativePlatform // Values may be unset.
? platform.copyWith()
: TestNativePlatform(
environment: <String, String>{...platform.environment},
executable: platform.executable,
executableArguments: List.of(platform.executableArguments),
lineTerminator: platform.lineTerminator,
localeName: platform.localeName,
localHostname: platform.localHostname,
numberOfProcessors: platform.numberOfProcessors,
operatingSystem: platform.operatingSystem,
operatingSystemVersion: platform.operatingSystemVersion,
packageConfig: platform.packageConfig,
pathSeparator: platform.pathSeparator,
resolvedExecutable: platform.resolvedExecutable,
script: platform.script,
stdinSupportsAnsi: platform.stdinSupportsAnsi,
stdoutSupportsAnsi: platform.stdoutSupportsAnsi,
version: platform.version,
);