Created
April 19, 2020 02:25
-
-
Save dpossas/9ed7ef67d2208a9e077f5dc51d4aa551 to your computer and use it in GitHub Desktop.
Declarando variáveis
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() { | |
print("===================== NOME"); | |
var nome; //valor padrao null | |
print(nome.runtimeType); //tipo inicial Null (objeto Null) | |
print(nome == null); //validade inicial | |
print(nome == Null); //Null != null | |
print(nome is Null); //Objeto Null | |
nome = "Douglas"; | |
print("nome: $nome"); | |
print(nome.runtimeType); | |
nome = 123; | |
print("nome: $nome"); | |
print(nome.runtimeType); | |
print("===================== IDADE"); | |
var idade = 1; | |
print(idade.runtimeType); | |
print(idade is int); | |
print("===================== String"); | |
String idioma; | |
print(idioma.runtimeType); | |
idioma = "Português"; | |
print(idioma.runtimeType); | |
// idioma = 123; | |
print("===================== String"); | |
String enderecoCompletoDoAluno = "aqui seria o endereco"; | |
String enderecoAluno; | |
String _enderecoAluno; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment