remove method

  1. @override
Uint8List? remove(
  1. Uint8List key
)
override

Remove a value from the database using key. If the key had an associated value, return the value or else return null

remove(utf8.encode('foo');

Implementation

@override
Uint8List? remove(Uint8List key) {
  final record = _recordPool.get(key);
  if (record != null) _recordPool.free(record);
  _header.numRecords -= record == null ? 0 : 1;
  _header.numBytes -= record == null ? 0 : record.size;
  if (_flush) flush();
  return record?.value;
}