getItemMatches static method
Map<String, AppMediaItem>
getItemMatches(
- Map<
String, AppMediaItem> totalItems, - List<
String> profileItems
Implementation
static Map<String, AppMediaItem> getItemMatches(Map<String, AppMediaItem> totalItems, List<String> profileItems) {
AppConfig.logger.t("Get Item Matches for ${totalItems.length} total items");
Map<String, AppMediaItem> matchedItemms = <String,AppMediaItem>{};
try {
totalItems.forEach((itemId, item) {
if(profileItems.contains(itemId)) {
matchedItemms[itemId] = item;
AppConfig.logger.t("Adding Item Id: $itemId - Name: ${item.name}");
}
});
} catch (e) {
AppConfig.logger.e(e.toString());
}
AppConfig.logger.d("Total ItemmMatches: ${matchedItemms.length}");
return matchedItemms;
}