From 261a0c1f145641ddd0e4bb87ea9477c25305bd02 Mon Sep 17 00:00:00 2001 From: Elias Bonnici Date: Thu, 14 Dec 2023 13:16:34 +0100 Subject: [PATCH] Use `AppTextField` instead of `TextField`. --- lib/otp/views/configure_chalresp_dialog.dart | 3 ++- lib/otp/views/configure_hotp_dialog.dart | 3 ++- lib/otp/views/configure_static_dialog.dart | 3 ++- lib/otp/views/configure_yubiotp_dialog.dart | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/otp/views/configure_chalresp_dialog.dart b/lib/otp/views/configure_chalresp_dialog.dart index ac593b15..aac9325b 100644 --- a/lib/otp/views/configure_chalresp_dialog.dart +++ b/lib/otp/views/configure_chalresp_dialog.dart @@ -27,6 +27,7 @@ import '../../app/models.dart'; import '../../app/state.dart'; import '../../core/models.dart'; import '../../core/state.dart'; +import '../../widgets/app_text_field.dart'; import '../../widgets/responsive_dialog.dart'; import '../keys.dart' as keys; import '../models.dart'; @@ -122,7 +123,7 @@ class _ConfigureChalrespDialogState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - TextField( + AppTextField( key: keys.secretField, autofocus: true, controller: _secretController, diff --git a/lib/otp/views/configure_hotp_dialog.dart b/lib/otp/views/configure_hotp_dialog.dart index dcf34c33..feca8a7a 100644 --- a/lib/otp/views/configure_hotp_dialog.dart +++ b/lib/otp/views/configure_hotp_dialog.dart @@ -26,6 +26,7 @@ import '../../app/state.dart'; import '../../core/models.dart'; import '../../core/state.dart'; import '../../oath/models.dart'; +import '../../widgets/app_text_field.dart'; import '../../widgets/choice_filter_chip.dart'; import '../../widgets/responsive_dialog.dart'; import '../keys.dart' as keys; @@ -120,7 +121,7 @@ class _ConfigureHotpDialogState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - TextField( + AppTextField( key: keys.secretField, controller: _secretController, obscureText: _isObscure, diff --git a/lib/otp/views/configure_static_dialog.dart b/lib/otp/views/configure_static_dialog.dart index 6315e49b..15f69a56 100644 --- a/lib/otp/views/configure_static_dialog.dart +++ b/lib/otp/views/configure_static_dialog.dart @@ -24,6 +24,7 @@ import '../../app/message.dart'; import '../../app/models.dart'; import '../../app/state.dart'; import '../../core/state.dart'; +import '../../widgets/app_text_field.dart'; import '../../widgets/choice_filter_chip.dart'; import '../../widgets/responsive_dialog.dart'; import '../keys.dart' as keys; @@ -142,7 +143,7 @@ class _ConfigureStaticDialogState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - TextField( + AppTextField( key: keys.secretField, autofocus: true, controller: _passwordController, diff --git a/lib/otp/views/configure_yubiotp_dialog.dart b/lib/otp/views/configure_yubiotp_dialog.dart index 6eb66989..c5969fd6 100644 --- a/lib/otp/views/configure_yubiotp_dialog.dart +++ b/lib/otp/views/configure_yubiotp_dialog.dart @@ -29,6 +29,7 @@ import '../../app/models.dart'; import '../../app/state.dart'; import '../../core/models.dart'; import '../../core/state.dart'; +import '../../widgets/app_text_field.dart'; import '../../widgets/choice_filter_chip.dart'; import '../../widgets/responsive_dialog.dart'; import '../keys.dart' as keys; @@ -198,7 +199,7 @@ class _ConfigureYubiOtpDialogState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - TextField( + AppTextField( key: keys.publicIdField, autofocus: true, controller: _publicIdController, @@ -246,7 +247,7 @@ class _ConfigureYubiOtpDialogState }); }, ), - TextField( + AppTextField( key: keys.privateIdField, controller: _privateIdController, autofillHints: isAndroid ? [] : const [AutofillHints.password], @@ -294,7 +295,7 @@ class _ConfigureYubiOtpDialogState }); }, ), - TextField( + AppTextField( key: keys.secretField, controller: _secretController, autofillHints: isAndroid ? [] : const [AutofillHints.password],