From e84d02f66106ce055bb92f8f57bbeace31fc0b87 Mon Sep 17 00:00:00 2001 From: Rafael Saes <76502841+saltrafael@users.noreply.github.com> Date: Fri, 9 Jun 2023 19:31:05 -0300 Subject: [PATCH] CW-383-replace-swipe-to-delete-wallet-action-with-a-delete-trash-icon-on-the-right (#935) * feat: replace "swipe to delete" wallet action with a delete / trash icon on the right * fix: remove InkWell and _actionPane actions * feat: add a bit of padding from the end --- .../screens/wallet_list/wallet_list_page.dart | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index b20b2bd1a..3f33ebc7a 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -149,12 +149,26 @@ class WalletListBodyState extends State { return wallet.isCurrent ? row - : Slidable( - key: Key('${wallet.key}'), - startActionPane: _actionPane(wallet), - endActionPane: _actionPane(wallet), - child: row, - ); + : Row(children: [ + Expanded(child: row), + GestureDetector( + onTap: () => _removeWallet(wallet), + child: Container( + height: 40, + width: 44, + padding: EdgeInsets.only(right: 20), + child: Center( + child: Image.asset('assets/images/trash.png', + height: 16, + width: 16, + color: Theme.of(context) + .primaryTextTheme + .titleLarge! + .color), + ), + ), + ) + ]); }), ), ), @@ -277,18 +291,4 @@ class WalletListBodyState extends State { _progressBar = null; }); } - - ActionPane _actionPane(WalletListItem wallet) => ActionPane( - motion: const ScrollMotion(), - extentRatio: 0.3, - children: [ - SlidableAction( - onPressed: (_) => _removeWallet(wallet), - backgroundColor: Colors.red, - foregroundColor: Colors.white, - icon: CupertinoIcons.delete, - label: S.of(context).delete, - ), - ], - ); }