Capitalize the first letter of a string - Flutter

PHOTO EMBED

Mon Mar 22 2021 10:50:27 GMT+0000 (Coordinated Universal Time)

Saved by @MichaelJohnston #dart #flutter

extension StringExtension on String {
    String capitalize() {
      return "${this[0].toUpperCase()}${this.substring(1)}";
    }
}
content_copyCOPY

https://stackoverflow.com/questions/29628989/how-to-capitalize-the-first-letter-of-a-string-in-dart