removeCacheObject static method

Future<bool> removeCacheObject(
  1. String key
)

Remove Cache Object From Cache

Implementation

static Future<bool> removeCacheObject(String key) async {
  try {
    if (getSharedPreferences().containsKey(key)) {
      return await getSharedPreferences().remove(key);
    } else {
      return true;
    }
  } catch (e) {
    print(e);
  }
  return false;
}