15 lines
428 B
Dart
15 lines
428 B
Dart
enum PaymentMethod {
|
|
cash('cash', 'Cash', 'Cash payment'),
|
|
payconiq('payconiq', 'Payconiq', 'Payconiq QR payment');
|
|
|
|
final String value;
|
|
final String label;
|
|
final String description;
|
|
|
|
const PaymentMethod(this.value, this.label, this.description);
|
|
|
|
static PaymentMethod fromValue(String value) => PaymentMethod.values.firstWhere(
|
|
(e) => e.value == value,
|
|
orElse: () => PaymentMethod.cash,
|
|
);
|
|
} |