Skip to content

Commit

Permalink
add keys to passkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
emad-deriv committed Jul 5, 2024
1 parent 4156407 commit ae036f0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class EffortlessPasskeysPage extends StatelessWidget
child: Padding(
padding: const EdgeInsets.all(16),
child: TextButton(
key: const ValueKey<String>(
'passkey_login_maybe_later'),
onPressed: () {
trackMaybeLater();
onPageClosed(context);
Expand Down Expand Up @@ -121,6 +123,8 @@ class EffortlessPasskeysPage extends StatelessWidget
Text(
context.derivPasskeysLocalizations
.effortlessLoginWithPasskeys,
key: const ValueKey<String>(
'passkey_login_effortless_login'),
style: const TextStyle(fontSize: 20),
),
const SizedBox(
Expand All @@ -131,6 +135,8 @@ class EffortlessPasskeysPage extends StatelessWidget
text: context
.derivPasskeysLocalizations
.noNeedToRememberPassword,
textKey: const ValueKey<String>(
'passkey_login_no_need'),
),
Divider(
color: context.theme.colors.hover,
Expand All @@ -140,6 +146,8 @@ class EffortlessPasskeysPage extends StatelessWidget
text: context
.derivPasskeysLocalizations
.syncAcrossDevices,
textKey: const ValueKey<String>(
'passkey_login_sync'),
),
Divider(
color: context.theme.colors.hover,
Expand All @@ -149,6 +157,8 @@ class EffortlessPasskeysPage extends StatelessWidget
text: context
.derivPasskeysLocalizations
.useYourBiometrics,
textKey: const ValueKey<String>(
'passkey_login_biometrics'),
),
Divider(
color: context.theme.colors.hover,
Expand Down Expand Up @@ -202,6 +212,9 @@ class EffortlessPasskeysPage extends StatelessWidget
style: TextStyle(
color: context.theme
.colors.coral),
key: const ValueKey<
String>(
'passkey_login_here_rich_text'),
),
),
),
Expand All @@ -218,6 +231,8 @@ class EffortlessPasskeysPage extends StatelessWidget
child: Padding(
padding: const EdgeInsets.all(16),
child: PrimaryButton(
key: const ValueKey<String>(
'passkey_login_create_button'),
onPressed: () {
trackCreatePasskey();
context.read<DerivPasskeysBloc>().add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class IconTextRowWidget extends StatelessWidget {
const IconTextRowWidget({
required this.assetName,
required this.text,
this.textKey,
});

/// The name of the asset to display.
Expand All @@ -15,6 +16,9 @@ class IconTextRowWidget extends StatelessWidget {
/// The text to display.
final String text;

/// Key for text value
final Key? textKey;

@override
Widget build(BuildContext context) => Row(
children: <Widget>[
Expand All @@ -23,7 +27,7 @@ class IconTextRowWidget extends StatelessWidget {
package: 'deriv_passkeys',
),
const SizedBox(width: 8),
Expanded(child: Text(text)),
Expanded(child: Text(text, key: textKey)),
],
);
}

0 comments on commit ae036f0

Please sign in to comment.