clear method

Future<void> clear()

Implementation

Future<void> clear() async {
  List<T> models = [];

  models.addAll(_all.values);

  for (dynamic model in models) {
    await Database.removeModel(getId(), model.getId());
  }

  _all = {};
  _indexed = {};
}