FakePlatform constructor

FakePlatform({
  1. BuildMode? buildMode,
  2. HostPlatformType? type,
  3. OperatingSystem? operatingSystem,
  4. String? version,
  5. String? locale,
  6. int? numberOfProcessors,
})

Fake constructor for test needs

Implementation

FakePlatform({
  BuildMode? buildMode,
  HostPlatformType? type,
  OperatingSystem? operatingSystem,
  String? version,
  String? locale,
  int? numberOfProcessors,
}) : super._internal(
        buildMode: buildMode ?? BuildMode.debug,
        hostPlatform: _FakeHostPlatform(
          type: type ?? const DefaultHostPlatform().type,
          operatingSystem:
              operatingSystem ?? const DefaultHostPlatform().operatingSystem,
          version: version ?? const DefaultHostPlatform().version,
          locale: locale ?? const DefaultHostPlatform().locale,
          numberOfProcessors: numberOfProcessors ??
              const DefaultHostPlatform().numberOfProcessors,
        ),
      );