delete method
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, {bool notify = true}) async {
if (box == null) return;
final delete = box!.delete(key); // delete in bg
final id = graph.getIdForKey(key);
if (id != null) {
graph.removeId(internalType, id, notify: false);
}
graph.removeKey(key);
await delete;
}