flutter pub add equatable
→ pubspec.yaml 파일에서 설치 되었는 지 확인 가능함
operator == 과 hashcode 메소드를 정의해주어야하는데, equatable라이브러리를 통해 더 쉽게 사용이 가능하다.
class Person extends Equatable {
final int id;
final String name;
final int age;
Person({
required this.id,
required this.name,
required this.age,
});
List<Object> get props => [this.id, this.name, this.age];
}