limpiarPreferencias method
Limpia todas las preferencias (uso con precaución).
Implementation
Future<bool> limpiarPreferencias() async {
if (!_isInitialized) {
CloudDb.logDebug('CacheShpProvider() CacheShpProvider no inicializadas.');
return false;
}
try {
final keys = _prefs!.getKeys().where((key) => key.startsWith('_cache_'));
for (String key in keys) {
await _prefs!.remove(key);
}
return true;
} catch (e) {
CloudDb.logDebug('CacheShpProvider() Error al limpiar preferencias: $e');
return false;
}
}