Last active
November 23, 2020 00:34
-
-
Save samuelematias/fb422e46ddb330b763721da362012e16 to your computer and use it in GitHub Desktop.
Dart Extensions methods example 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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