Created
December 15, 2020 17:43
-
-
Save jairoFernandez/12c250149ae21d65ac41bcf0f2750f32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
badCombinatorFunction(List<dynamic> products, List<dynamic> users) { | |
final data = []; | |
for (var i = 0; i < products.length; i++) { | |
final user = users.firstWhere((u) => u['id'] == products[i]['user']); | |
data.add({ | |
"id": products[i]['id'], | |
"name": products[i]['name'], | |
"user": user, | |
}); | |
} | |
return data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment