capitalize function

String capitalize(
  1. String text
)

Capitalizes the given string

Implementation

String capitalize(String text) {
  return "${text[0].toUpperCase()}${text.substring(1)}";
}