-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cat-voices): define wallet link flow (#892)
* refactor: move link_wallet_dialog * refactor: align l10n keys * refactor: move link-wallet to another folder * feat: add content * feat: define the rest of stages for wallet link * feat: add missing panels * refactor: rename folder * chore: sort imports * chore: reformat
- Loading branch information
Showing
17 changed files
with
303 additions
and
66 deletions.
There are no files selected for viewing
10 changes: 0 additions & 10 deletions
10
catalyst_voices/lib/pages/registration/link_wallet/select_wallet/select_wallet_panel.dart
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
catalyst_voices/lib/pages/registration/link_wallet/wallet_link_panel.dart
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
catalyst_voices/lib/pages/registration/registration_dialog.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...st_voices/lib/pages/registration/wallet_link/rbac_transaction/rbac_transaction_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:catalyst_voices/widgets/buttons/voices_filled_button.dart'; | ||
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; | ||
import 'package:catalyst_voices_blocs/catalyst_voices_blocs.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// TODO(dtscalac): define content | ||
class RbacTransactionPanel extends StatelessWidget { | ||
const RbacTransactionPanel({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
const Spacer(), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const PreviousStepEvent()); | ||
}, | ||
child: const Text('Previous'), | ||
), | ||
const SizedBox(height: 12), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const NextStepEvent()); | ||
}, | ||
child: const Text('Next'), | ||
), | ||
], | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
catalyst_voices/lib/pages/registration/wallet_link/roles_chooser/roles_chooser_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:catalyst_voices/widgets/buttons/voices_filled_button.dart'; | ||
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; | ||
import 'package:catalyst_voices_blocs/catalyst_voices_blocs.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// TODO(dtscalac): define content | ||
class RolesChooserPanel extends StatelessWidget { | ||
const RolesChooserPanel({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
const Spacer(), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const PreviousStepEvent()); | ||
}, | ||
child: const Text('Previous'), | ||
), | ||
const SizedBox(height: 12), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const NextStepEvent()); | ||
}, | ||
child: const Text('Next'), | ||
), | ||
], | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
catalyst_voices/lib/pages/registration/wallet_link/roles_summary/roles_summary_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:catalyst_voices/widgets/buttons/voices_filled_button.dart'; | ||
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; | ||
import 'package:catalyst_voices_blocs/catalyst_voices_blocs.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// TODO(dtscalac): define content | ||
class RolesSummaryPanel extends StatelessWidget { | ||
const RolesSummaryPanel({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
const Spacer(), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const PreviousStepEvent()); | ||
}, | ||
child: const Text('Previous'), | ||
), | ||
const SizedBox(height: 12), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const NextStepEvent()); | ||
}, | ||
child: const Text('Next'), | ||
), | ||
], | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
catalyst_voices/lib/pages/registration/wallet_link/select_wallet/select_wallet_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:catalyst_voices/widgets/buttons/voices_filled_button.dart'; | ||
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; | ||
import 'package:catalyst_voices_blocs/catalyst_voices_blocs.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// TODO(dtscalac): define content | ||
class SelectWalletPanel extends StatelessWidget { | ||
const SelectWalletPanel({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
const Spacer(), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const PreviousStepEvent()); | ||
}, | ||
child: const Text('Previous'), | ||
), | ||
const SizedBox(height: 12), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const NextStepEvent()); | ||
}, | ||
child: const Text('Next'), | ||
), | ||
], | ||
); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
catalyst_voices/lib/pages/registration/wallet_link/wallet_details/wallet_details_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import 'package:catalyst_voices/widgets/buttons/voices_filled_button.dart'; | ||
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; | ||
import 'package:catalyst_voices_blocs/catalyst_voices_blocs.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// TODO(dtscalac): define content | ||
class WalletDetailsPanel extends StatelessWidget { | ||
const WalletDetailsPanel({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
children: [ | ||
const Spacer(), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const PreviousStepEvent()); | ||
}, | ||
child: const Text('Previous'), | ||
), | ||
const SizedBox(height: 12), | ||
VoicesFilledButton( | ||
leading: VoicesAssets.icons.wallet.buildIcon(), | ||
onTap: () { | ||
RegistrationBloc.of(context).add(const NextStepEvent()); | ||
}, | ||
child: const Text('Next'), | ||
), | ||
], | ||
); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
catalyst_voices/lib/pages/registration/wallet_link/wallet_link_panel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:catalyst_voices/pages/registration/wallet_link/intro/intro_panel.dart'; | ||
import 'package:catalyst_voices/pages/registration/wallet_link/rbac_transaction/rbac_transaction_panel.dart'; | ||
import 'package:catalyst_voices/pages/registration/wallet_link/roles_chooser/roles_chooser_panel.dart'; | ||
import 'package:catalyst_voices/pages/registration/wallet_link/roles_summary/roles_summary_panel.dart'; | ||
import 'package:catalyst_voices/pages/registration/wallet_link/select_wallet/select_wallet_panel.dart'; | ||
import 'package:catalyst_voices/pages/registration/wallet_link/wallet_details/wallet_details_panel.dart'; | ||
import 'package:catalyst_voices_models/catalyst_voices_models.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class WalletLinkPanel extends StatelessWidget { | ||
final WalletLinkStage stage; | ||
|
||
const WalletLinkPanel({ | ||
super.key, | ||
required this.stage, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return switch (stage) { | ||
WalletLinkStage.intro => const IntroPanel(), | ||
WalletLinkStage.selectWallet => const SelectWalletPanel(), | ||
WalletLinkStage.walletDetails => const WalletDetailsPanel(), | ||
WalletLinkStage.rolesChooser => const RolesChooserPanel(), | ||
WalletLinkStage.rolesSummary => const RolesSummaryPanel(), | ||
WalletLinkStage.rbacTransaction => const RbacTransactionPanel(), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.