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

View File

@@ -37,32 +37,20 @@ class HomeScreen extends ConsumerWidget {
margin: EdgeInsets.all(30), margin: EdgeInsets.all(30),
child: Column( child: Column(
children: [ children: [
Row( Align(
children: [ alignment: Alignment.centerLeft,
Expanded( child: Text.rich(
child: Text.rich( TextSpan(
text: context.translate(I18n.homeGreeting),
style: TextStyle(fontSize: 25),
children: <TextSpan>[
TextSpan( TextSpan(
text: context.translate(I18n.homeGreeting), text: viewState.userName,
style: TextStyle(fontSize: 25), style: TextStyle(fontWeight: FontWeight.w500),
children: <TextSpan>[
TextSpan(
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(), const ChildWalletsSlider(),
Align( Align(