feat: add alot
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'closed_tab_item.dart';
|
||||
import 'payment_method.dart';
|
||||
import '../utils/collection_utils.dart';
|
||||
|
||||
class ClosedTab {
|
||||
final String id;
|
||||
@@ -10,8 +9,8 @@ class ClosedTab {
|
||||
final String customerName;
|
||||
final DateTime closedAt;
|
||||
final PaymentMethod paymentMethod;
|
||||
|
||||
final List<ClosedTabItem> items;
|
||||
|
||||
const ClosedTab({
|
||||
required this.id,
|
||||
required this.originalTabId,
|
||||
@@ -27,11 +26,6 @@ class ClosedTab {
|
||||
int get totalInCents =>
|
||||
items.fold(0, (sum, item) => sum + item.lineTotalInCents);
|
||||
|
||||
String get formattedTotal =>
|
||||
NumberFormat.simpleCurrency().format(totalInCents / 100);
|
||||
|
||||
String get formattedPaymentMethod => paymentMethod.label;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
|
||||
Reference in New Issue
Block a user