Fix untappable area of wallets page (#2636)

* Fix untappable area of wallets page

* Cleanup
This commit is contained in:
tuxsudo
2025-11-08 21:07:47 +01:00
committed by GitHub
parent be170b0d3f
commit 19362df209
@@ -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,
),
],
),
),
),
],
),
),
],