setValue method

Future<bool> setValue(
  1. String val,
  2. String key
)

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;
}