Skip to content

Commit

Permalink
Merge pull request anoop4real#4 from Nyan274/master
Browse files Browse the repository at this point in the history
Add CountryCode Comparator
  • Loading branch information
anoop4real authored Sep 25, 2021
2 parents 097b317 + f1e87f2 commit f176f65
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/country.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@ class Country {

/// Country name
final String name;

@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Country && runtimeType == other.runtimeType && countryCode == other.countryCode;

@override
int get hashCode => countryCode.hashCode;

}

0 comments on commit f176f65

Please sign in to comment.