Created
September 12, 2024 05:33
-
-
Save ajinzrathod/ea41c5f1c83883e701f11e58e5db1b7c to your computer and use it in GitHub Desktop.
Comparing Objects in Dart
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
class Website { | |
const Website(this.url); | |
final String url; | |
} | |
void main() { | |
final Website website = Website("Stackoverflow"); | |
print(website == Website("Stackoverflow")); // Prints false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment