copyPlatformWith method
- @visibleForTesting
- int? numberOfProcessors,
- String? pathSeparator,
- String? operatingSystem,
- String? operatingSystemVersion,
- String? localHostname,
- Map<
String, String> ? environment, - String? executable,
- String? resolvedExecutable,
- Uri? script,
- List<
String> ? executableArguments, - String? packageConfig,
- String? version,
- bool? stdinSupportsAnsi,
- bool? stdoutSupportsAnsi,
- String? localeName,
Migration helper for legacy FakePlatform.copyWith.
Use TestNativePlatform.copyWith instead. Work directly with TestNativePlatform, rather than creating a TestPlatform from it.
Only works if there is a current Platform.nativePlatform.
Will be deprecated and removed when legacy classes are removed.
Implementation
@visibleForTesting
TestPlatform copyPlatformWith({
int? numberOfProcessors,
String? pathSeparator,
String? operatingSystem,
String? operatingSystemVersion,
String? localHostname,
Map<String, String>? environment,
String? executable,
String? resolvedExecutable,
Uri? script,
List<String>? executableArguments,
String? packageConfig,
String? version,
bool? stdinSupportsAnsi,
bool? stdoutSupportsAnsi,
String? localeName,
}) {
return TestPlatform._native(
copyWith(
numberOfProcessors: numberOfProcessors,
pathSeparator: pathSeparator,
operatingSystem: operatingSystem,
operatingSystemVersion: operatingSystemVersion,
localHostname: localHostname,
environment: environment,
executable: executable,
resolvedExecutable: resolvedExecutable,
script: script,
executableArguments: executableArguments,
packageConfig: packageConfig,
version: version,
stdinSupportsAnsi: stdinSupportsAnsi,
stdoutSupportsAnsi: stdoutSupportsAnsi,
localeName: localeName,
),
);
}