FakePlatform.fromPlatform constructor

FakePlatform.fromPlatform(
  1. Platform platform
)

Creates a new FakePlatform with properties whose initial values mirror the specified platform.

Implementation

FakePlatform.fromPlatform(Platform platform)
    : _numberOfProcessors = platform.numberOfProcessors,
      _pathSeparator = platform.pathSeparator,
      _operatingSystem = platform.operatingSystem,
      _operatingSystemVersion = platform.operatingSystemVersion,
      _localHostname = platform.localHostname,
      _environment = Map<String, String>.from(platform.environment),
      _executable = platform.executable,
      _resolvedExecutable = platform.resolvedExecutable,
      _script = platform.script,
      _executableArguments = List<String>.from(platform.executableArguments),
      packageConfig = platform.packageConfig,
      _version = platform.version,
      _stdinSupportsAnsi = platform.stdinSupportsAnsi,
      _stdoutSupportsAnsi = platform.stdoutSupportsAnsi,
      _localeName = platform.localeName;