isMacOS function

bool isMacOS([
  1. TargetPlatform? targetPlatform
])

Implementation

bool isMacOS([TargetPlatform? targetPlatform]) {
  if (isWeb()) return false;
  targetPlatform ??= defaultTargetPlatform;
  return TargetPlatform.macOS == targetPlatform;
}