Skip to content

Commit

Permalink
correct handling of favorites (add, remove)
Browse files Browse the repository at this point in the history
  • Loading branch information
boeledi committed Nov 1, 2018
1 parent 8e24667 commit 423e197
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/models/movie_card.dart
@@ -1,5 +1,5 @@

class MovieCard {
class MovieCard extends Object {
final int id;
final voteAverage;
final String title;
Expand All @@ -14,4 +14,10 @@ class MovieCard {
title = json['title'],
posterPath = json['poster_path'],
overview = json['overview'];
}

@override
bool operator==(dynamic other) => identical(this, other) || this.id == other.id;

@override
int get hashCode => id;
}

0 comments on commit 423e197

Please sign in to comment.