delete method

  1. @override
Future<void> delete(
  1. String key
)
override

Deletes model of type T with key from local storage.

By default notifies this modification to the associated GraphNotifier.

Implementation

@override
Future<void> delete(String key) async {
  final delete = box!.delete(key); // delete in bg
  // id will become orphan & purged
  graph.removeKey(key);
  await delete;
}