Fix untappable area of wallets page (#2636)
What changed, and why it matters
This commit fixes a user-interface bug where a decorative gradient overlay on the wallets page was accidentally blocking taps on buttons underneath it. The fix wraps the gradient in an IgnorePointer widget so it no longer intercepts touches, while keeping the actual buttons tappable. There is no security relevance in this change.
No security action needed; treat as a normal UI/UX fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In lib/src/screens/wallet_list/wallet_list_page.dart, the bottom gradient overlay (a Positioned Container with height 185) was previously a sibling/tappable layer that could absorb pointer events over the restore/create wallet buttons. The patch restructures the overlay into a Stack with the gradient wrapped in IgnorePointer and the button column as a separate, tappable child. This is a pure UX/layout fix with no changes to authentication, navigation logic, or data handling.
Changed components
lib/src/screens/wallet_list/wallet_list_page.dartInspect captured patch +96 / −92
diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart
index f4730a50..bf882a4e 100644
--- a/lib/src/screens/wallet_list/wallet_list_page.dart
+++ b/lib/src/screens/wallet_list/wallet_list_page.dart
@@ -327,113 +327,117 @@ class WalletListBodyState extends State<WalletListBody> {
),
),
Positioned(
- bottom: 0.0,
- child: Container(
- //padding: EdgeInsets.only(top: 100),
+ child: Stack(
alignment: Alignment.bottomCenter,
- height: 185,
- //width: 600,
- //padding: EdgeInsets.only(top: 50),
- decoration: BoxDecoration(
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: <Color>[
- Theme.of(context).colorScheme.surface.withAlpha(10),
- Theme.of(context).colorScheme.surface,
- Theme.of(context).colorScheme.surface,
- Theme.of(context).colorScheme.surface
- ],
- ),
- ),
- child: Container(
- height: 120,
- width: MediaQuery.of(context).size.width,
- //alignment: Alignment.bottomCenter,
- margin: EdgeInsets.only(bottom: 24),
- padding: EdgeInsets.only(left: 16, right: 16),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- PrimaryImageButton(
- image: Image.asset(
- 'assets/images/restore_wallet.png',
- height: 12,
- width: 12,
- color: Theme.of(context).colorScheme.onSecondaryContainer,
+ children: [
+ IgnorePointer(
+ child: Container(
+ alignment: Alignment.bottomCenter,
+ height: 185,
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: <Color>[
+ Theme.of(context).colorScheme.surface.withAlpha(10),
+ Theme.of(context).colorScheme.surface,
+ Theme.of(context).colorScheme.surface,
+ Theme.of(context).colorScheme.surface
+ ],
),
- key: ValueKey('wallet_list_page_restore_wallet_button_key'),
- onPressed: () {
- if (widget.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
- widget.authService.authenticateAction(
- context,
- route: Routes.restoreOptions,
- arguments: false,
- conditionToDetermineIfToUse2FA: widget
- .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
- );
- } else {
- Navigator.of(context).pushNamed(Routes.restoreOptions, arguments: false);
- }
- },
- text: S.of(context).wallet_list_restore_wallet,
- color: Theme.of(context).colorScheme.surfaceContainer,
- textColor: Theme.of(context).colorScheme.onSecondaryContainer,
),
- SizedBox(height: 10.0),
- PrimaryImageButton(
- image: Image.asset(
- 'assets/images/new_wallet.png',
- height: 12,
- width: 12,
- color: Theme.of(context).colorScheme.onPrimary,
- ),
- key: ValueKey('wallet_list_page_create_new_wallet_button_key'),
- onPressed: () {
- //TODO(David): Find a way to optimize this
- if (isSingleCoin) {
+ ),
+ ),
+ Container(
+ height: 120,
+ width: MediaQuery.of(context).size.width,
+ margin: EdgeInsets.only(bottom: 24),
+ padding: EdgeInsets.only(left: 16, right: 16),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: <Widget>[
+ PrimaryImageButton(
+ image: Image.asset(
+ 'assets/images/restore_wallet.png',
+ height: 12,
+ width: 12,
+ color: Theme.of(context).colorScheme.onSecondaryContainer,
+ ),
+ key: ValueKey('wallet_list_page_restore_wallet_button_key'),
+ onPressed: () {
if (widget
.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
widget.authService.authenticateAction(
context,
- route: Routes.newWallet,
- arguments: NewWalletArguments(
- type: widget.walletListViewModel.currentWalletType,
- ),
+ route: Routes.restoreOptions,
+ arguments: false,
conditionToDetermineIfToUse2FA: widget
.walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
);
} else {
- Navigator.of(context).pushNamed(
- Routes.newWallet,
- arguments: NewWalletArguments(
- type: widget.walletListViewModel.currentWalletType,
- ),
- );
+ Navigator.of(context)
+ .pushNamed(Routes.restoreOptions, arguments: false);
}
- } else {
- if (widget
- .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
- widget.authService.authenticateAction(
- context,
- route: Routes.newWalletType,
- conditionToDetermineIfToUse2FA: widget
- .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
- );
+ },
+ text: S.of(context).wallet_list_restore_wallet,
+ color: Theme.of(context).colorScheme.surfaceContainer,
+ textColor: Theme.of(context).colorScheme.onSecondaryContainer,
+ ),
+ SizedBox(height: 10.0),
+ PrimaryImageButton(
+ image: Image.asset(
+ 'assets/images/new_wallet.png',
+ height: 12,
+ width: 12,
+ color: Theme.of(context).colorScheme.onPrimary,
+ ),
+ key: ValueKey('wallet_list_page_create_new_wallet_button_key'),
+ onPressed: () {
+ //TODO(David): Find a way to optimize this
+ if (isSingleCoin) {
+ if (widget
+ .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
+ widget.authService.authenticateAction(
+ context,
+ route: Routes.newWallet,
+ arguments: NewWalletArguments(
+ type: widget.walletListViewModel.currentWalletType,
+ ),
+ conditionToDetermineIfToUse2FA: widget
+ .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
+ );
+ } else {
+ Navigator.of(context).pushNamed(
+ Routes.newWallet,
+ arguments: NewWalletArguments(
+ type: widget.walletListViewModel.currentWalletType,
+ ),
+ );
+ }
} else {
- Navigator.of(context).pushNamed(Routes.newWalletType);
+ if (widget
+ .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets) {
+ widget.authService.authenticateAction(
+ context,
+ route: Routes.newWalletType,
+ conditionToDetermineIfToUse2FA: widget
+ .walletListViewModel.shouldRequireTOTP2FAForCreatingNewWallets,
+ );
+ } else {
+ Navigator.of(context).pushNamed(Routes.newWalletType);
+ }
}
- }
- },
- text: S.of(context).wallet_list_create_new_wallet,
- color: Theme.of(context).colorScheme.primary,
- textColor: Theme.of(context).colorScheme.onPrimary,
- ),
- ],
+ },
+ text: S.of(context).wallet_list_create_new_wallet,
+ color: Theme.of(context).colorScheme.primary,
+ textColor: Theme.of(context).colorScheme.onPrimary,
+ ),
+ ],
+ ),
),
- ),
+ ],
),
),
],
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.