Map is used to store key-value pairs. It's important to get comfortable with the basics before you start modeling user profiles, product data, API responses, and settings data.
dart
void main() {
Map<String, dynamic> user = {
'name': 'Sai',
'role': 'Developer',
'points': 120,
'isActive': true,
};
print(user['name']);
print(user['points']);
user['points'] = 150;
print('Updated points: ${user['points']}');
}String keys are paired with values. Because dynamic is used, the values can be a mix of types — String, int, bool, and so on. You'll see this pattern a lot with user data, since field types often vary.
You should see
Sai 120 Updated points: 150