solyanka iz fix for payout page design, ledger wallet now clickable
This commit is contained in:
@@ -2,17 +2,16 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:pshared/controllers/balance_mask/wallets.dart';
|
||||
import 'package:pshared/controllers/payment/source.dart';
|
||||
|
||||
import 'package:pweb/pages/payout_page/wallet/edit/buttons/buttons.dart';
|
||||
import 'package:pweb/pages/payout_page/wallet/edit/fields.dart';
|
||||
import 'package:pweb/pages/payout_page/wallet/edit/header.dart';
|
||||
import 'package:pweb/pages/payout_page/wallet/history/history.dart';
|
||||
import 'package:pweb/utils/dimensions.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
//TODO make this page more generic and reusable
|
||||
class WalletEditPage extends StatelessWidget {
|
||||
final VoidCallback onBack;
|
||||
|
||||
@@ -23,11 +22,11 @@ class WalletEditPage extends StatelessWidget {
|
||||
final dimensions = AppDimensions();
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
|
||||
return Consumer<WalletsController>(
|
||||
return Consumer<PaymentSourceController>(
|
||||
builder: (context, controller, child) {
|
||||
final wallet = controller.selectedWallet;
|
||||
|
||||
if (wallet == null) {
|
||||
final sourceType = controller.selectedType;
|
||||
|
||||
if (sourceType == null) {
|
||||
return Center(child: Text(loc.noWalletSelected));
|
||||
}
|
||||
|
||||
@@ -36,11 +35,15 @@ class WalletEditPage extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: dimensions.maxContentWidth),
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: dimensions.maxContentWidth,
|
||||
),
|
||||
child: Material(
|
||||
elevation: dimensions.elevationSmall,
|
||||
color: Theme.of(context).colorScheme.onSecondary,
|
||||
borderRadius: BorderRadius.circular(dimensions.borderRadiusMedium),
|
||||
borderRadius: BorderRadius.circular(
|
||||
dimensions.borderRadiusMedium,
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(dimensions.paddingLarge),
|
||||
child: SingleChildScrollView(
|
||||
@@ -55,19 +58,12 @@ class WalletEditPage extends StatelessWidget {
|
||||
WalletEditFields(),
|
||||
const SizedBox(height: 24),
|
||||
ButtonsWalletWidget(),
|
||||
const SizedBox(height: 24),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: WalletHistory(wallet: wallet),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user