In Android we have, Settings.Secure.ANDROID_ID
. I do not know the iOS equivalent.
Is there a flutter plugin or a way to get a unique device id for both Android
If you're serving ads you can use ASIdentifierManager. You should only use it for ads. There is no general UDID mechanism provided by the OS on iOS, for privacy reasons.
If you're using firebase_auth plugin you could signInAnonymously and then use the id of the FirebaseUser. This will give you an identifier that is specific to your Firebase app.