Search packages, repositories and app categories

Package detailsv1.0.1

platform_device_id

You can get device id from platform - linux/mac/windows/android/ios/web.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
6.9K
Likes
411
Pub points
140

Install package

flutter pub add platform_device_id

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The platform_device_id package provides a cross-platform solution to retrieve a unique device identifier across Android, iOS, Web, macOS, Windows, and Linux. It abstracts platform-specific methods to deliver a consistent API for obtaining a stable device ID, useful for analytics, user tracking, or licensing. The package is lightweight and designed for simplicity, ensuring developers can access device identifiers without managing platform-specific logic. It leverages native APIs where available and falls back to secure, persistent storage when needed.

Use cases

  • User authentication persistence
  • Analytics and tracking
  • License management
  • Device-based access control
  • Cross-device session handling

Key features

  • Cross-platform compatibility
  • Stable device identifier
  • Secure storage backend
  • Simple API
  • Supports all major platforms

Suitable for

  • Mobile and desktop app developers
  • Apps requiring device identification
  • Analytics integrations
  • Security-focused applications

Considerations

  • Privacy compliance required (e.g., GDPR)
  • Device ID may change on factory reset
  • Not suitable for high-security authentication
  • Limited control over ID generation algorithm

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

platform_device_id

get device id from android、ios、windows、linux、mac、web

Description

  • Windows

BIOS UUID e.g. 99A4D301-53F5-11CB-8CA0-9CA39A9E1F01

  • Linux

BIOS UUID e.g. 32a70060-2a39-437e-88e2-d68e6154de9f

  • Mac

IOPlatformUUID e.g. 02662E79-E342-521C-98EA-D4C18B61FEF3

  • Android

AndroidId e.g. 9774d56d682e549c

  • IOS

IdentifierForVendor e.g. 9C287922-EE26-4501-94B5-DDE6F83E1475

  • Web

UserAgent e.g. Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36

Getting Started

a simple usage example:

import 'package:platform_device_id/platform_device_id.dart';

String? deviceId = await PlatformDeviceId.getDeviceId;

Support Platform

  • [x] Android
  • [x] IOS
  • [x] MacOS
  • [x] Windows
  • [x] Linux
  • [x] Web

TODO

  • [ ] Support Dart Native platform device id
  • [ ] Web id change

Plugins Info

Plugin Pub Points Popularity Likes
platform_device_id pub package pub points popularity likes
platform_device_id_macos pub package pub points popularity likes
platform_device_id_linux pub package pub points popularity likes
platform_device_id_windows pub package pub points popularity likes
platform_device_id_web pub package pub points popularity likes

Go-flutter for windows/macos/linux

see here

Categories

Dependencies

Dependency list 6 items

  • device_info^2.0.0
  • platform_device_id_linux^1.0.0
  • platform_device_id_macos^1.0.0
  • platform_device_id_platform_interface^1.0.0
  • platform_device_id_web^1.0.0
  • platform_device_id_windows^1.0.0

Source repository

Projects using this package

No data available yet.