delete method Null safety

Future<void> delete()

Delete this store

This will remove all traces of this store from the user's device. Use with caution!

This method requires the store to be ready, else an FMTCStoreNotReady error will be raised.

Implementation

Future<void> delete() async {
  _ensureReadyStatus();

  final store = _registry.storeDatabases.remove(_id);
  if (store?.isOpen ?? false) await store!.close(deleteFromDisk: true);
}