overrideOperatingSystem<R> function

R overrideOperatingSystem<R>(
  1. OperatingSystem operatingSystem,
  2. R body()
)

Run body in a zone with platform overrides.

Overrides OperatingSystem.current with the supplied operatingSystem value while running in a new zone, and then runs body in that zone.

This override affects the operatingSystem and version exported by package:osid/osid.dart.

Implementation

R overrideOperatingSystem<R>(
        OperatingSystem operatingSystem, R Function() body) =>
    runZoned(body, zoneValues: {#_os: operatingSystem});