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,9 +2,10 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:pshared/controllers/wallets.dart';
import 'package:pshared/models/payment/wallet.dart';
import 'package:pweb/pages/dashboard/buttons/balance/carousel.dart';
import 'package:pshared/provider/payment/wallets.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
@@ -16,24 +17,23 @@ class BalanceWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final walletsProvider = context.watch<WalletsProvider>();
final walletsController = context.watch<WalletsController>();
final loc = AppLocalizations.of(context)!;
if (walletsProvider.isLoading) {
if (walletsController.isLoading) {
return const Center(child: CircularProgressIndicator());
}
final wallets = walletsProvider.wallets;
final wallets = walletsController.wallets;
if (wallets.isEmpty) {
return Center(child: Text(loc.noWalletsAvailable));
}
return
WalletCarousel(
wallets: wallets,
onWalletChanged: walletsProvider.selectWallet,
onTopUp: onTopUp,
);
return WalletCarousel(
wallets: wallets,
onWalletChanged: walletsController.selectWallet,
onTopUp: onTopUp,
);
}
}