Skip to content

Commit

Permalink
feat: My account, account page, add onRemoveKeychain callback
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalheartxs committed Sep 24, 2024
1 parent 5e7f8f6 commit b3d360f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions catalyst_voices/lib/pages/account/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
)
],
),
Expand Down Expand Up @@ -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,
),
Expand Down Expand Up @@ -126,10 +127,12 @@ class _Tab extends StatelessWidget {
class _KeychainCard extends StatelessWidget {
final String? connectedWallet;
final List<String> roles;
final VoidCallback? onRemoveKeychain;

const _KeychainCard({
this.connectedWallet,
this.roles = const <String>[],
this.onRemoveKeychain,
});

@override
Expand Down Expand Up @@ -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',
),
Expand Down

0 comments on commit b3d360f

Please sign in to comment.