containsKey method

Future<bool> containsKey(
  1. String key
)

Key existence verifier

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

Implementation

Future<bool> containsKey(String key) async {
  SharedPreferences prefs = await _prefs;
  try {
    return prefs.containsKey(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. ");
  }
}