The beauty of flutter_secure_storage is that while it's extremely easy to use, secure encryption happens under the hood. Specifically, if you are using iOS, data gets encrypted using Keychain. On Android, flutter_secure_storage uses AES encryption, which, in turn, is encrypted with RSA, whose key is stored in KeyStore.
To use it, we must get an instance of the FlutterSecureStorage class, which we can obtain with the following instruction:
final storage = FlutterSecureStorage();
Like shared_preferences, it uses key-value pairs to store data. You can write a value into a key with the following instruction:
await storage.write(key: myKey, value: pwdController.text);
You can read the value from a key with the following instruction:
String secret = await storage.read(key: myKey);
As you may have noticed, the read() and write() methods are both asynchronous.