flush method

  1. @override
Future<void> flush()

Implementation

@override
Future<void> flush() async {
  // we do *not* await the flushing here. That makes it so that we can execute
  // other stuff while the flushing is still in progress. Fortunately, hive
  // has a proper read / write queue, meaning that if we do actually want to
  // write something again, it'll wait until the flush is completed.
  _getBox().then((box) => box.flush());
}