getKeys method
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();
}