Created
April 7, 2020 08:53
-
-
Save tailorvj/7640a4f9b0f157ee28845629d12f0aee to your computer and use it in GitHub Desktop.
Dart example: combining 2 Map objects with the spread operator
This file contains 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(){ | |
Map map1 = {1: 'one', 2: 'two'}; | |
Map map2 = {3: 'three', 4: 'four'}; | |
Map map3 = {...map1, ...map2}; | |
print('map1: $map1'); | |
print('map2: $map2'); | |
print('map3: $map3'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment