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