getNumberOfCores static method

Future<int?> getNumberOfCores()

Implementation

static Future<int?> getNumberOfCores() async {
  try {
    return _numberOfCores ??= await _channel.invokeMethod('getNumberOfCores');
  } on PlatformException catch (e) {
    throw 'Failed to retrieve number of cores ${e.code}: ${e.message}';
  }
}