mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
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
This commit is contained in:
parent
b16cfaaff5
commit
e84d02f661
1 changed files with 20 additions and 20 deletions
|
@ -149,12 +149,26 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||||
|
|
||||||
return wallet.isCurrent
|
return wallet.isCurrent
|
||||||
? row
|
? row
|
||||||
: Slidable(
|
: Row(children: [
|
||||||
key: Key('${wallet.key}'),
|
Expanded(child: row),
|
||||||
startActionPane: _actionPane(wallet),
|
GestureDetector(
|
||||||
endActionPane: _actionPane(wallet),
|
onTap: () => _removeWallet(wallet),
|
||||||
child: row,
|
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<WalletListBody> {
|
||||||
_progressBar = null;
|
_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,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue