kirz_cpu_info 0.1.0 copy "kirz_cpu_info: ^0.1.0" to clipboard
kirz_cpu_info: ^0.1.0 copied to clipboard

A Flutter plugin to get CPU usage information. iOS only.

kirz_cpu_info #

A Flutter plugin to get system CPU usage percentage on iOS devices.

Platform Support #

  • ✅ iOS
  • ❌ Android (throws an error)

Features #

  • Get total CPU usage percentage (0-100) for the whole system

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  kirz_cpu_info: ^0.1.0

Usage #

import 'package:kirz_cpu_info/kirz_cpu_info.dart';

try {
  final usage = await KirzCpuInfo.getProcessorUsage();
  print('CPU usage: ${usage.toStringAsFixed(1)}%');
} catch (e) {
  print('Error: $e'); // Will throw on Android
}

Platform-Specific Notes #

iOS #

Uses HOST_CPU_LOAD_INFO tick deltas (user + system + nice) to compute a usage percentage.

Android #

Throws a PlatformException with code UNSUPPORTED_PLATFORM when called.

License #

MIT License

0
likes
140
points
105
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin to get CPU usage information. iOS only.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on kirz_cpu_info

Packages that implement kirz_cpu_info