clearAllData static method

Future<void> clearAllData()

Clears all persisted ruut data on device.

Implementation

static Future<void> clearAllData() async {
  providerContainerMap.putIfAbsent("all", () => ProviderContainer());
  final container = providerContainerMap["all"]!;
  final params = RuutParameters(
      isPersistenceEnabled: true,
      baseUrl: "",
      inboxIdentifier: "",
      clientInstanceKey: "");

  final localStorage = container.read(localStorageProvider(params));
  await localStorage.clearAll();

  localStorage.dispose();
  container.dispose();
}