capitalize method

String capitalize()

Returns the capitalized string

Implementation

String capitalize() =>
    isNotEmpty ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';