containsKey method

Future<bool> containsKey(
  1. SessionKey sessionKey
)

Key existence verifier

@param key String that specifies JSON key to search for @returns Future

Implementation

Future<bool> containsKey(SessionKey sessionKey) async {
  SharedPreferences prefs = await _prefs;
  try {
    return prefs.containsKey(sessionKey.key);
  } catch (e) {
    throw Exception(
        "It wasn't possible to look for this key in the session. This can be triggered if the session no longer exists or if the key is not correct. ");
  }
}