Skip to content

Instantly share code, notes, and snippets.

@moifeer
Created April 26, 2023 22:35
Show Gist options
  • Select an option

  • Save moifeer/375573329f99815cba0c76e4b23c5713 to your computer and use it in GitHub Desktop.

Select an option

Save moifeer/375573329f99815cba0c76e4b23c5713 to your computer and use it in GitHub Desktop.
Prueba 2 DART: Pokemon

Prueba 2 DART: Pokemon

Created with <3 with dartpad.dev.

void main() {
final String pokemon = 'ditto';
//int variable entera
int hp = 5;
print ('${hp * 2}, ${hp / 2}');
//triple comilla guarda la tabulación
print( """
Hola
¿Qué
tal
te
encuentras?
$pokemon
$hp
""");
final bool vivit = true;
//variables booleanas
//evitar que las variables sean nulas, hace que se estropee la app, si a una variable no se le da un valor esta es nula
//cuidado con la siguiente línea porque declara la variable es nula
//String urbs = null;
//si no sabemos si en algún momento la app va a tener un valor nulo añadimos el símbolo ?
String? urbs = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment