getDataSetByLabel method
Returns the first set whose label equals label by scanning all sets.
ignoreCase is true to compare labels case insensitively. Returns the set, or null if no label matches.
Implementation
T? getDataSetByLabel(String label, bool ignoreCase) {
final index = getDataSetIndexByLabel(dataSets, label, ignoreCase);
return (index < 0 || index >= dataSets.length) ? null : dataSets[index];
}