Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dart Extensions methods example 1
void main() {
final String _text = 'ExTEnSiON';
String _capitalize(String text){
return "${text[0].toUpperCase()}${text.toLowerCase().substring(1)}";
}
print(_capitalize(_text)); //Extension
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment