feat: add alot
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
enum PaymentMethod {
|
||||
cash('cash', 'Cash', 'Cash payment'),
|
||||
payconiq('payconiq', 'Payconiq', 'Payconiq QR payment'),
|
||||
paymentPending('payment_pending', 'Payment pending', 'Unpaid remote close');
|
||||
cash('cash'),
|
||||
payconiq('payconiq'),
|
||||
paymentPending('payment_pending');
|
||||
|
||||
final String value;
|
||||
final String label;
|
||||
final String description;
|
||||
|
||||
const PaymentMethod(this.value, this.label, this.description);
|
||||
const PaymentMethod(this.value);
|
||||
|
||||
static PaymentMethod fromValue(String value) => PaymentMethod.values.firstWhere(
|
||||
(e) => e.value == value,
|
||||
static PaymentMethod fromValue(String value) =>
|
||||
PaymentMethod.values.firstWhere(
|
||||
(method) => method.value == value,
|
||||
orElse: () => PaymentMethod.cash,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user