isDesktop function
Implementation
bool isDesktop([TargetPlatform? targetPlatform]) {
if (isWeb()) return false;
targetPlatform ??= defaultTargetPlatform;
return {TargetPlatform.macOS, TargetPlatform.linux, TargetPlatform.windows}
.contains(targetPlatform);
}