From a23e533ba5e7019323a5c9da8561b2fca8b00b32 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Thu, 21 Dec 2023 14:28:24 +0100 Subject: [PATCH] Fix hide/show icon color. --- lib/fido/views/locked_page.dart | 3 +-- lib/oath/views/unlock_form.dart | 5 +---- lib/otp/views/configure_hotp_dialog.dart | 5 +---- lib/piv/views/pin_dialog.dart | 3 +-- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/fido/views/locked_page.dart b/lib/fido/views/locked_page.dart index 33369fb2..276ab5b4 100755 --- a/lib/fido/views/locked_page.dart +++ b/lib/fido/views/locked_page.dart @@ -178,8 +178,7 @@ class _PinEntryFormState extends ConsumerState<_PinEntryForm> { prefixIcon: const Icon(Icons.pin_outlined), suffixIcon: IconButton( icon: Icon( - _isObscure ? Icons.visibility : Icons.visibility_off, - color: !_pinIsWrong ? IconTheme.of(context).color : null), + _isObscure ? Icons.visibility : Icons.visibility_off), onPressed: () { setState(() { _isObscure = !_isObscure; diff --git a/lib/oath/views/unlock_form.dart b/lib/oath/views/unlock_form.dart index 531e2f23..b1671f32 100755 --- a/lib/oath/views/unlock_form.dart +++ b/lib/oath/views/unlock_form.dart @@ -88,10 +88,7 @@ class _UnlockFormState extends ConsumerState { prefixIcon: const Icon(Icons.password_outlined), suffixIcon: IconButton( icon: Icon( - _isObscure ? Icons.visibility : Icons.visibility_off, - color: !_passwordIsWrong - ? IconTheme.of(context).color - : null), + _isObscure ? Icons.visibility : Icons.visibility_off), onPressed: () { setState(() { _isObscure = !_isObscure; diff --git a/lib/otp/views/configure_hotp_dialog.dart b/lib/otp/views/configure_hotp_dialog.dart index 4ef1c3b5..74f45057 100644 --- a/lib/otp/views/configure_hotp_dialog.dart +++ b/lib/otp/views/configure_hotp_dialog.dart @@ -140,10 +140,7 @@ class _ConfigureHotpDialogState extends ConsumerState { prefixIcon: const Icon(Icons.key_outlined), suffixIcon: IconButton( icon: Icon( - _isObscure ? Icons.visibility : Icons.visibility_off, - color: !_validateSecret - ? IconTheme.of(context).color - : null), + _isObscure ? Icons.visibility : Icons.visibility_off), onPressed: () { setState(() { _isObscure = !_isObscure; diff --git a/lib/piv/views/pin_dialog.dart b/lib/piv/views/pin_dialog.dart index 0181121c..a01ec9d7 100644 --- a/lib/piv/views/pin_dialog.dart +++ b/lib/piv/views/pin_dialog.dart @@ -104,8 +104,7 @@ class _PinDialogState extends ConsumerState { prefixIcon: const Icon(Icons.pin_outlined), suffixIcon: IconButton( icon: Icon( - _isObscure ? Icons.visibility : Icons.visibility_off, - color: !_pinIsWrong ? IconTheme.of(context).color : null), + _isObscure ? Icons.visibility : Icons.visibility_off), onPressed: () { setState(() { _isObscure = !_isObscure;