cpuInfo property

Future<CpuInfo> get cpuInfo

This retries the overall information CpuInfo of the device CPU.

Implementation

static Future<CpuInfo> get cpuInfo async {
  try {
    var cpuInfoJson = await _channel.invokeMethod('getCpuInfo');
    var info = cpuInfoJson;
    var jsonObj = CpuInfo.fromJson(info);
    return jsonObj;
  } on PlatformException catch (e) {
    throw 'Failed to retrieve cpu info ${e.code}: ${e.message}';
  }
}