mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-21 22:58:45 +00:00
Revert removing swipe to delete wallet feature
This commit is contained in:
parent
337bfd0527
commit
8ffad4bf80
1 changed files with 20 additions and 20 deletions
|
@ -149,26 +149,12 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||||
|
|
||||||
return wallet.isCurrent
|
return wallet.isCurrent
|
||||||
? row
|
? row
|
||||||
: Row(children: [
|
: Slidable(
|
||||||
Expanded(child: row),
|
key: Key('${wallet.key}'),
|
||||||
GestureDetector(
|
startActionPane: _actionPane(wallet),
|
||||||
onTap: () => _removeWallet(wallet),
|
endActionPane: _actionPane(wallet),
|
||||||
child: Container(
|
child: row,
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -291,4 +277,18 @@ 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