added missed loc instead of hardcode
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import 'package:pshared/controllers/payment/source.dart';
|
import 'package:pshared/controllers/payment/source.dart';
|
||||||
@@ -8,6 +9,8 @@ import 'package:pshared/models/payment/type.dart';
|
|||||||
|
|
||||||
import 'package:pweb/app/router/payout_routes.dart';
|
import 'package:pweb/app/router/payout_routes.dart';
|
||||||
|
|
||||||
|
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||||
|
|
||||||
|
|
||||||
class BalanceActionButtonState {
|
class BalanceActionButtonState {
|
||||||
final String label;
|
final String label;
|
||||||
@@ -41,19 +44,20 @@ class BalanceSourceActionsController {
|
|||||||
required String walletRef,
|
required String walletRef,
|
||||||
required VoidCallback onAddFunds,
|
required VoidCallback onAddFunds,
|
||||||
}) {
|
}) {
|
||||||
|
final l10n = AppLocalizations.of(context)!;
|
||||||
return BalanceActionsState(
|
return BalanceActionsState(
|
||||||
topLeading: BalanceActionButtonState(
|
topLeading: BalanceActionButtonState(
|
||||||
label: 'Operation History',
|
label: l10n.operationfryTitle,
|
||||||
icon: Icons.history_rounded,
|
icon: Icons.history_rounded,
|
||||||
onPressed: () => _openWalletOperationHistory(context, walletRef),
|
onPressed: () => _openWalletOperationHistory(context, walletRef),
|
||||||
),
|
),
|
||||||
topTrailing: BalanceActionButtonState(
|
topTrailing: BalanceActionButtonState(
|
||||||
label: 'Send Payout',
|
label: l10n.send,
|
||||||
icon: Icons.send_rounded,
|
icon: Icons.send_rounded,
|
||||||
onPressed: () => _sendWalletPayout(context, walletRef),
|
onPressed: () => _sendWalletPayout(context, walletRef),
|
||||||
),
|
),
|
||||||
bottom: BalanceActionButtonState(
|
bottom: BalanceActionButtonState(
|
||||||
label: 'Wallet Details / Add Funds',
|
label: '${l10n.details} / ${l10n.addFunds}',
|
||||||
icon: Icons.account_balance_wallet_rounded,
|
icon: Icons.account_balance_wallet_rounded,
|
||||||
onPressed: onAddFunds,
|
onPressed: onAddFunds,
|
||||||
),
|
),
|
||||||
@@ -66,19 +70,20 @@ class BalanceSourceActionsController {
|
|||||||
required VoidCallback onAddFunds,
|
required VoidCallback onAddFunds,
|
||||||
required VoidCallback onWalletDetails,
|
required VoidCallback onWalletDetails,
|
||||||
}) {
|
}) {
|
||||||
|
final l10n = AppLocalizations.of(context)!;
|
||||||
return BalanceActionsState(
|
return BalanceActionsState(
|
||||||
topLeading: BalanceActionButtonState(
|
topLeading: BalanceActionButtonState(
|
||||||
label: 'Operation History / Wallet Details',
|
label: '${l10n.operationfryTitle} / ${l10n.details}',
|
||||||
icon: Icons.receipt_long_rounded,
|
icon: Icons.receipt_long_rounded,
|
||||||
onPressed: onWalletDetails,
|
onPressed: onWalletDetails,
|
||||||
),
|
),
|
||||||
topTrailing: BalanceActionButtonState(
|
topTrailing: BalanceActionButtonState(
|
||||||
label: 'Send Payout',
|
label: l10n.send,
|
||||||
icon: Icons.send_rounded,
|
icon: Icons.send_rounded,
|
||||||
onPressed: () => _sendLedgerPayout(context, ledgerAccountRef),
|
onPressed: () => _sendLedgerPayout(context, ledgerAccountRef),
|
||||||
),
|
),
|
||||||
bottom: BalanceActionButtonState(
|
bottom: BalanceActionButtonState(
|
||||||
label: 'Add Funds',
|
label: l10n.addFunds,
|
||||||
icon: Icons.add_card_rounded,
|
icon: Icons.add_card_rounded,
|
||||||
onPressed: onAddFunds,
|
onPressed: onAddFunds,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user