Currently selected wallet pointer UI (#1710)
Some checks failed
Cache Dependencies / test (push) Has been cancelled

* feat: Add UI signifying the currently selected wallet indicator

* fix: Product Fix - Add more padding to child wallets list item tile in grouped wallets, fix sort by dragging for general single wallets, and also groups, add animation to trailing arrow icon when tile is expanded or not

* Update wallet group image and change maxLines

* fix: Make group tile expand if it has the currently selected wallet and fix issue with wallet group image

---------

Co-authored-by: tuxpizza <tuxsudo@tux.pizza>
This commit is contained in:
David Adegoke 2024-09-28 01:04:10 +01:00 committed by GitHub
parent a149c71fb2
commit fc5878d991
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 5 deletions

View file

@ -33,8 +33,8 @@ class WalletGroupDescriptionPage extends BasePage {
child: Column( child: Column(
children: [ children: [
Image.asset( Image.asset(
image, _getThemedWalletGroupImage(currentTheme.type),
height: 200 height: 200,
), ),
SizedBox(height: 32), SizedBox(height: 32),
Expanded( Expanded(
@ -96,4 +96,19 @@ class WalletGroupDescriptionPage extends BasePage {
), ),
); );
} }
String _getThemedWalletGroupImage(ThemeType theme) {
final lightImage = 'assets/images/wallet_group_light.png';
final darkImage = 'assets/images/wallet_group_dark.png';
final brightImage = 'assets/images/wallet_group_bright.png';
switch (theme) {
case ThemeType.bright:
return brightImage;
case ThemeType.light:
return lightImage;
default:
return darkImage;
}
}
} }

View file

@ -77,6 +77,9 @@ class GroupedWalletExpansionTile extends StatelessWidget {
), ),
child: ExpansionTile( child: ExpansionTile(
onExpansionChanged: onExpansionChanged, onExpansionChanged: onExpansionChanged,
initiallyExpanded: shouldShowCurrentWalletPointer
? childWallets.any((element) => element.isCurrent)
: false,
key: tileKey, key: tileKey,
tilePadding: tilePadding:
EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0), EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),

View file

@ -259,7 +259,7 @@ class WalletListBodyState extends State<WalletListBody> {
tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'), tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
isCurrentlySelectedWallet: wallet.isCurrent, isCurrentlySelectedWallet: wallet.isCurrent,
leadingWidget: SizedBox( leadingWidget: SizedBox(
width: 60, width: wallet.isCurrent ? 56 : 40,
child: Row( child: Row(
children: [ children: [
wallet.isCurrent wallet.isCurrent