shouldShowBadge function
Implementation
bool shouldShowBadge(int index,badgeData) {
if (badgeData == null || badgeData.isEmpty) {
return false;
}
for (var badge in badgeData) {
if (badge['index'] == index && badge['value'] != null && badge['value'] != '0') {
return true;
}
}
return false;
}