Some checks failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
36 lines
893 B
Dart
36 lines
893 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:pweb/pages/dashboard/buttons/balance/carousel.dart';
|
|
import 'package:pweb/providers/wallets.dart';
|
|
|
|
import 'package:pweb/generated/i18n/app_localizations.dart';
|
|
|
|
|
|
class BalanceWidget extends StatelessWidget {
|
|
const BalanceWidget({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final walletsProvider = context.watch<WalletsProvider>();
|
|
final loc = AppLocalizations.of(context)!;
|
|
|
|
if (walletsProvider.isLoading) {
|
|
return const Center(child: CircularProgressIndicator());
|
|
}
|
|
|
|
final wallets = walletsProvider.wallets;
|
|
|
|
if (wallets.isEmpty) {
|
|
return Center(child: Text(loc.noWalletsAvailable));
|
|
}
|
|
|
|
return
|
|
WalletCarousel(
|
|
wallets: wallets,
|
|
onWalletChanged: walletsProvider.selectWallet,
|
|
);
|
|
}
|
|
}
|