unique_device_identifier 2.0.0
unique_device_identifier: ^2.0.0 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.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.