close method

  1. @override
Future<void> close()
override

Close the storage instance which will free any allocated resources. A storage instance can no longer be used once it is closed.

Implementation

@override
Future<void> close() async {
  if (_box.isOpen) {
    _instance = null;
    return _lock.synchronized(_box.close);
  }
}