getKeys method

List getKeys(
  1. List<Model> models,
  2. String key
)

Extracts unique attribute values from a list of models, used to build WHERE IN clauses for batch fetching.

Implementation

List<dynamic> getKeys(List<Model> models, String key) {
  return models.map((m) => m.attributes[key]).toSet().toList();
}