comment some widgets

This commit is contained in:
2026-03-13 09:44:59 +01:00
parent 69b3cf358a
commit 904cfee2a9
2 changed files with 27 additions and 38 deletions

View File

@@ -186,8 +186,6 @@ class _ActivityScreenState extends ConsumerState<ActivityScreen> {
);
}
final walletId = viewState.selectedTab!.walletId;
final balanceAsync = ref.watch(walletBalanceProvider(walletId));
final currentTransactions = viewState.transactionPages[viewState.currentPage];
return RefreshIndicator(
@@ -197,19 +195,22 @@ class _ActivityScreenState extends ConsumerState<ActivityScreen> {
physics: const AlwaysScrollableScrollPhysics(),
padding: const EdgeInsets.symmetric(horizontal: 24),
children: [
Padding(
padding: const EdgeInsets.only(bottom: 16),
child: balanceAsync.when(
loading: () =>
const Center(child: AppLoadingIndicator(size: 48)),
error: (_, __) => const SizedBox.shrink(),
data: (balance) => WalletBalanceBlock(
availableBalance: balance.availableBalance,
allocatedBalance: balance.allocatedBalance,
totalBalance: balance.totalBalance,
),
),
),
// TODO: WalletBalanceBlock temporarily hidden
// final walletId = viewState.selectedTab!.walletId;
// final balanceAsync = ref.watch(walletBalanceProvider(walletId));
// Padding(
// padding: const EdgeInsets.only(bottom: 16),
// child: balanceAsync.when(
// loading: () =>
// const Center(child: AppLoadingIndicator(size: 48)),
// error: (_, __) => const SizedBox.shrink(),
// data: (balance) => WalletBalanceBlock(
// availableBalance: balance.availableBalance,
// allocatedBalance: balance.allocatedBalance,
// totalBalance: balance.totalBalance,
// ),
// ),
// ),
...currentTransactions.map(
(tx) => Padding(
padding: const EdgeInsets.only(bottom: 12),

View File

@@ -37,32 +37,20 @@ class HomeScreen extends ConsumerWidget {
margin: EdgeInsets.all(30),
child: Column(
children: [
Row(
children: [
Expanded(
child: Text.rich(
Align(
alignment: Alignment.centerLeft,
child: Text.rich(
TextSpan(
text: context.translate(I18n.homeGreeting),
style: TextStyle(fontSize: 25),
children: <TextSpan>[
TextSpan(
text: context.translate(I18n.homeGreeting),
style: TextStyle(fontSize: 25),
children: <TextSpan>[
TextSpan(
text: viewState.userName,
style: TextStyle(fontWeight: FontWeight.w500),
),
],
text: viewState.userName,
style: TextStyle(fontWeight: FontWeight.w500),
),
),
],
),
IconButton(
onPressed: () =>
navigationContract.pushTo(AppRoutes.deviceSetup),
icon: Icon(
Icons.person_add_outlined,
color: theme.getColorFor(ThemeCode.textPrimary),
),
tooltip: context.translate(I18n.homeAddAnotherKid),
),
],
),
),
const ChildWalletsSlider(),
Align(