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