getValueForIndex function

String getValueForIndex(
  1. int index,
  2. dynamic badgeData
)

Implementation

String getValueForIndex(int index,badgeData) {
  for (var badge in badgeData) {
    if (badge['index'] == index) {
      return badge['value'].toString();
    }
  }
  return '';
}