smart_device_info 1.0.5 copy "smart_device_info: ^1.0.5" to clipboard
smart_device_info: ^1.0.5 copied to clipboard

A comprehensive Flutter package providing unified access to device information including hardware specs, OS details, and system resources with intelligent caching.

Smart Device Info #

A comprehensive Flutter package providing unified access to device information including hardware specs, OS details, and system resources with intelligent caching.

Features #

  • Device Information: Get manufacturer, model, OS version, and device ID
  • Hardware Specs: Access CPU architecture, cores, RAM usage, and screen details
  • Battery Status: Monitor battery level, charging status, and health
  • Screen Metrics: Retrieve screen size, pixel ratio, density, and orientation
  • Cross-Platform: Works seamlessly on Android, iOS, and web
  • Intelligent Caching: Results are memoized for optimal performance
  • Error Handling: Graceful fallbacks for unavailable information
  • Lightweight: Minimal overhead with efficient data structures

Installation #

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

dependencies:
  smart_device_info: ^1.0.3

Usage #

import 'package:smart_device_info/smart_device_info.dart';

void main() async {
  // Get device information
  final deviceInfo = await SmartDeviceInfo.instance.getDeviceInfo();
  print('Device: ${deviceInfo.manufacturer} ${deviceInfo.model}');
  
  // Get battery status
  final batteryInfo = await SmartDeviceInfo.instance.getBatteryInfo();
  print('Battery: ${batteryInfo.levelPercentage}');
  
  // Get screen information
  final screenInfo = SmartDeviceInfo.instance.getScreenInfo();
  print('Screen: ${screenInfo.size}');
  
  // Get CPU information
  final cpuInfo = await SmartDeviceInfo.instance.getCpuInfo();
  print('CPU: ${cpuInfo.architecture} with ${cpuInfo.cores} cores');
  
  // Get RAM information
  final ramInfo = await SmartDeviceInfo.instance.getRamInfo();
  print('RAM: ${ramInfo.totalFormatted}');
}

API Reference #

SmartDeviceInfo #

The main singleton class providing access to all device information.

Methods

  • getDeviceInfo(): Returns comprehensive device information
  • getBatteryInfo(): Returns current battery status
  • getScreenInfo(): Returns screen dimensions and properties
  • getCpuInfo(): Returns CPU architecture and specifications
  • getRamInfo(): Returns memory usage information
  • clearCache(): Clears all cached data

Data Models #

  • DeviceInfo: Device manufacturer, model, OS details
  • BatteryInfo: Battery level, charging status, health
  • ScreenInfo: Screen dimensions, pixel ratio, density
  • CpuInfo: CPU architecture, cores, frequency
  • RamInfo: Memory usage, total/available RAM

Platform Support #

Platform Device Info Battery Screen CPU RAM
Android ✅ Full ✅ Full ✅ Full ✅ Basic ❌ Limited
iOS ✅ Full ✅ Full ✅ Full ✅ Basic ❌ Limited
Web ✅ Basic ❌ N/A ✅ Full ❌ N/A ❌ N/A

Development Services #

Looking for professional Flutter development services? Visit Algonest for:

Our team of experienced Flutter developers, game developers, and backend developers specialize in creating high-performance applications with modern UI/UX design principles.

Issues #

For issues and feature requests, please visit Algonest.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Author #

Nguyen Thanh Bien
Email: mortarcloud@gmail.com
Website: https://algonest.io.vn

Perpetual unlimited use granted.

5
likes
130
points
230k
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter package providing unified access to device information including hardware specs, OS details, and system resources with intelligent caching.

Repository
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

battery_plus, device_info_plus, flutter, package_info_plus, universal_io

More

Packages that depend on smart_device_info