So is there any way in Flutter to get some sort of device id that won't change when doing a factory reset or changing the signing key? According to the documentation, I did not find any way to extract a constant id throughout the entire use of the application on the device..
I tried solution with 'package:uuid/uuid.dart' package but generated id is same on every device, so is there any solution to track device id of more devices so i can store user actions of specific device?
You can use flutter_secure_storage to implement this.
Please use
await storage.write(key: 'device_id', value: value)when you've installed the app the first time.On the next install, you need to check If the value exists or not. Please use the below method to check value exists or not.
If the deviceId is having a value that means it's the old user else stores a unique value.