From b3d360f8cc04ad92000dc743a7ff44b3ac9041a7 Mon Sep 17 00:00:00 2001 From: digitalheartxs Date: Tue, 24 Sep 2024 14:50:57 +0200 Subject: [PATCH] feat: My account, account page, add onRemoveKeychain callback --- catalyst_voices/lib/pages/account/account_page.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/catalyst_voices/lib/pages/account/account_page.dart b/catalyst_voices/lib/pages/account/account_page.dart index ee1991277e..55f35abc9b 100644 --- a/catalyst_voices/lib/pages/account/account_page.dart +++ b/catalyst_voices/lib/pages/account/account_page.dart @@ -25,13 +25,14 @@ final class AccountPage extends StatelessWidget { const SizedBox(height: 32), _Tab(), const SizedBox(height: 48), - const _KeychainCard( + _KeychainCard( connectedWallet: 'Lace', - roles: [ + roles: const [ 'Voter (Default)', 'Proposer', 'Drep', ], + onRemoveKeychain: () => debugPrint('Keychain removed'), ) ], ), @@ -93,7 +94,7 @@ class _Header extends StatelessWidget { ), const SizedBox(height: 4), Text( - 'Set your base profile, wallet addresses and preferences', + 'Your Catalyst keychain & role registration', style: Theme.of(context).textTheme.titleMedium?.copyWith( color: Colors.white, ), @@ -126,10 +127,12 @@ class _Tab extends StatelessWidget { class _KeychainCard extends StatelessWidget { final String? connectedWallet; final List roles; + final VoidCallback? onRemoveKeychain; const _KeychainCard({ this.connectedWallet, this.roles = const [], + this.onRemoveKeychain, }); @override @@ -161,7 +164,7 @@ class _KeychainCard extends StatelessWidget { VoicesTextButton.customColor( leading: VoicesAssets.icons.x.buildIcon(), color: Theme.of(context).colors.iconsError, - onTap: () {}, + onTap: onRemoveKeychain, child: Text( 'Remove Keychain', ),