isDesktop function

bool isDesktop([
  1. TargetPlatform? targetPlatform
])

Implementation

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