shouldShowBadge function

bool shouldShowBadge(
  1. int index,
  2. dynamic badgeData
)

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;
}