feat: add equality operators, make history screen paginated, random performance updates
This commit is contained in:
@@ -48,4 +48,29 @@ class Product {
|
||||
active: active ?? this.active,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is Product &&
|
||||
id == other.id &&
|
||||
name == other.name &&
|
||||
category == other.category &&
|
||||
stockQuantity == other.stockQuantity &&
|
||||
lowStockThreshold == other.lowStockThreshold &&
|
||||
priceInCents == other.priceInCents &&
|
||||
imagePath == other.imagePath &&
|
||||
active == other.active;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
id,
|
||||
name,
|
||||
category,
|
||||
stockQuantity,
|
||||
lowStockThreshold,
|
||||
priceInCents,
|
||||
imagePath,
|
||||
active,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user