isBrowser top-level property Null safety

bool isBrowser

Whether running in a web browser.

Identified by operatingSystem being the string browser.

If so, the operatingSystemVersion is the string made available through window.navigator.appVersion.

Implementation

bool get isBrowser => OperatingSystem.current.isBrowser;