persistent_device_id
2.0.0, released 4 months ago by maeltoukap.me
Provides a persistent, app‑scoped device ID for Android and iOS.
What it does
It generates a UUID that is stored in secure platform storage and returned on subsequent calls. The ID persists across app launches but can be reset by clearing data or device changes.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- app diagnostics
- fraud detection
- rate limiting
- abuse prevention
Skip it when
- authentication
- licensing
- security‑critical identity
Strengths
- stable across launches on same installation
- uses encrypted storage or Keychain
- automatic migration from legacy storage
Weaknesses
- ID can change on data clear or device reset
- not immutable or guaranteed hardware serial
- not suitable for security decisions
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
final deviceId = await PersistentDeviceId.getDeviceId();Alternatives
Packages that do the same job and could replace persistent_device_id.
- flutter_cache_manager
Generic cache manager for saving web files and cache info on device storage.
91Compare - simple_secure_storage
Secure key‑value storage for Flutter with platform‑specific backends.
77Compare - flutter_image_gallery_saver
Save image or video files to the device gallery on Android and iOS.
72Compare - localstore
JSON file-based storage package providing a persistent repository for a simple NoSQL database.
50Compare
Works with
Packages commonly used together with persistent_device_id: ones it builds on, ones built on it, and its own family.