Skip to content

Instantly share code, notes, and snippets.

@marcusedu
Last active October 30, 2018 14:27
Show Gist options
  • Save marcusedu/ddc2983128737c9a3ce7bfd2efa656f1 to your computer and use it in GitHub Desktop.
Save marcusedu/ddc2983128737c9a3ce7bfd2efa656f1 to your computer and use it in GitHub Desktop.
main(){
//Vai compilar
dynamic numero = 10;
print('Agora a variavel numero é um ${numero.runtimeType} e possui o valor "$numero"');
//Agora vai compilar
numero = "Dez";
print('Agora a variavel numero é um ${numero.runtimeType} e possui o valor "$numero"');
//Vai lançar uma exceção em tempo de execução
int resultadoSoma = 19 + numero;
print('"Dez" + 19 = $resultadoSoma');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment