isDesktop function
- PlatformWrapper platformWrapper
Implementation
bool isDesktop(PlatformWrapper platformWrapper) {
/// platformWrapper: PlatformWrapper class is passed in to allow mocking for testing.
/// Returns true if running on Linux, macOS or Windows.
if (platformWrapper.isWeb) {
return false;
}
return platformWrapper.isLinux ||
platformWrapper.isMacOS ||
platformWrapper.isWindows;
}