Skip to content

Commit

Permalink
Currently selected wallet pointer UI (#1710)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Blazebrain and tuxpizza authored Sep 28, 2024
1 parent a149c71 commit fc5878d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
23 changes: 19 additions & 4 deletions lib/src/screens/new_wallet/wallet_group_description_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class WalletGroupDescriptionPage extends BasePage {
padding: EdgeInsets.all(24),
child: Column(
children: [
Image.asset(
image,
height: 200
),
Image.asset(
_getThemedWalletGroupImage(currentTheme.type),
height: 200,
),
SizedBox(height: 32),
Expanded(
child: Text.rich(
Expand Down Expand Up @@ -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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ class GroupedWalletExpansionTile extends StatelessWidget {
),
child: ExpansionTile(
onExpansionChanged: onExpansionChanged,
initiallyExpanded: shouldShowCurrentWalletPointer
? childWallets.any((element) => element.isCurrent)
: false,
key: tileKey,
tilePadding:
EdgeInsets.symmetric(vertical: 1, horizontal: !isCurrentlySelectedWallet ? 16 : 0),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/screens/wallet_list/wallet_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class WalletListBodyState extends State<WalletListBody> {
tileKey: ValueKey('single_wallets_expansion_tile_widget_$index'),
isCurrentlySelectedWallet: wallet.isCurrent,
leadingWidget: SizedBox(
width: 60,
width: wallet.isCurrent ? 56 : 40,
child: Row(
children: [
wallet.isCurrent
Expand Down

0 comments on commit fc5878d

Please sign in to comment.