close method

Future<void> close()

Closes the underlying Hive box.

Call this when you're done with the store to release resources. After closing, the store cannot be used anymore.

This method is idempotent: calling it on an already-closed store is a no-op and will not throw.

Example:

await store.close();

Implementation

Future<void> close() async {
  if (!_box.isOpen) return;
  await _box.close();
}