Fixed compilation

This commit is contained in:
Stephan D
2026-01-22 14:15:14 +01:00
parent 8456263dd8
commit 32e8376700
41 changed files with 549 additions and 190 deletions

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:pshared/provider/payment/wallets.dart';
import 'package:pshared/controllers/wallets.dart';
import 'package:pweb/pages/wallet_top_up/content.dart';
@@ -18,28 +18,26 @@ class WalletTopUpPage extends StatelessWidget {
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context)!;
return Consumer<WalletsProvider>(
builder: (context, provider, child) {
if (provider.isLoading) {
return const Center(child: CircularProgressIndicator());
}
return Consumer<WalletsController>(builder: (context, provider, child) {
if (provider.isLoading) {
return const Center(child: CircularProgressIndicator());
}
if (provider.error != null) {
return Center(
child: Text(loc.notificationError(provider.error.toString())),
);
}
final wallet = provider.selectedWallet;
if (wallet == null) {
return Center(child: Text(loc.noWalletSelected));
}
return WalletTopUpContent(
wallet: wallet,
onBack: onBack,
if (provider.error != null) {
return Center(
child: Text(loc.notificationError(provider.error.toString())),
);
},
);
}
final wallet = provider.selectedWallet;
if (wallet == null) {
return Center(child: Text(loc.noWalletSelected));
}
return WalletTopUpContent(
wallet: wallet,
onBack: onBack,
);
});
}
}