Added Localizations and ran small fixes
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:pshared/models/payment/status.dart';
|
||||
|
||||
import 'package:pweb/models/currency.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
enum WalletTransactionType { topUp, payout }
|
||||
|
||||
extension WalletTransactionTypeX on WalletTransactionType {
|
||||
String label(BuildContext context) {
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
switch (this) {
|
||||
case WalletTransactionType.topUp:
|
||||
return 'Top up';
|
||||
return loc.walletTopUp;
|
||||
case WalletTransactionType.payout:
|
||||
return 'Payout';
|
||||
return loc.payout;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user