diff --git a/catalyst_voices/lib/pages/registration/link_wallet/intro/link_wallet_intro_dialog.dart b/catalyst_voices/lib/pages/registration/link_wallet/intro/link_wallet_intro_dialog.dart index a9f1149d75..066cc83863 100644 --- a/catalyst_voices/lib/pages/registration/link_wallet/intro/link_wallet_intro_dialog.dart +++ b/catalyst_voices/lib/pages/registration/link_wallet/intro/link_wallet_intro_dialog.dart @@ -1,5 +1,4 @@ import 'package:catalyst_voices/pages/account/creation/task_picture.dart'; -import 'package:catalyst_voices/widgets/buttons/specialized/voices_learn_more_button.dart'; import 'package:catalyst_voices/widgets/widgets.dart'; import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; diff --git a/catalyst_voices/lib/pages/registration/link_wallet/link_wallet_dialog.dart b/catalyst_voices/lib/pages/registration/link_wallet/link_wallet_dialog.dart index 0fe4456657..edfd4312ec 100644 --- a/catalyst_voices/lib/pages/registration/link_wallet/link_wallet_dialog.dart +++ b/catalyst_voices/lib/pages/registration/link_wallet/link_wallet_dialog.dart @@ -8,14 +8,14 @@ import 'package:flutter/material.dart'; /// The link wallet flow consisting /// of [LinkWalletStage]'s during the registration. class LinkWalletDialog extends StatefulWidget { - const LinkWalletDialog({super.key}); + const LinkWalletDialog._(); /// Shows the [LinkWalletDialog] flow. static Future show({required BuildContext context}) { return VoicesDialog.show( context: context, routeSettings: const RouteSettings(name: '/register/link-wallet'), - builder: (context) => const LinkWalletDialog(), + builder: (context) => const LinkWalletDialog._(), ); } diff --git a/catalyst_voices/lib/widgets/buttons/specialized/voices_learn_more_button.dart b/catalyst_voices/lib/widgets/buttons/specialized/voices_learn_more_button.dart deleted file mode 100644 index 93386dc013..0000000000 --- a/catalyst_voices/lib/widgets/buttons/specialized/voices_learn_more_button.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:catalyst_voices/widgets/widgets.dart'; -import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; -import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; -import 'package:flutter/material.dart'; - -/// A "Learn More" button that redirects usually to an external content. -class VoicesLearnMoreButton extends StatelessWidget { - final VoidCallback onTap; - - const VoicesLearnMoreButton({ - super.key, - required this.onTap, - }); - - @override - Widget build(BuildContext context) { - return VoicesTextButton( - trailing: VoicesAssets.icons.externalLink.buildIcon(), - onTap: onTap, - child: Text(context.l10n.learnMore), - ); - } -} diff --git a/catalyst_voices/lib/widgets/buttons/voices_buttons.dart b/catalyst_voices/lib/widgets/buttons/voices_buttons.dart index 1d9cba19a1..a12419eb16 100644 --- a/catalyst_voices/lib/widgets/buttons/voices_buttons.dart +++ b/catalyst_voices/lib/widgets/buttons/voices_buttons.dart @@ -1,7 +1,9 @@ import 'dart:async'; import 'package:catalyst_voices/widgets/buttons/voices_icon_button.dart'; +import 'package:catalyst_voices/widgets/buttons/voices_text_button.dart'; import 'package:catalyst_voices_assets/catalyst_voices_assets.dart'; +import 'package:catalyst_voices_localization/catalyst_voices_localization.dart'; import 'package:flutter/material.dart'; class DrawerToggleButton extends StatelessWidget { @@ -146,3 +148,22 @@ class MoreOptionsButton extends StatelessWidget { ); } } + +/// A "Learn More" button that redirects usually to an external content. +class VoicesLearnMoreButton extends StatelessWidget { + final VoidCallback onTap; + + const VoicesLearnMoreButton({ + super.key, + required this.onTap, + }); + + @override + Widget build(BuildContext context) { + return VoicesTextButton( + trailing: VoicesAssets.icons.externalLink.buildIcon(), + onTap: onTap, + child: Text(context.l10n.learnMore), + ); + } +}