my_device_info 0.0.2 copy "my_device_info: ^0.0.2" to clipboard
my_device_info: ^0.0.2 copied to clipboard

A Flutter plugin to get detailed device info like IMEI, model, API level, CPU type, and more, with full support for Android & iOS.

codecov GitHub Buy Me A Coffee PayPal Sponsor Support Me on Ko-fi

my_device_info is a Flutter plugin that returns device info such as IMEI (Android), model, manufacturer, API level, CPU type, product name, and hardware for Android and iOS.

Features #

  • Simple static API for common device fields.
  • Works on Android and iOS.
  • Optional IMEI on Android with runtime permission.

Installation #

Add following dependency in pubspec.yaml file:

my_device_info: ^last_version

Then, run

$ flutter pub get 

Set up #

  • In android add following permission:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

Usage #

import 'package:my_device_info/my_device_info.dart';

if(Permission.phone.request().isGranted){
  try {
      platformVersion = await MyDeviceInfo.platformVersion;
      imeiNo = await MyDeviceInfo.deviceIMEINumber;
      modelName = await MyDeviceInfo.deviceModel;
      manufacturer = await MyDeviceInfo.deviceManufacturer;
      apiLevel = await MyDeviceInfo.apiLevel;
      deviceName = await MyDeviceInfo.deviceName;
      productName = await MyDeviceInfo.productName;
      cpuType = await MyDeviceInfo.cpuName;
      hardware = await MyDeviceInfo.hardware;

  } on PlatformException {
      platformVersion = 'Failed to get platform version.';
  }
}

Developer Team: #

ThaoDoan and DucNguyen

1
likes
160
points
62
downloads
screenshot

Publisher

verified publisherwongcoupon.com

Weekly Downloads

A Flutter plugin to get detailed device info like IMEI, model, API level, CPU type, and more, with full support for Android & iOS.

Repository (GitHub)
View/report issues

Topics

#device-info #imei #hardware #system-info #flutter-plugin

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on my_device_info

Packages that implement my_device_info