humanize function

String humanize(
  1. String id
)

Humanisierte Id: '-'→' ', erster Buchstabe groß.

Implementation

String humanize(String id) {
  final text = id.replaceAll('-', ' ');
  if (text.isEmpty) return text;
  return text[0].toUpperCase() + text.substring(1);
}