feat: add equality operators, make history screen paginated, random performance updates
This commit is contained in:
@@ -24,4 +24,25 @@ class TabItem {
|
||||
String get formattedUnitPrice {
|
||||
return '€${(unitPriceInCents / 100).toStringAsFixed(2)}';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is TabItem &&
|
||||
id == other.id &&
|
||||
tabId == other.tabId &&
|
||||
productId == other.productId &&
|
||||
productName == other.productName &&
|
||||
quantity == other.quantity &&
|
||||
unitPriceInCents == other.unitPriceInCents;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
id,
|
||||
tabId,
|
||||
productId,
|
||||
productName,
|
||||
quantity,
|
||||
unitPriceInCents,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user