capitalize method

String capitalize()

String initial uppercase

Implementation

String capitalize() =>
    length > 1 ? this[0].toUpperCase() + substring(1) : toUpperCase();