readFromSecureStorage method Null safety

Future<_SecItem?> readFromSecureStorage(
  1. String key
)

read Element with key from Flutter Storage

Implementation

Future<_SecItem?> readFromSecureStorage(String key) async {
  String? secret = await _storage.read(
      key: key, iOptions: _getIOSOptions(), aOptions: _getAndroidOptions());
  if (secret == null) {
    debugPrint("readfromSecureStorage: secret = $secret");
    secret = "";
    return null;
  } else {
    return _SecItem(key, secret.toString());
  }
}