Flutter Device Inspector ๐Ÿ”

A high-performance, cross-platform Flutter plugin for retrieving deep hardware and software specifications. It provides a unified API to access unique device identifiers, hardware metrics (RAM, CPU, Storage), and system identity across Android, iOS, and Web.

pub package License: MIT

๐Ÿš€ Key Features

  • ๐Ÿ›ก๏ธ Constant Unique ID:
    • Mobile: Persistent hardware-based identifiers.
    • Web: Advanced Fingerprinting (SHA-256) that remains constant even after browser reinstallation.
  • ๐Ÿ’พ Memory Insights: Get total physical RAM formatted in GB.
  • ๐Ÿ“‚ Storage Metrics: Retrieve total internal storage capacity in MB.
  • โš™๏ธ Processor Details: Real-time CPU/Hardware name retrieval.
  • ๐Ÿ†” Device Identity: Manufacturer, Brand, and Model detection.
  • ๐ŸŒ Full Web Support: Seamless integration for browser-based Flutter apps.

๐Ÿ“ฆ Installation

Add this to your pubspec.yaml:

dependencies:
  flutter_device_inspector: ^0.0.1

Then run:

flutter pub get

๐Ÿ›  Usage

Fetch all device details in a single asynchronous call using the DeviceInfo model.

import 'package:flutter_device_inspector/flutter_device_inspector.dart';

void getDetails() async {
  DeviceInfo info = await FlutterDeviceInspector.getFullInfo();

  print('Unique ID: ${info.deviceId}');
  print('Model: ${info.model}');
  print('RAM: ${info.ram}');           // e.g., "7.45 GB"
  print('Storage: ${info.totalStorage}'); // e.g., "121845 MB"
  print('CPU: ${info.cpu}');           // e.g., "Snapdragon 865"
  print('OS: ${info.osVersion}');
}

2. Individual Property Access

If you only need a specific piece of information:

String? deviceId = await FlutterDeviceInspector.getDeviceId();
String? ram = await FlutterDeviceInspector.getTotalRam();
String? storage = await FlutterDeviceInspector.getTotalStorage();

๐Ÿ“ฑ Platform Implementation Details

Feature Android iOS Web (Browser)
Unique ID Settings.Secure.ANDROID_ID identifierForVendor SHA-256 Fingerprint
Model Build.MODEL UIDevice.model Browser Name (e.g. Chrome)
RAM MemoryInfo.totalMem (GB) physicalMemory (GB) deviceMemory (GB)
Storage StatFs (MB) systemSize (MB) Not Accessible
CPU /proc/cpuinfo parsing sysctl brand string hardwareConcurrency
OS Version Build.VERSION.RELEASE systemVersion navigator.platform

๐Ÿ”’ About the Web Unique ID

The Web ID is generated using Browser Fingerprinting. It combines hardware properties (CPU cores, RAM, Screen resolution) and browser metadata to create a unique SHA-256 hash.

  • Persistence: Unlike cookies or localStorage, this ID remains the same even if the user uninstalls and reinstalls the browser, as it is derived from the device's hardware signature.

๐Ÿงช Example App

The project includes a premium example app (Material 3) located in the example/ folder. It demonstrates how to build a professional device dashboard using this plugin.


๐Ÿ“„ License

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