Skip to content

Instantly share code, notes, and snippets.

@felipecastrosales
Last active November 11, 2021 23:29
Show Gist options
  • Save felipecastrosales/125dbe0d2a6877cbcdde561d3a438eb6 to your computer and use it in GitHub Desktop.
Save felipecastrosales/125dbe0d2a6877cbcdde561d3a438eb6 to your computer and use it in GitHub Desktop.
Maps - Intro
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