Fixed compilation
This commit is contained in:
@@ -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,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user