From f78abd3abac1322091cf3a6572ef0808f056c4e6 Mon Sep 17 00:00:00 2001 From: Caio Pedroso Date: Sun, 24 Dec 2023 13:15:00 -0300 Subject: [PATCH] Theme changes --- lib/lang/ca.dart | 2 +- lib/lang/cs.dart | 2 +- lib/lang/de.dart | 2 +- lib/lang/en.dart | 2 +- lib/lang/es.dart | 2 +- lib/lang/fr.dart | 2 +- lib/lang/id.dart | 2 +- lib/lang/pt.dart | 2 +- lib/lang/ru.dart | 2 +- lib/lang/zh.dart | 2 +- lib/pages/donation/donation_page.dart | 10 +++- lib/pages/home/base/widgets/app_bar.dart | 2 + .../home/base/widgets/bottom_app_bar.dart | 56 +++++++++---------- .../calendar_editor/calendar_editor_page.dart | 21 ++++++- .../video_subtitles_editor_page.dart | 14 ++++- .../widgets/create_movie_options.dart | 4 ++ .../widgets/select_video_from_storage.dart | 34 +++++------ .../widgets/view_movies_page.dart | 18 +++++- .../home/notification/notification_page.dart | 4 ++ lib/pages/home/profiles/profiles_page.dart | 24 +++++++- .../home/settings/widgets/about_button.dart | 35 +++++++++--- .../settings/widgets/preferences_page.dart | 6 +- lib/pages/recording/recording_page.dart | 1 + lib/pages/save_video/save_video_page.dart | 32 +++++++++-- lib/pages/save_video/widgets/tab_item.dart | 5 +- lib/utils/custom_checkbox_list_tile.dart | 4 +- lib/utils/custom_dialog.dart | 25 +++++++-- lib/utils/theme.dart | 21 +++++-- 28 files changed, 246 insertions(+), 90 deletions(-) diff --git a/lib/lang/ca.dart b/lib/lang/ca.dart index 0fe6f47..d6b791a 100644 --- a/lib/lang/ca.dart +++ b/lib/lang/ca.dart @@ -191,7 +191,7 @@ const Map ca = { 'sendLogsDescription': 'Si us trobeu davant d’un problema, premeu «Sí» per incloure els registres que m’ajudaran a trobar el problema. Si voleu suggerir una característica o qualsevol altra cosa, premeu «No».', 'whatsNewDescv152': - 'La versió 1.6.0 porta diverses correccions i millores!\n\nFeu-hi una ullada a les següents pàgines 😊', + 'La versió 1.5.2 porta diverses correccions i millores!\n\nFeu-hi una ullada a les següents pàgines 😊', 'feat1v152': 'Processament de vídeo més ràpid', 'featDesc1v152': 'El procés d’edició de vídeos llargs ara és molt més ràpid 🚀', 'feat2v152': 'Millora en la retallada dels vídeos', diff --git a/lib/lang/cs.dart b/lib/lang/cs.dart index 27874d6..0e5a857 100644 --- a/lib/lang/cs.dart +++ b/lib/lang/cs.dart @@ -188,7 +188,7 @@ const Map cs = { 'sendLogsDescription': 'Pokud se potýkáte s problémem, klepněte prosím na "Ano", abyste zahrnuli záznamy, které mi pomohou problém najít. Pokud jde o návrh funkce nebo jiné téma, klepněte prosím na "Ne".', 'whatsNewDescv152': - 'Verze 1.6.0 přinesla několik oprav a vylepšení!\n\nPodívejte se na následujících stránkách 😊', + 'Verze 1.5.2 přinesla několik oprav a vylepšení!\n\nPodívejte se na následujících stránkách 😊', 'feat1v152': 'Rychlejší zpracování videa', 'featDesc1v152': 'Úprava velkých videí je nyní mnohem rychlejší 🚀', 'feat2v152': 'Vylepšené zastřihávání videa', diff --git a/lib/lang/de.dart b/lib/lang/de.dart index 03c9aa2..1cbd3b0 100644 --- a/lib/lang/de.dart +++ b/lib/lang/de.dart @@ -185,7 +185,7 @@ const Map de = { 'sendLogsDescription': 'Wenn Sie auf ein Problem stoßen, tippen Sie bitte auf "Ja", um die Protokolle einzuschließen, die mir helfen, das Problem zu finden. Wenn es sich um einen Verbesserungsvorschlag oder ein anderes Thema handelt, tippen Sie bitte auf "Nein".', 'whatsNewDescv152': - 'Version 1.6.0 brachte mehrere Korrekturen und Verbesserungen!\n\nSchauen Sie sich die nächsten Seiten an 😊', + 'Version 1.5.2 brachte mehrere Korrekturen und Verbesserungen!\n\nSchauen Sie sich die nächsten Seiten an 😊', 'feat1v152': 'Schnellere Videobearbeitung', 'featDesc1v152': 'Die Bearbeitung großer Videos geht jetzt viel schneller 🚀', 'feat2v152': 'Verbessertes Videoschneiden', diff --git a/lib/lang/en.dart b/lib/lang/en.dart index 2b50cc0..47ed045 100644 --- a/lib/lang/en.dart +++ b/lib/lang/en.dart @@ -189,7 +189,7 @@ const Map en = { 'sendLogsDescription': 'If you are facing an issue, please tap "Yes" to include the logs that will help me find the problem. If it\'s a feature suggestion or other topic, please tap "No".', 'whatsNewDescv152': - 'Version 1.6.0 brought several fixes and improvements!\n\nCheck it out in the next pages 😊', + 'Version 1.5.2 brought several fixes and improvements!\n\nCheck it out in the next pages 😊', 'feat1v152': 'Faster Video Processing', 'featDesc1v152': 'Editing large videos is now much faster 🚀', 'feat2v152': 'Improved Video Trimming', diff --git a/lib/lang/es.dart b/lib/lang/es.dart index e0e896a..6750222 100644 --- a/lib/lang/es.dart +++ b/lib/lang/es.dart @@ -188,7 +188,7 @@ const Map es = { 'sendLogsDescription': 'Si te enfrentas a un problema, por favor toca "Sí" para incluir los registros que me ayudarán a encontrar el problema. Si es una sugerencia de función u otro tema, por favor toca "No".', 'whatsNewDescv152': - '¡La versión 1.6.0 trajo varias correcciones y mejoras!\n\n¡Échale un vistazo en las próximas páginas 😊!', + '¡La versión 1.5.2 trajo varias correcciones y mejoras!\n\n¡Échale un vistazo en las próximas páginas 😊!', 'feat1v152': 'Procesamiento de video más rápido', 'featDesc1v152': 'Editar videos grandes es ahora mucho más rápido 🚀', 'feat2v152': 'Mejora en el recorte de video', diff --git a/lib/lang/fr.dart b/lib/lang/fr.dart index 48cfb69..b51ef88 100644 --- a/lib/lang/fr.dart +++ b/lib/lang/fr.dart @@ -190,7 +190,7 @@ const Map fr = { 'sendLogsDescription': 'Si vous rencontrez un problème, veuillez appuyer sur "Oui" pour inclure les journaux qui m\'aideront à trouver le problème. Si c\'est une suggestion de fonctionnalité ou un autre sujet, veuillez appuyer sur "Non".', 'whatsNewDescv152': - 'La version 1.6.0 a apporté plusieurs corrections et améliorations!\n\nDécouvrez-le dans les pages suivantes 😊', + 'La version 1.5.2 a apporté plusieurs corrections et améliorations!\n\nDécouvrez-le dans les pages suivantes 😊', 'feat1v152': 'Traitement vidéo plus rapide', 'featDesc1v152': 'L\'édition de grandes vidéos est maintenant beaucoup plus rapide 🚀', 'feat2v152': 'Amélioration de la découpe vidéo', diff --git a/lib/lang/id.dart b/lib/lang/id.dart index 7d882ae..7671e58 100644 --- a/lib/lang/id.dart +++ b/lib/lang/id.dart @@ -186,7 +186,7 @@ const Map id = { 'sendLogsDescription': 'Jika Anda menghadapi masalah, silakan tekan "Ya" untuk menyertakan log yang akan membantu saya menemukan masalahnya. Jika ini adalah saran fitur atau topik lain, silakan tekan "Tidak".', 'whatsNewDescv152': - 'Versi 1.6.0 membawa berbagai perbaikan dan peningkatan!\n\nLihat di halaman berikutnya 😊', + 'Versi 1.5.2 membawa berbagai perbaikan dan peningkatan!\n\nLihat di halaman berikutnya 😊', 'feat1v152': 'Pemrosesan Video Lebih Cepat', 'featDesc1v152': 'Mengedit video besar kini jauh lebih cepat 🚀', 'feat2v152': 'Pemotongan Video Ditingkatkan', diff --git a/lib/lang/pt.dart b/lib/lang/pt.dart index 8d1166d..6079818 100644 --- a/lib/lang/pt.dart +++ b/lib/lang/pt.dart @@ -188,7 +188,7 @@ const Map pt = { 'sendLogsDescription': 'Se você está enfrentando um problema, por favor toque em "Sim" para incluir os logs que me ajudarão a encontrar o problema. Se for uma sugestão ou outro tópico, por favor toque em "Não".', 'whatsNewDescv152': - 'A versão 1.6.0 trouxe várias correções e melhorias!\n\nConfira nas próximas páginas 😊', + 'A versão 1.5.2 trouxe várias correções e melhorias!\n\nConfira nas próximas páginas 😊', 'feat1v152': 'Processamento Mais Rápido', 'featDesc1v152': 'Editar vídeos grandes ficou muito mais rápido 🚀', 'feat2v152': 'Melhoria na Edição de Vídeos', diff --git a/lib/lang/ru.dart b/lib/lang/ru.dart index 05b8a13..f825b50 100644 --- a/lib/lang/ru.dart +++ b/lib/lang/ru.dart @@ -187,7 +187,7 @@ const Map ru = { 'sendLogsDescription': 'Если у вас возникла проблема, пожалуйста, нажмите "Да", чтобы включить журналы, которые помогут мне найти проблему. Если это предложение по функционалу или другая тема, пожалуйста, нажмите "Нет".', 'whatsNewDescv152': - 'Версия 1.6.0 принесла несколько исправлений и улучшений!\n\nПосмотрите на следующих страницах 😊', + 'Версия 1.5.2 принесла несколько исправлений и улучшений!\n\nПосмотрите на следующих страницах 😊', 'feat1v152': 'Быстрее обработка видео', 'featDesc1v152': 'Редактирование больших видео теперь намного быстрее 🚀', 'feat2v152': 'Улучшенное обрезание видео', diff --git a/lib/lang/zh.dart b/lib/lang/zh.dart index 0c2904f..26152aa 100644 --- a/lib/lang/zh.dart +++ b/lib/lang/zh.dart @@ -165,7 +165,7 @@ const Map zh = { 'change': '更改', 'sendLogs': '发送日志?', 'sendLogsDescription': '如果您遇到问题,请点击“是”以包含将帮助我找到问题的日志。如果这是一个功能建议或其他话题,请点击“否”。', - 'whatsNewDescv152': '1.6.0版本带来了几个修复和改进!\n\n在接下来的页面中查看 😊', + 'whatsNewDescv152': '1.5.2版本带来了几个修复和改进!\n\n在接下来的页面中查看 😊', 'feat1v152': '更快的视频处理', 'featDesc1v152': '现在编辑大视频更加快速 🚀', 'feat2v152': '改进的视频剪辑', diff --git a/lib/pages/donation/donation_page.dart b/lib/pages/donation/donation_page.dart index fd69b9e..f6ae13c 100644 --- a/lib/pages/donation/donation_page.dart +++ b/lib/pages/donation/donation_page.dart @@ -10,7 +10,15 @@ class DonationPage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('donationPageTitle'.tr), + iconTheme: const IconThemeData( + color: Colors.white, + ), + title: Text( + 'donationPageTitle'.tr, + style: const TextStyle( + color: Colors.white, + ), + ), ), body: Column( children: [ diff --git a/lib/pages/home/base/widgets/app_bar.dart b/lib/pages/home/base/widgets/app_bar.dart index 875205e..367e862 100644 --- a/lib/pages/home/base/widgets/app_bar.dart +++ b/lib/pages/home/base/widgets/app_bar.dart @@ -31,10 +31,12 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { style: TextStyle( fontFamily: 'Magic', fontSize: MediaQuery.of(context).size.width * 0.05, + color: Colors.white, ), ), actions: [ PopupMenuButton( + iconColor: Colors.white, onSelected: popupAction, itemBuilder: (BuildContext context) { return options.map((String option) { diff --git a/lib/pages/home/base/widgets/bottom_app_bar.dart b/lib/pages/home/base/widgets/bottom_app_bar.dart index 13aa7d8..68f31e4 100644 --- a/lib/pages/home/base/widgets/bottom_app_bar.dart +++ b/lib/pages/home/base/widgets/bottom_app_bar.dart @@ -4,6 +4,7 @@ import 'package:salomon_bottom_bar/salomon_bottom_bar.dart'; import '../../../../controllers/bottom_app_bar_index_controller.dart'; import '../../../../utils/constants.dart'; +import '../../../../utils/theme.dart'; SalomonBottomBarItem _bottomBarItem({ required IconData icon, @@ -25,34 +26,33 @@ SalomonBottomBarItem _bottomBarItem({ class CustomBottomAppBar extends GetView { @override Widget build(BuildContext context) { - return BottomAppBar( - child: Obx( - () => SalomonBottomBar( - currentIndex: controller.activeIndex.value, - onTap: controller.setBottomAppBarIndex, - items: [ - _bottomBarItem( - icon: Icons.add_a_photo_outlined, - title: 'record'.tr, - color: AppColors.green, - ), - _bottomBarItem( - icon: Icons.calendar_month_outlined, - title: 'calendar'.tr, - color: AppColors.yellow, - ), - _bottomBarItem( - icon: Icons.movie_filter_outlined, - title: 'movies'.tr, - color: AppColors.mainColor, - ), - _bottomBarItem( - icon: Icons.settings_outlined, - title: 'settings'.tr, - color: AppColors.purple, - ), - ], - ), + return Obx( + () => SalomonBottomBar( + backgroundColor: ThemeService().isDarkTheme() ? AppColors.dark : AppColors.light, + currentIndex: controller.activeIndex.value, + onTap: controller.setBottomAppBarIndex, + items: [ + _bottomBarItem( + icon: Icons.add_a_photo_outlined, + title: 'record'.tr, + color: AppColors.green, + ), + _bottomBarItem( + icon: Icons.calendar_month_outlined, + title: 'calendar'.tr, + color: AppColors.yellow, + ), + _bottomBarItem( + icon: Icons.movie_filter_outlined, + title: 'movies'.tr, + color: AppColors.mainColor, + ), + _bottomBarItem( + icon: Icons.settings_outlined, + title: 'settings'.tr, + color: AppColors.purple, + ), + ], ), ); } diff --git a/lib/pages/home/calendar_editor/calendar_editor_page.dart b/lib/pages/home/calendar_editor/calendar_editor_page.dart index 02a837f..45f30c3 100644 --- a/lib/pages/home/calendar_editor/calendar_editor_page.dart +++ b/lib/pages/home/calendar_editor/calendar_editor_page.dart @@ -166,7 +166,7 @@ class _CalendarEditorPageState extends State { } bool shouldIgnoreExperimentalFilter() { - final useFilter = SharedPrefsUtil.getBool('useFilterInExperimentalPicker') ?? true; + final useFilter = SharedPrefsUtil.getBool('useFilterInExperimentalPicker') ?? false; if (!useFilter) return true; if (_selectedDate.day == DateTime.now().day && _selectedDate.month == DateTime.now().month && @@ -275,7 +275,10 @@ class _CalendarEditorPageState extends State { style: TextButton.styleFrom( foregroundColor: ThemeService().isDarkTheme() ? AppColors.light : AppColors.dark, ), - child: Text('no'.tr), + child: Text( + 'no'.tr, + style: const TextStyle(color: Colors.white), + ), ), TextButton( onPressed: () async { @@ -308,7 +311,10 @@ class _CalendarEditorPageState extends State { style: TextButton.styleFrom( foregroundColor: Colors.red, ), - child: Text('yes'.tr), + child: Text( + 'yes'.tr, + style: const TextStyle(color: Colors.white), + ), ) ], ), @@ -527,6 +533,9 @@ class _CalendarEditorPageState extends State { child: Text( 'deleteVideo'.tr, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + ), ), ), ), @@ -568,6 +577,9 @@ class _CalendarEditorPageState extends State { ? 'addSubtitles'.tr : 'editSubtitles'.tr, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + ), ), ), ), @@ -603,6 +615,9 @@ class _CalendarEditorPageState extends State { child: Text( 'addVideo'.tr, textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.white, + ), ), ), ), diff --git a/lib/pages/home/calendar_editor/video_subtitles_editor_page.dart b/lib/pages/home/calendar_editor/video_subtitles_editor_page.dart index 800b52a..474d944 100644 --- a/lib/pages/home/calendar_editor/video_subtitles_editor_page.dart +++ b/lib/pages/home/calendar_editor/video_subtitles_editor_page.dart @@ -10,6 +10,7 @@ import '../../../utils/constants.dart'; import '../../../utils/ffmpeg_api_wrapper.dart'; import '../../../utils/shared_preferences_util.dart'; import '../../../utils/storage_utils.dart'; +import '../../../utils/theme.dart'; import '../../../utils/utils.dart'; class VideoSubtitlesEditorPage extends StatefulWidget { @@ -67,7 +68,13 @@ class _VideoSubtitlesEditorPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('subtitles'.tr), + iconTheme: const IconThemeData( + color: Colors.white, + ), + title: Text( + 'subtitles'.tr, + style: const TextStyle(color: Colors.white), + ), ), floatingActionButton: FloatingActionButton( backgroundColor: AppColors.green, @@ -201,6 +208,7 @@ class _VideoSubtitlesEditorPageState extends State { controller: subtitlesController, style: TextStyle( fontFamily: DefaultTextStyle.of(context).style.fontFamily, + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, ), maxLines: null, onChanged: (value) => setState(() { @@ -208,6 +216,10 @@ class _VideoSubtitlesEditorPageState extends State { }), decoration: InputDecoration( hintText: 'enterSubtitles'.tr.split('(').first, + fillColor: ThemeService().isDarkTheme() ? Colors.black : Colors.white, + hintStyle: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.black : Colors.white, + ), filled: true, border: const OutlineInputBorder( borderSide: BorderSide(color: AppColors.green), diff --git a/lib/pages/home/create_movie/widgets/create_movie_options.dart b/lib/pages/home/create_movie/widgets/create_movie_options.dart index 2454a68..6380199 100644 --- a/lib/pages/home/create_movie/widgets/create_movie_options.dart +++ b/lib/pages/home/create_movie/widgets/create_movie_options.dart @@ -69,11 +69,15 @@ class _CreateMovieOptionsState extends State { }, child: Scaffold( appBar: AppBar( + iconTheme: const IconThemeData( + color: Colors.white, + ), title: Text( 'createMovie'.tr, style: TextStyle( fontFamily: 'Magic', fontSize: MediaQuery.of(context).size.width * 0.05, + color: Colors.white, ), ), ), diff --git a/lib/pages/home/create_movie/widgets/select_video_from_storage.dart b/lib/pages/home/create_movie/widgets/select_video_from_storage.dart index 33c5749..5684730 100644 --- a/lib/pages/home/create_movie/widgets/select_video_from_storage.dart +++ b/lib/pages/home/create_movie/widgets/select_video_from_storage.dart @@ -42,11 +42,16 @@ class _SelectVideoFromStorageState extends State { @override Widget build(BuildContext context) { // Count all true in isSelected and return quantity - final int totalSelected = - isSelected?.where((element) => element).length ?? 0; + final int totalSelected = isSelected?.where((element) => element).length ?? 0; return Scaffold( appBar: AppBar( - title: Text('selectVideos'.tr), + iconTheme: const IconThemeData( + color: Colors.white, + ), + title: Text( + 'selectVideos'.tr, + style: const TextStyle(color: Colors.white), + ), actions: [ IconButton( icon: Icon(navigationIcon), @@ -110,8 +115,7 @@ class _SelectVideoFromStorageState extends State { cacheExtent: 99999, shrinkWrap: true, controller: scrollController, - gridDelegate: - const SliverGridDelegateWithFixedCrossAxisCount( + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, childAspectRatio: 1.12, ), @@ -121,11 +125,7 @@ class _SelectVideoFromStorageState extends State { children: [ Text( DateFormatUtils.parseDateStringAccordingLocale( - allVideos![index] - .split('/') - .last - .split('.mp4') - .first, + allVideos![index].split('/').last.split('.mp4').first, ), key: globalKeys![index], ), @@ -134,12 +134,9 @@ class _SelectVideoFromStorageState extends State { setState(() { isSelected![index] = !isSelected![index]; }); - if (isSelected![index] && - index != allVideos!.length - 1) { + if (isSelected![index] && index != allVideos!.length - 1) { scrollController.position.ensureVisible( - globalKeys![index + 1] - .currentContext! - .findRenderObject()!, + globalKeys![index + 1].currentContext!.findRenderObject()!, duration: const Duration(milliseconds: 750), ); } @@ -148,9 +145,7 @@ class _SelectVideoFromStorageState extends State { margin: const EdgeInsets.all(15.0), decoration: BoxDecoration( border: Border.all( - color: isSelected![index] - ? AppColors.green - : Colors.white, + color: isSelected![index] ? AppColors.green : Colors.white, width: isSelected![index] ? 4 : 1, ), borderRadius: BorderRadius.circular(5), @@ -158,8 +153,7 @@ class _SelectVideoFromStorageState extends State { child: LazyFutureBuilder( future: () => getThumbnail(allVideos![index]), builder: (context, snapshot) { - if (snapshot.connectionState == - ConnectionState.waiting) { + if (snapshot.connectionState == ConnectionState.waiting) { return const Center( child: SizedBox( height: 30, diff --git a/lib/pages/home/create_movie/widgets/view_movies_page.dart b/lib/pages/home/create_movie/widgets/view_movies_page.dart index 4cef0ad..501bce9 100644 --- a/lib/pages/home/create_movie/widgets/view_movies_page.dart +++ b/lib/pages/home/create_movie/widgets/view_movies_page.dart @@ -34,7 +34,13 @@ class _ViewMoviesState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('myMovies'.tr), + iconTheme: const IconThemeData( + color: Colors.white, + ), + title: Text( + 'myMovies'.tr, + style: const TextStyle(color: Colors.white), + ), ), body: allMovies == null ? const Center( @@ -193,7 +199,10 @@ class _ViewMoviesState extends State { style: TextButton.styleFrom( foregroundColor: ThemeService().isDarkTheme() ? AppColors.light : AppColors.dark, ), - child: Text('no'.tr), + child: Text( + 'no'.tr, + style: const TextStyle(color: Colors.white), + ), ), TextButton( onPressed: () async { @@ -218,7 +227,10 @@ class _ViewMoviesState extends State { style: TextButton.styleFrom( foregroundColor: Colors.red, ), - child: Text('yes'.tr), + child: Text( + 'yes'.tr, + style: const TextStyle(color: Colors.white), + ), ) ], ), diff --git a/lib/pages/home/notification/notification_page.dart b/lib/pages/home/notification/notification_page.dart index 8027661..f5029db 100644 --- a/lib/pages/home/notification/notification_page.dart +++ b/lib/pages/home/notification/notification_page.dart @@ -10,11 +10,15 @@ class NotificationPage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + iconTheme: const IconThemeData( + color: Colors.white, + ), title: Text( 'notifications'.tr, style: TextStyle( fontFamily: 'Magic', fontSize: MediaQuery.of(context).size.width * 0.05, + color: Colors.white, ), ), ), diff --git a/lib/pages/home/profiles/profiles_page.dart b/lib/pages/home/profiles/profiles_page.dart index 40fac24..c2f4fb9 100644 --- a/lib/pages/home/profiles/profiles_page.dart +++ b/lib/pages/home/profiles/profiles_page.dart @@ -115,6 +115,9 @@ class _ProfilesPageState extends State { }, decoration: InputDecoration( hintText: 'enterProfileName'.tr, + hintStyle: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), errorStyle: const TextStyle( color: AppColors.mainColor, ), @@ -205,7 +208,12 @@ class _ProfilesPageState extends State { style: TextButton.styleFrom( foregroundColor: ThemeService().isDarkTheme() ? AppColors.light : AppColors.dark, ), - child: Text('no'.tr), + child: Text( + 'no'.tr, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), ), TextButton( onPressed: () async { @@ -242,7 +250,12 @@ class _ProfilesPageState extends State { style: TextButton.styleFrom( foregroundColor: Colors.red, ), - child: Text('yes'.tr), + child: Text( + 'yes'.tr, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), ) ], ), @@ -253,11 +266,15 @@ class _ProfilesPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + iconTheme: const IconThemeData( + color: Colors.white, + ), title: Text( 'profiles'.tr, style: TextStyle( fontFamily: 'Magic', fontSize: MediaQuery.of(context).size.width * 0.05, + color: Colors.white, ), ), ), @@ -305,6 +322,9 @@ class _ProfilesPageState extends State { ), title: Text( profiles[index].isDefault ? 'default'.tr : profiles[index].label, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), ), secondary: profiles[index].isDefault ? null diff --git a/lib/pages/home/settings/widgets/about_button.dart b/lib/pages/home/settings/widgets/about_button.dart index dc9b725..7d672e1 100644 --- a/lib/pages/home/settings/widgets/about_button.dart +++ b/lib/pages/home/settings/widgets/about_button.dart @@ -3,23 +3,32 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../../utils/constants.dart'; +import '../../../../utils/theme.dart'; class AboutButton extends StatelessWidget { const AboutButton({Key? key}) : super(key: key); void showAbout(BuildContext context) { showAboutPage( - title: Text('about'.tr), + title: Text( + 'about'.tr, + style: const TextStyle(color: Colors.white), + ), context: context, applicationVersion: 'appVersion'.tr, - applicationLegalese: 'Copyright © Caio Pedroso, 2023', + applicationLegalese: 'Copyright © Caio Pedroso, 2024', children: [ - const MarkdownPageListTile( - icon: Icon( + MarkdownPageListTile( + icon: const Icon( Icons.history, color: AppColors.green, ), - title: Text('Changelog'), + title: Text( + 'Changelog', + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), filename: 'CHANGELOG.md', ), MarkdownPageListTile( @@ -27,10 +36,22 @@ class AboutButton extends StatelessWidget { Icons.favorite, color: AppColors.mainColor, ), - title: Text('thanksTo'.tr), + title: Text( + 'thanksTo'.tr, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), filename: 'CONTRIBUTORS.md', ), - LicensesPageListTile(title: Text('licenses'.tr)), + LicensesPageListTile( + title: Text( + 'licenses'.tr, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), + ), ], applicationIcon: const SizedBox( width: 100, diff --git a/lib/pages/home/settings/widgets/preferences_page.dart b/lib/pages/home/settings/widgets/preferences_page.dart index c93d115..cfb052a 100644 --- a/lib/pages/home/settings/widgets/preferences_page.dart +++ b/lib/pages/home/settings/widgets/preferences_page.dart @@ -22,7 +22,7 @@ class _PreferencesPageState extends State { super.initState(); isCameraSwitchToggled = SharedPrefsUtil.getBool('forceNativeCamera') ?? false; isPickerSwitchToggled = SharedPrefsUtil.getBool('useExperimentalPicker') ?? true; - isPickerFilterSwitchToggled = SharedPrefsUtil.getBool('useFilterInExperimentalPicker') ?? true; + isPickerFilterSwitchToggled = SharedPrefsUtil.getBool('useFilterInExperimentalPicker') ?? false; isColorsSwitchToggled = SharedPrefsUtil.getBool('useAlternativeCalendarColors') ?? false; } @@ -30,11 +30,15 @@ class _PreferencesPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( + iconTheme: const IconThemeData( + color: Colors.white, + ), title: Text( 'preferences'.tr, style: TextStyle( fontFamily: 'Magic', fontSize: MediaQuery.of(context).size.width * 0.05, + color: Colors.white, ), ), ), diff --git a/lib/pages/recording/recording_page.dart b/lib/pages/recording/recording_page.dart index 6aaae05..cad6bd1 100644 --- a/lib/pages/recording/recording_page.dart +++ b/lib/pages/recording/recording_page.dart @@ -465,6 +465,7 @@ class _RecordingPageState extends State @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: AppColors.dark, body: Stack( children: [ NativeDeviceOrientedWidget( diff --git a/lib/pages/save_video/save_video_page.dart b/lib/pages/save_video/save_video_page.dart index f51685f..64e697b 100644 --- a/lib/pages/save_video/save_video_page.dart +++ b/lib/pages/save_video/save_video_page.dart @@ -497,7 +497,13 @@ class _SaveVideoPageState extends State { }, child: Scaffold( appBar: AppBar( - title: Text('saveVideo'.tr), + iconTheme: const IconThemeData( + color: Colors.white, + ), + title: Text( + 'saveVideo'.tr, + style: const TextStyle(color: Colors.white), + ), ), floatingActionButton: Visibility( visible: !_isLocationProcessing, @@ -803,12 +809,17 @@ class _SaveVideoPageState extends State { controller: subtitlesTextController, style: TextStyle( fontFamily: DefaultTextStyle.of(context).style.fontFamily, + color: Colors.white, ), maxLines: 6, readOnly: true, onTap: () async => await showSubtitlesDialog(), decoration: InputDecoration( + fillColor: AppColors.dark, hintText: 'enterSubtitles'.tr, + hintStyle: const TextStyle( + color: Colors.white, + ), filled: true, enabledBorder: OutlineInputBorder( borderSide: BorderSide(color: isDarkTheme ? Colors.white : Colors.black), @@ -837,8 +848,11 @@ class _SaveVideoPageState extends State { height: 42, child: TabBar( labelPadding: const EdgeInsets.all(10), - indicator: const UnderlineTabIndicator( - borderSide: BorderSide(color: AppColors.mainColor, width: 2), // Indicator height + indicator: UnderlineTabIndicator( + borderSide: BorderSide( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + width: 4, + ), // Indicator height // insets: EdgeInsets.only(left: 60, right: 40), // Indicator width ), isScrollable: true, @@ -883,6 +897,7 @@ class _SaveVideoPageState extends State { Future showSubtitlesDialog() async { await showDialog( context: context, + useSafeArea: false, builder: (context) => AlertDialog( title: Padding( padding: const EdgeInsets.symmetric(horizontal: 5.0), @@ -923,12 +938,14 @@ class _SaveVideoPageState extends State { autofocus: true, controller: subtitlesTextController, textCapitalization: TextCapitalization.sentences, - maxLines: 12, + maxLines: 10, style: TextStyle( fontFamily: DefaultTextStyle.of(context).style.fontFamily, + color: Colors.white, ), decoration: InputDecoration( filled: true, + fillColor: AppColors.dark, enabledBorder: OutlineInputBorder( borderSide: BorderSide(color: isDarkTheme ? Colors.white : Colors.black), ), @@ -965,9 +982,16 @@ class _SaveVideoPageState extends State { autofocus: true, controller: customLocationTextController, textCapitalization: TextCapitalization.sentences, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.black : Colors.white, + ), decoration: InputDecoration( hintText: 'enterLocation'.tr, + hintStyle: const TextStyle( + color: Colors.white, + ), filled: true, + fillColor: AppColors.dark, border: const OutlineInputBorder( borderSide: BorderSide(color: AppColors.green), ), diff --git a/lib/pages/save_video/widgets/tab_item.dart b/lib/pages/save_video/widgets/tab_item.dart index 6ce55b9..7dab1ee 100644 --- a/lib/pages/save_video/widgets/tab_item.dart +++ b/lib/pages/save_video/widgets/tab_item.dart @@ -26,7 +26,10 @@ class TabItem extends StatelessWidget { color: color, ), child: Center( - child: Text(id), + child: Text( + id, + style: const TextStyle(color: Colors.white), + ), ), ), const SizedBox(width: 6), diff --git a/lib/utils/custom_checkbox_list_tile.dart b/lib/utils/custom_checkbox_list_tile.dart index 277ca92..768eb01 100644 --- a/lib/utils/custom_checkbox_list_tile.dart +++ b/lib/utils/custom_checkbox_list_tile.dart @@ -42,7 +42,9 @@ class CustomCheckboxListTile extends StatelessWidget { child: Transform.scale( scale: checkboxSize ?? 1.4, child: Checkbox( - activeColor: AppColors.green, + checkColor: Colors.white, + fillColor: + MaterialStatePropertyAll(isChecked == true ? AppColors.green : Colors.white), value: isChecked, onChanged: onChanged, ), diff --git a/lib/utils/custom_dialog.dart b/lib/utils/custom_dialog.dart index 0dec933..46db047 100644 --- a/lib/utils/custom_dialog.dart +++ b/lib/utils/custom_dialog.dart @@ -8,6 +8,7 @@ import 'package:path_provider/path_provider.dart'; import 'constants.dart'; import 'storage_utils.dart'; +import 'theme.dart'; import 'utils.dart'; class CustomDialog extends StatefulWidget { @@ -95,12 +96,18 @@ class _CustomDialogState extends State { if (widget.isContact) ...{ ElevatedButton( style: ElevatedButton.styleFrom(backgroundColor: AppColors.green), - child: Text('yes'.tr), + child: Text( + 'yes'.tr, + style: const TextStyle(color: Colors.white), + ), onPressed: () => zipAndSendLogs(), ), ElevatedButton( style: ElevatedButton.styleFrom(backgroundColor: Colors.red), - child: Text('no'.tr), + child: Text( + 'no'.tr, + style: const TextStyle(color: Colors.white), + ), onPressed: () => Utils.launchURL(Constants.email), ), } else if (widget.sendLogs) ...{ @@ -120,13 +127,23 @@ class _CustomDialogState extends State { } else ...{ ElevatedButton( style: ElevatedButton.styleFrom(backgroundColor: widget.actionColor), - child: Text(widget.actionText!), + child: Text( + widget.actionText!, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), onPressed: widget.action, ), if (widget.isDoubleAction == true) ElevatedButton( style: ElevatedButton.styleFrom(backgroundColor: widget.action2Color), - child: Text(widget.action2Text!), + child: Text( + widget.action2Text!, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), onPressed: widget.action2, ) else diff --git a/lib/utils/theme.dart b/lib/utils/theme.dart index 9ddc816..0e629fd 100644 --- a/lib/utils/theme.dart +++ b/lib/utils/theme.dart @@ -6,7 +6,10 @@ import 'shared_preferences_util.dart'; class Themes { static final light = ThemeData.light().copyWith( - appBarTheme: const AppBarTheme(backgroundColor: AppColors.mainColor), + appBarTheme: const AppBarTheme( + backgroundColor: AppColors.mainColor, + iconTheme: IconThemeData(color: Colors.white), + ), textTheme: ThemeData.light().textTheme.apply(fontFamily: 'Magic'), primaryColor: AppColors.mainColor, colorScheme: ColorScheme.fromSwatch().copyWith( @@ -30,10 +33,17 @@ class Themes { selectionColor: AppColors.green, selectionHandleColor: AppColors.green, ), + switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.all(AppColors.mainColor), + trackColor: MaterialStateProperty.all(AppColors.rose), + ), ); static final dark = ThemeData.dark().copyWith( - appBarTheme: const AppBarTheme(backgroundColor: AppColors.dark), + appBarTheme: const AppBarTheme( + backgroundColor: AppColors.mainColor, + iconTheme: IconThemeData(color: Colors.white), + ), textTheme: ThemeData.dark().textTheme.apply( fontFamily: 'Magic', ), @@ -56,6 +66,10 @@ class Themes { selectionColor: AppColors.green, selectionHandleColor: AppColors.green, ), + switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.all(AppColors.mainColor), + trackColor: MaterialStateProperty.all(AppColors.dark.withOpacity(0.5)), + ), ); } @@ -67,8 +81,7 @@ class ThemeService { // Dark Mode is true by default bool isDarkTheme() => SharedPrefsUtil.getBool(_key) ?? true; - Future _saveTheme(bool isDarkMode) => - SharedPrefsUtil.putBool(_key, isDarkMode); + Future _saveTheme(bool isDarkMode) => SharedPrefsUtil.putBool(_key, isDarkMode); void switchTheme() { Get.changeThemeMode(isDarkTheme() ? ThemeMode.light : ThemeMode.dark);