setValue method
Write a String variable val
to Secure Storage with the key key
Return true
after writing the variable to Secure Storage
Implementation
Future<bool> setValue(String val, String key) async {
final FlutterSecureStorage storage = FlutterSecureStorage();
await storage.write(key: key, value: val);
return true;
}