[Flutter] Show pending balances

This commit is contained in:
Erdem Yerebasmaz
2024-05-24 12:26:48 +03:00
parent fed19151fd
commit 10fa1929df

View File

@@ -25,9 +25,28 @@ class Balance extends StatelessWidget {
final walletInfo = walletInfoSnapshot.data!;
return Center(
child: Text(
"${walletInfo.balanceSat} sats",
style: Theme.of(context).textTheme.headlineLarge?.copyWith(color: Colors.blue),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"${walletInfo.balanceSat} sats",
style: Theme.of(context).textTheme.headlineLarge?.copyWith(color: Colors.blue),
),
if (walletInfo.pendingReceiveSat != 0) ...[
Text(
"Pending Receive: ${walletInfo.pendingReceiveSat} sats",
style: Theme.of(context).textTheme.labelSmall?.copyWith(color: Colors.blueGrey),
),
],
if (walletInfo.pendingSendSat != 0) ...[
Text(
"Pending Send: ${walletInfo.pendingSendSat} sats",
style: Theme.of(context).textTheme.labelSmall?.copyWith(color: Colors.blueGrey),
),
],
],
),
);
},