delete method

Future<void> delete()

Deletes this object from the box it is stored in.

Implementation

Future<void> delete() async {
  final box = _requireInitialized();
  await box.delete(_key);
  if (box.lazy) {
    // Lazy boxes won't automatically dispose their HiveObjects
    dispose();
  }
}