unique_device_identifier 2.0.4
unique_device_identifier: ^2.0.4 copied to clipboard
A Flutter plugin that provides a unique device identifier on all platforms including Android, iOS, Windows, macOS, Linux, Web.
Changelog #
All notable changes to this project will be documented in this file.
2.0.4 #
- Fixed a bug on the Web platform where all devices were generating the same UUID (
00000000-0000-4000-8000-000000000000
) - Implemented Web-specific UUID generation: attempts to generate a UUID using a browser fingerprint; if that fails, falls back to a randomly generated UUID using Dart
- The randomly generated UUID is stored in
window.localStorage
and reused across page reloads and browser sessions
2.0.3 #
- Fixed incorrect usage example in documentation.
2.0.2 #
- Fixed version example in
README.md
to match the latest release.
2.0.1 #
- Added detailed doc comments to
getUniqueIdentifier()
to describe platform-specific behavior. - No code changes; this is a documentation-only update.
2.0.0 #
- Breaking Change:
getUniqueIdentifier()
has been converted to astatic
method.- You can now call it directly without creating an instance:
final deviceId = await UniqueDeviceIdentifier.getUniqueIdentifier();
- This change simplifies usage but breaks compatibility with the previous instance-based approach:
// ❌ This will no longer work: final deviceId = await UniqueDeviceIdentifier().getUniqueIdentifier();
- You can now call it directly without creating an instance:
1.0.0 #
- Initial release of the
unique_device_identifier
Flutter plugin. - Supports the following platforms:
- ✅ Android (
Settings.Secure.ANDROID_ID
) - ✅ iOS (
UIDevice.identifierForVendor
) - ✅ Windows (
MachineGuid
from registry) - ✅ macOS (
IOPlatformUUID
via IOKit with macOS 12+ fallback) - ✅ Linux (
/etc/machine-id
) - ✅ Web (fingerprint-based hash with fallback to random UUID, stored in
localStorage
)
- ✅ Android (
- No external dependencies required.
- Provides a consistent
getUniqueIdentifier()
interface for all platforms usingMethodChannel
and Dart interop.