getPlatform function

String getPlatform()

Private API to get the platform, while having safety for web platforms.

Implementation

String getPlatform() {
  return kIsWasm ? "web:wasm" : (kIsWeb ? "web:native" : Platform.operatingSystem);
}