Created
March 22, 2024 16:13
-
-
Save epatel/51d33104c1412188c968b93cd98af7dc to your computer and use it in GitHub Desktop.
map object
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
class Test { | |
Map<String, String> data = {}; | |
Test(); | |
String toString() { | |
return '$data'; | |
} | |
} | |
void main() { | |
final t1 = Test(); | |
final t2 = Test(); | |
t1.data = t2.data; | |
t1.data['Happy'] = 'Yes'; | |
t2.data['Happy'] = 'No'; | |
print(t1); | |
print(t2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment