currentPlatform top-level property
Platform
get
currentPlatform
The system's platform. Should be used in place of dart:io's Platform.
Can be stubbed during tests by setting a the currentPlatformZoneKey zone
value a Platform instance.
Implementation
Platform get currentPlatform =>
Zone.current[currentPlatformZoneKey] as Platform? ?? const LocalPlatform();