From 98128495049cc306df033571ef49634c1caeb108 Mon Sep 17 00:00:00 2001 From: nilsreichardt Date: Mon, 14 Oct 2024 22:19:03 +0200 Subject: [PATCH] Improve layout for dark mode activation code textfield --- .../widgets/enter_activation_code_text_field.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/lib/activation_code/src/widgets/enter_activation_code_text_field.dart b/app/lib/activation_code/src/widgets/enter_activation_code_text_field.dart index 819fcab16..d7cab4ae1 100644 --- a/app/lib/activation_code/src/widgets/enter_activation_code_text_field.dart +++ b/app/lib/activation_code/src/widgets/enter_activation_code_text_field.dart @@ -31,8 +31,10 @@ class EnterActivationCodeTextField extends StatelessWidget child: Theme( data: Theme.of(context).copyWith( primaryColor: Colors.white, - colorScheme: - ColorScheme.fromSwatch().copyWith(secondary: Colors.white), + colorScheme: Theme.of(context).isDarkTheme + ? null + : ColorScheme.fromSwatch() + .copyWith(secondary: Colors.white), ), child: TextField( maxLines: 1, @@ -44,6 +46,14 @@ class EnterActivationCodeTextField extends StatelessWidget onEditingComplete: () => onSend(context, bloc), decoration: InputDecoration( border: const OutlineInputBorder(), + focusedBorder: Theme.of(context) + .inputDecorationTheme + .focusedBorder + ?.copyWith( + borderSide: const BorderSide( + color: Colors.white, + ), + ), labelText: 'Aktivierungscode', hintText: "z.B. NavigationV2", labelStyle: const TextStyle(color: Colors.white),