clear static method

Future clear()

Implementation

static Future clear() async {
  // await _preferences.clear();
  final keys = _preferences.getKeys();
  for (String key in keys) {
    if (key.startsWith(prefix)) {
      // Remove the key-value pair with the specified prefix
      await _preferences.remove(key);
    }
  }
}