isLinux top-level property

bool get isLinux

Whether the current operating system is a version of Linux.

Identified by operatingSystem being the string linux.

This value is false if the operating system is a specialized version of Linux that identifies itself by a different name, for example Android (see isAndroid), or if the code is running inside a browser (see isBrowser).

Implementation

@pragma('vm:prefer-inline')
bool get isLinux => OperatingSystem.current.isLinux;