Top Up Balance logic and Added fixes for routing

This commit is contained in:
Arseni
2025-12-05 20:29:43 +03:00
parent f7bf3138ac
commit bf39b1d401
27 changed files with 972 additions and 175 deletions

View File

@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:pshared/models/payment/type.dart';
import 'package:pshared/models/recipient/recipient.dart';
import 'package:pweb/models/wallet.dart';
import 'package:pweb/pages/dashboard/buttons/balance/balance.dart';
import 'package:pweb/pages/dashboard/buttons/buttons.dart';
import 'package:pweb/pages/dashboard/payouts/multiple/title.dart';
@@ -22,11 +23,13 @@ class AppSpacing {
class DashboardPage extends StatefulWidget {
final ValueChanged<Recipient> onRecipientSelected;
final void Function(PaymentType type) onGoToPaymentWithoutRecipient;
final ValueChanged<Wallet> onTopUp;
const DashboardPage({
super.key,
required this.onRecipientSelected,
required this.onGoToPaymentWithoutRecipient,
required this.onTopUp,
});
@override
@@ -75,7 +78,9 @@ class _DashboardPageState extends State<DashboardPage> {
],
),
const SizedBox(height: AppSpacing.medium),
BalanceWidget(),
BalanceWidget(
onTopUp: widget.onTopUp,
),
const SizedBox(height: AppSpacing.small),
if (_showContainerMultiple) TitleMultiplePayout(),
const SizedBox(height: AppSpacing.medium),