I am simply checking my ids array in other array. In one array i have bunch of ids in array and i am fltering second array where id exist.
My code
Future<List> dosomestuff() async {
var map = globalCategoryProduct.globalCategoryProductArray;
print(map);
print(WishList.wishlistArray);
if (map.length > 1) {
//print('show kr ');
var data = map;
data.forEach(
(category) {
print(category);
final filteredItemsToAdd = category
.where((item) => WishList.wishlistArray.contains(item['ItemID']));
print(filteredItemsToAdd);
},
);
if (items['Items'].length >= 1) {
setState(() {
show = true;
});
}
}
}
And i have some helper of global array like this
class globalCategoryProduct {
static var globalCategoryProductArray = [];
}
class WishList {
static var wishlistArray = [];
}
I am adding arrays in these global array and then fetch on other screen.
But dont know why its showing error of Class '_InternalLinkedHashMap<String, dynamic>' has no instance method