Skip to content

Instantly share code, notes, and snippets.

@ajinzrathod
Created September 12, 2024 05:33
Show Gist options
  • Save ajinzrathod/ea41c5f1c83883e701f11e58e5db1b7c to your computer and use it in GitHub Desktop.
Save ajinzrathod/ea41c5f1c83883e701f11e58e5db1b7c to your computer and use it in GitHub Desktop.
Comparing Objects in Dart
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