Currently selected wallet pointer UI (#1710)

* 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>

David Adegoke committed Sep 28, 2024 at 01:04 UTC fc5878d9912a0e8f85880b83fd618ab6c9dfd711
3 files changed +23 -5
lib/src/screens/new_wallet/wallet_group_description_page.dart
+19 -4
@@ -32,10 +32,10 @@ class WalletGroupDescriptionPage extends BasePage {
32 padding: EdgeInsets.all(24),
33 child: Column(
34 children: [
35 - Image.asset(
36 - image,
37 - height: 200
38 - ),
35 + Image.asset(
36 + _getThemedWalletGroupImage(currentTheme.type),
37 + height: 200,
38 + ),
39 SizedBox(height: 32),
40 Expanded(
41 child: Text.rich(
@@ -96,4 +96,19 @@ class WalletGroupDescriptionPage extends BasePage {
96 ),
97 );
98 }
99 +
100 + String _getThemedWalletGroupImage(ThemeType theme) {
101 + final lightImage = 'assets/images/wallet_group_light.png';
102 + final darkImage = 'assets/images/wallet_group_dark.png';
103 + final brightImage = 'assets/images/wallet_group_bright.png';
104 +
105 + switch (theme) {
106 + case ThemeType.bright:
107 + return brightImage;
108 + case ThemeType.light:
109 + return lightImage;
110 + default:
111 + return darkImage;
112 + }
113 + }
114 }
lib/src/screens/new_wallet/widgets/grouped_wallet_expansion_tile.dart
+3
@@ -77,6 +77,9 @@ class GroupedWalletExpansionTile extends StatelessWidget {
77 ),
78 child: ExpansionTile(
79 onExpansionChanged: onExpansionChanged,
80 + initiallyExpanded: shouldShowCurrentWalletPointer
81 + ? childWallets.any((element) => element.isCurrent)
82 + : false,
83 key: tileKey,
84 tilePadding:
85 EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),
lib/src/screens/wallet_list/wallet_list_page.dart
+1 -1
@@ -259,7 +259,7 @@ class WalletListBodyState extends State<WalletListBody> {
259 tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
260 isCurrentlySelectedWallet: wallet.isCurrent,
261 leadingWidget: SizedBox(
262 - width: 60,
262 + width: wallet.isCurrent ? 56 : 40,
263 child: Row(
264 children: [
265 wallet.isCurrent