SuitePlatform constructor

  1. Runtime runtime,
  2. {OperatingSystem os,
  3. bool inGoogle: false}

Creates a new platform with the given runtime and os, which defaults to OperatingSystem.none.

Throws an ArgumentError if runtime is a browser and os is not null or OperatingSystem.none.


SuitePlatform(this.runtime, {OperatingSystem os, this.inGoogle = false})
    : os = os ?? OperatingSystem.none {
  if (runtime.isBrowser && this.os != OperatingSystem.none) {
    throw ArgumentError('No OS should be passed for runtime "$runtime".');