diff --git a/app/lib/blackboard/blackboard_dialog.dart b/app/lib/blackboard/blackboard_dialog.dart index 20a958354..ec756ab50 100644 --- a/app/lib/blackboard/blackboard_dialog.dart +++ b/app/lib/blackboard/blackboard_dialog.dart @@ -339,27 +339,35 @@ class _TitleField extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PrefilledTextField( - prefilledText: initialTitle, - focusNode: focusNode, - cursorColor: Colors.white, - maxLines: null, - style: const TextStyle( - color: Colors.white, - fontSize: 20.0, - fontWeight: FontWeight.w400, + Theme( + data: Theme.of(context).copyWith( + textSelectionTheme: !context.isDarkThemeEnabled + ? const TextSelectionThemeData( + selectionColor: Colors.white24) + : null, ), - decoration: const InputDecoration( - hintText: "Titel eingeben", - hintStyle: TextStyle(color: Colors.white), - border: InputBorder.none, - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - contentPadding: EdgeInsets.zero, - fillColor: Colors.transparent, + child: PrefilledTextField( + prefilledText: initialTitle, + focusNode: focusNode, + cursorColor: Colors.white, + maxLines: null, + style: const TextStyle( + color: Colors.white, + fontSize: 20.0, + fontWeight: FontWeight.w400, + ), + decoration: const InputDecoration( + hintText: "Titel eingeben", + hintStyle: TextStyle(color: Colors.white), + border: InputBorder.none, + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + contentPadding: EdgeInsets.zero, + fillColor: Colors.transparent, + ), + onChanged: (String title) => bloc.changeTitle(title), + textCapitalization: TextCapitalization.sentences, ), - onChanged: (String title) => bloc.changeTitle(title), - textCapitalization: TextCapitalization.sentences, ), Text( snapshot.error?.toString() ?? "", diff --git a/app/lib/homework/homework_dialog/homework_dialog.dart b/app/lib/homework/homework_dialog/homework_dialog.dart index ab9b9582f..6f30c41b9 100644 --- a/app/lib/homework/homework_dialog/homework_dialog.dart +++ b/app/lib/homework/homework_dialog/homework_dialog.dart @@ -957,28 +957,36 @@ class _TitleFieldBase extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PrefilledTextField( - key: HwDialogKeys.titleTextField, - prefilledText: prefilledTitle, - focusNode: focusNode, - cursorColor: Colors.white, - maxLines: null, - style: const TextStyle( - color: Colors.white, - fontSize: 22, - fontWeight: FontWeight.w400, + Theme( + data: Theme.of(context).copyWith( + textSelectionTheme: !context.isDarkThemeEnabled + ? const TextSelectionThemeData( + selectionColor: Colors.white24) + : null, ), - decoration: const InputDecoration( - hintText: "Titel eingeben (z.B. AB Nr. 1 - 3)", - hintStyle: TextStyle(color: Colors.white), - border: InputBorder.none, - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - contentPadding: EdgeInsets.zero, - fillColor: Colors.transparent, + child: PrefilledTextField( + key: HwDialogKeys.titleTextField, + prefilledText: prefilledTitle, + focusNode: focusNode, + cursorColor: Colors.white, + maxLines: null, + style: const TextStyle( + color: Colors.white, + fontSize: 22, + fontWeight: FontWeight.w400, + ), + decoration: const InputDecoration( + hintText: "Titel eingeben (z.B. AB Nr. 1 - 3)", + hintStyle: TextStyle(color: Colors.white), + border: InputBorder.none, + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + contentPadding: EdgeInsets.zero, + fillColor: Colors.transparent, + ), + onChanged: onChanged, + textCapitalization: TextCapitalization.sentences, ), - onChanged: onChanged, - textCapitalization: TextCapitalization.sentences, ), Text( errorText ?? "", diff --git a/app/lib/ical_links/dialog/ical_links_dialog.dart b/app/lib/ical_links/dialog/ical_links_dialog.dart index e9b065aec..95c3177c2 100644 --- a/app/lib/ical_links/dialog/ical_links_dialog.dart +++ b/app/lib/ical_links/dialog/ical_links_dialog.dart @@ -6,6 +6,7 @@ // // SPDX-License-Identifier: EUPL-1.2 +import 'package:build_context/build_context.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:sharezone/ical_links/dialog/ical_links_dialog_controller.dart'; @@ -158,27 +159,35 @@ class _TitleFieldBase extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PrefilledTextField( - prefilledText: prefilledTitle, - focusNode: focusNode, - cursorColor: Colors.white, - maxLines: null, - style: const TextStyle( - color: Colors.white, - fontSize: 22, - fontWeight: FontWeight.w400, + Theme( + data: Theme.of(context).copyWith( + textSelectionTheme: !context.isDarkThemeEnabled + ? const TextSelectionThemeData( + selectionColor: Colors.white24) + : null, ), - decoration: const InputDecoration( - hintText: "Name eingeben (z.B. Meine Prüfungen)", - hintStyle: TextStyle(color: Colors.white), - border: InputBorder.none, - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - contentPadding: EdgeInsets.zero, - fillColor: Colors.transparent, + child: PrefilledTextField( + prefilledText: prefilledTitle, + focusNode: focusNode, + cursorColor: Colors.white, + maxLines: null, + style: const TextStyle( + color: Colors.white, + fontSize: 22, + fontWeight: FontWeight.w400, + ), + decoration: const InputDecoration( + hintText: "Name eingeben (z.B. Meine Prüfungen)", + hintStyle: TextStyle(color: Colors.white), + border: InputBorder.none, + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + contentPadding: EdgeInsets.zero, + fillColor: Colors.transparent, + ), + onChanged: onChanged, + textCapitalization: TextCapitalization.sentences, ), - onChanged: onChanged, - textCapitalization: TextCapitalization.sentences, ), Text( errorText ?? "", diff --git a/app/lib/timetable/timetable_add_event/timetable_add_event_dialog.dart b/app/lib/timetable/timetable_add_event/timetable_add_event_dialog.dart index dd91fd86f..20815211c 100644 --- a/app/lib/timetable/timetable_add_event/timetable_add_event_dialog.dart +++ b/app/lib/timetable/timetable_add_event/timetable_add_event_dialog.dart @@ -310,28 +310,36 @@ class _TitleFieldBase extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PrefilledTextField( - key: HwDialogKeys.titleTextField, - prefilledText: prefilledTitle, - focusNode: focusNode, - cursorColor: Colors.white, - maxLines: null, - style: const TextStyle( - color: Colors.white, - fontSize: 22, - fontWeight: FontWeight.w400, + Theme( + data: Theme.of(context).copyWith( + textSelectionTheme: !context.isDarkThemeEnabled + ? const TextSelectionThemeData( + selectionColor: Colors.white24) + : null, ), - decoration: InputDecoration( - hintText: hintText, - hintStyle: const TextStyle(color: Colors.white), - border: InputBorder.none, - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - contentPadding: EdgeInsets.zero, - fillColor: Colors.transparent, + child: PrefilledTextField( + key: HwDialogKeys.titleTextField, + prefilledText: prefilledTitle, + focusNode: focusNode, + cursorColor: Colors.white, + maxLines: null, + style: const TextStyle( + color: Colors.white, + fontSize: 22, + fontWeight: FontWeight.w400, + ), + decoration: InputDecoration( + hintText: hintText, + hintStyle: const TextStyle(color: Colors.white), + border: InputBorder.none, + enabledBorder: InputBorder.none, + focusedBorder: InputBorder.none, + contentPadding: EdgeInsets.zero, + fillColor: Colors.transparent, + ), + onChanged: onChanged, + textCapitalization: TextCapitalization.sentences, ), - onChanged: onChanged, - textCapitalization: TextCapitalization.sentences, ), Text( errorText ?? "",