fix: formatting
This commit is contained in:
@@ -18,17 +18,11 @@ class BarTab {
|
||||
});
|
||||
|
||||
int get totalInCents {
|
||||
return items.fold<int>(
|
||||
0,
|
||||
(total, item) => total + item.lineTotalInCents,
|
||||
);
|
||||
return items.fold<int>(0, (total, item) => total + item.lineTotalInCents);
|
||||
}
|
||||
|
||||
int get itemCount {
|
||||
return items.fold<int>(
|
||||
0,
|
||||
(total, item) => total + item.quantity,
|
||||
);
|
||||
return items.fold<int>(0, (total, item) => total + item.quantity);
|
||||
}
|
||||
|
||||
String get formattedTotal {
|
||||
@@ -36,4 +30,4 @@ class BarTab {
|
||||
}
|
||||
|
||||
bool get isOpen => status == 'open';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ class ClosedTab {
|
||||
|
||||
String get formattedTotal =>
|
||||
NumberFormat.simpleCurrency().format(totalInCents / 100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,4 @@ class ClosedTabItem {
|
||||
});
|
||||
|
||||
int get lineTotalInCents => quantity * unitPriceInCents;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,4 @@ class Product {
|
||||
active: active ?? this.active,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,15 +4,9 @@ class AppSettings {
|
||||
final bool pinRequired;
|
||||
final AppThemeMode themeMode;
|
||||
|
||||
const AppSettings({
|
||||
required this.pinRequired,
|
||||
required this.themeMode,
|
||||
});
|
||||
const AppSettings({required this.pinRequired, required this.themeMode});
|
||||
|
||||
AppSettings copyWith({
|
||||
bool? pinRequired,
|
||||
AppThemeMode? themeMode,
|
||||
}) {
|
||||
AppSettings copyWith({bool? pinRequired, AppThemeMode? themeMode}) {
|
||||
return AppSettings(
|
||||
pinRequired: pinRequired ?? this.pinRequired,
|
||||
themeMode: themeMode ?? this.themeMode,
|
||||
@@ -23,4 +17,4 @@ class AppSettings {
|
||||
pinRequired: false,
|
||||
themeMode: AppThemeMode.system,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ class TabItem {
|
||||
String get formattedUnitPrice {
|
||||
return '€${(unitPriceInCents / 100).toStringAsFixed(2)}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user