PlatformRef getPlatform()

Returns the current platform.

Source

PlatformRef getPlatform() =>
    _platform != null && !_platform.disposed ? _platform : null;