addInRepository method

void addInRepository(
  1. List<Model> models
)

This function adds models into repositoryMap

! Not use this function outside the repositories

In the extended class, this function has to be called always for the models obtained from the database

Implementation

void addInRepository(List<Model> models) {
  for (Model model in models) {
    repositoryMap[model.id] = model;
  }
}