capitalizeValues<K> method

Map<K, String> capitalizeValues<K>()

Capitalize all values in the map. Returns a new map with capitalized values.

Implementation

Map<K, String> capitalizeValues<K>() {
  final map = <K, String>{};
  for (final key in keys) {
    map[key as K] = this[key].toString().capitalize();
  }
  return map;
}