deleteModel method

Future<bool> deleteModel(
  1. T model, {
  2. String? databaseName,
})

Deletes the given model from the map and the given database in repository

Implementation

Future<bool> deleteModel(T model, {String? databaseName}) async {
  final database = specificDatabase(databaseName);

  final successful = await database.deleteModel<T>(model);
  if (successful) {
    removeLoadedModels([model]);
  }
  return successful;
}