reset method

void reset()

Remove all the key-value pairs from the store synchronously

Prefer resetAsync to avoid blocking the UI thread. Otherwise, this has slightly better performance.

Implementation

void reset() => _db.writeTxnSync(
      () => Future.wait(
        _db.metadata
            .where()
            .findAllSync()
            .map((m) => _db.metadata.delete(m.id)),
      ),
    );