fix: reformat code / code improvements
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user