added product comparison

This commit is contained in:
hannathkadher
2025-01-22 12:48:46 +04:00
parent 18afc4f563
commit 7ffdc67016

View File

@ -66,4 +66,25 @@ class ProductModel {
String toString() {
return 'ProductModel(uuid: $uuid, catName: $catName, prodId: $prodId, prodType: $prodType, name: $name, icon: $icon)';
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ProductModel &&
runtimeType == other.runtimeType &&
uuid == other.uuid &&
catName == other.catName &&
prodId == other.prodId &&
prodType == other.prodType &&
name == other.name &&
icon == other.icon;
@override
int get hashCode =>
uuid.hashCode ^
catName.hashCode ^
prodId.hashCode ^
prodType.hashCode ^
name.hashCode ^
icon.hashCode;
}