Last active
November 11, 2021 23:29
-
-
Save felipecastrosales/125dbe0d2a6877cbcdde561d3a438eb6 to your computer and use it in GitHub Desktop.
Maps - Intro
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() { | |
////////////////////////////////////// | |
// // | |
// +--------------------+ // | |
// | Maps | Tabela | // | |
// +--------------------+ // | |
// 1. | Nome | Felipe | // | |
// +--------------------+ // | |
// 2. | Numero | 40028922 | // | |
// +--------------------+ // | |
// // | |
////////////////////////////////////// | |
Map mapa1 = { | |
'nome': 'Felipe', | |
'numero': 40028922, | |
}; | |
var mapa2 = { | |
'nome': 'Felipe', | |
'numero': 40028922, | |
}; | |
Map<String, dynamic> mapa3 = { | |
'nome': 'Felipe', | |
'numero': 40028922, | |
}; | |
var mapa4 = <String, dynamic>{ | |
'nome': 'Felipe', | |
'numero': 40028922, | |
}; | |
print(mapa1); | |
print(mapa2); | |
print(mapa3); | |
print(mapa4); | |
print(mapa1['nome']); | |
print(mapa1['numero']); | |
print(mapa1['sobrenome']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment