Skip to content

Instantly share code, notes, and snippets.

@samuelematias
Last active November 23, 2020 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelematias/fb422e46ddb330b763721da362012e16 to your computer and use it in GitHub Desktop.
Save samuelematias/fb422e46ddb330b763721da362012e16 to your computer and use it in GitHub Desktop.
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