delete method

Future<void> delete()

Deletes this object from the box it is stored in.

Implementation

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