This first checks to see if a secret has been stored in Flutter Secure Storage. If a secret is found there, it uses that. If not, it checks to see if a secret is stored in Shared Preferences. If one is found it immediately saves the secret to Flutter Secure Storage and then deletes it from Shared Preferences.
This works on my Android device, but I don't have an iOS device to test this on.
This first checks to see if a secret has been stored in Flutter Secure Storage. If a secret is found there, it uses that. If not, it checks to see if a secret is stored in Shared Preferences. If one is found it immediately saves the secret to Flutter Secure Storage and then deletes it from Shared Preferences.
This works on my Android device, but I don't have an iOS device to test this on.