priorityForPlatform function

  1. @visibleForTesting
int priorityForPlatform({
  1. required bool isAndroid,
})

The scheduling priority to use, given the real host OS.

Extracted so both arms are testable without pretending to be on another platform. See SmartDownloader.downloadPriority for why they differ.

Implementation

@visibleForTesting
int priorityForPlatform({required bool isAndroid}) => isAndroid ? 5 : 0;