clearAll method

Future<void> clearAll()

Removes all entries written by this cache.

Implementation

Future<void> clearAll() async {
  final prefs = await SharedPreferences.getInstance();
  final keys = prefs.getKeys().where((k) => k.startsWith(_prefix)).toList();
  for (final k in keys) {
    await prefs.remove(k);
  }
}