Frontend first draft
This commit is contained in:
16
frontend/pweb/lib/utils/payment/label.dart
Normal file
16
frontend/pweb/lib/utils/payment/label.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:pshared/models/payment/type.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
String getPaymentTypeLabel(BuildContext context, PaymentType type) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return switch (type) {
|
||||
PaymentType.card => l10n.paymentTypeCard,
|
||||
PaymentType.bankAccount => l10n.paymentTypeBankAccount,
|
||||
PaymentType.iban => l10n.paymentTypeIban,
|
||||
PaymentType.wallet => l10n.paymentTypeWallet,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user