system_info2
4.2.0, released 4 weeks ago by onepub.dev
Provides easy access to system information like architecture, kernel, memory, OS, CPU, and user.
What it does
It retrieves hardware and operating system characteristics such as kernel architecture, bitness, version, operating system name, user details, and memory limits. It allows querying specific host system properties directly in Dart.
AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to detect the host operating system or architecture at runtime.
- You want to query available physical or virtual memory.
- You need user directory or identification details on desktop or mobile environments.
Skip it when
- You need real-time polling of memory in a latency-sensitive UI loop on Windows (as synchronous PowerShell calls can be slow).
- PowerShell is disabled or restricted by policy on the target Windows environment.
Strengths
- Simplifies retrieval of low-level system and hardware details.
- Supports multiple platforms including Android, iOS, Windows, macOS, and Linux.
Weaknesses
- Windows memory queries spawn local PowerShell processes which can be slow and are not suited for tight polling loops.
- May throw a StateError if Windows PowerShell/CIM fails or is blocked.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
On Windows, PowerShell (powershell.exe) must be available on the PATH with CimCmdlets and local WMI/CIM providers enabled for memory queries.
if (SysInfo.operatingSystemName == "Ubuntu") {
log.info("We love Ubuntu users");
}Alternatives
Packages that do the same job and could replace system_info2.
- jni_flutter
Access Flutter Android APIs from Dart.
87Compare - system_resources
Access system resources like CPU load and memory usage via dart:ffi.
77Compare - package_info_plus
Flutter plugin to query app package info like version, build number and installer store.
93Compare - nativeapi
Dart bindings to native system APIs across desktop and mobile
85Compare
Works with
Packages commonly used together with system_info2: ones it builds on, ones built on it, and its own family.
- sentry_dart_pluginBuilt on system_info2Uploads debug symbols and source maps to Sentry for server-side symbolication.
- dcliBuilt on system_info2A Dart SDK for building cross‑platform command line applications and scripts.
- stream_videoBuilt on system_info2Official low-level client for Stream Video, supporting calls, audio rooms, and live streaming.
- carp_mobile_sensingBuilt on system_info2Mobile sensing framework for collecting sensor and device data via configurable probes.
- dswitchBuilt on system_info2CLI tool to rapidly switch between channels and versions of standalone Dart.