diff --git a/lib/lang/en.dart b/lib/lang/en.dart index 7edb2c1..69a9f1c 100644 --- a/lib/lang/en.dart +++ b/lib/lang/en.dart @@ -212,8 +212,9 @@ const Map en = { 'useAlternativeCalendarColors': 'Use alternative calendar colors', 'useAlternativeCalendarColorsDescription': 'Changes green and red in calendar to blue and yellow. Useful for colorblind people.', - 'mixedResolutionAlert' : 'Mixed Resolutions detected', - 'mixedResolutionAlertDescription' : 'At least one snippet seems to have a different resolution.\n\n' - 'This can cause unexpected results when using your film.\n\n' - 'Try to delete theses files or move them to a different profile.' + 'mixedResolutionAlert': 'Mixed Resolutions detected', + 'mixedResolutionAlertDescription': + 'At least one snippet seems to have a different resolution.\n\n' + 'This can cause unexpected results when using your film.\n\n' + 'Try to delete theses files or move them to a different profile.' }; diff --git a/lib/lang/fr.dart b/lib/lang/fr.dart index 02a3641..c7f0058 100644 --- a/lib/lang/fr.dart +++ b/lib/lang/fr.dart @@ -214,8 +214,8 @@ const Map fr = { 'useAlternativeCalendarColors': 'Utilisez des couleurs de calendrier alternatives', 'useAlternativeCalendarColorsDescription': 'Change le vert et le rouge dans le calendrier en bleu et jaune. Utile pour les personnes daltoniennes.', - 'mixedResolutionAlert' : 'Mix de résolutions détecté.', - 'mixedResolutionAlertDescription' : 'Au moins une vidéo semble avoir un mix de résolutions.\n\n' - 'Cela peut produire des résultats innatendus lorsque vous utilisez votre film.\n\n' - 'Essayez de supprimer ces fichiers ou de les déplacer dans un autre profil.' + 'mixedResolutionAlert': 'Mix de résolutions détecté.', + 'mixedResolutionAlertDescription': 'Au moins une vidéo semble avoir un mix de résolutions.\n\n' + 'Cela peut produire des résultats innatendus lorsque vous utilisez votre film.\n\n' + 'Essayez de supprimer ces fichiers ou de les déplacer dans un autre profil.' }; diff --git a/lib/pages/home/base/home_page.dart b/lib/pages/home/base/home_page.dart index 5d2a558..b43fc91 100644 --- a/lib/pages/home/base/home_page.dart +++ b/lib/pages/home/base/home_page.dart @@ -19,9 +19,7 @@ class HomePage extends GetView { body: SizedBox( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, - child: Center( - child: Obx(() => _getSelectedPage(controller.activeIndex.value)), - ), + child: Obx(() => _getSelectedPage(controller.activeIndex.value)), ), ); } diff --git a/lib/pages/home/base/widgets/bottom_app_bar.dart b/lib/pages/home/base/widgets/bottom_app_bar.dart index 68f31e4..91d4039 100644 --- a/lib/pages/home/base/widgets/bottom_app_bar.dart +++ b/lib/pages/home/base/widgets/bottom_app_bar.dart @@ -4,7 +4,6 @@ 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, @@ -28,7 +27,7 @@ class CustomBottomAppBar extends GetView { Widget build(BuildContext context) { return Obx( () => SalomonBottomBar( - backgroundColor: ThemeService().isDarkTheme() ? AppColors.dark : AppColors.light, + backgroundColor: Colors.black12.withOpacity(0.05), currentIndex: controller.activeIndex.value, onTap: controller.setBottomAppBarIndex, items: [ diff --git a/lib/pages/home/calendar_editor/calendar_editor_page.dart b/lib/pages/home/calendar_editor/calendar_editor_page.dart index 1cf7d87..e27ccf1 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') ?? false; + final useFilter = SharedPrefsUtil.getBool('useFilterInExperimentalPicker') ?? true; if (!useFilter) return true; if (_selectedDate.day == DateTime.now().day && _selectedDate.month == DateTime.now().month && @@ -435,7 +435,7 @@ class _CalendarEditorPageState extends State { Padding( padding: const EdgeInsets.symmetric(horizontal: 20.0), child: AspectRatio( - aspectRatio: 16/9, + aspectRatio: 16 / 9, child: Stack( children: [ Center( @@ -466,13 +466,11 @@ class _CalendarEditorPageState extends State { WidgetsBinding.instance.addPostFrameCallback((_) { _controller?.dispose(); }); - Get.offAllNamed(Routes.HOME) - ?.then((_) => setState(() {})); + Get.offAllNamed(Routes.HOME)?.then((_) => setState(() {})); } // VideoPlayer - if (_controller != null && - _controller!.value.isInitialized) { + if (_controller != null && _controller!.value.isInitialized) { return Align( alignment: Alignment.center, child: Stack( 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 9c3e5b2..ee6cfc6 100644 --- a/lib/pages/home/calendar_editor/video_subtitles_editor_page.dart +++ b/lib/pages/home/calendar_editor/video_subtitles_editor_page.dart @@ -172,9 +172,7 @@ class _VideoSubtitlesEditorPageState extends State { onTap: () => videoPlay(), // ConstrainedBox to fit vertical videos without overflowing child: ConstrainedBox( - constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height * 0.7 - ), + constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.7), child: AspectRatio( aspectRatio: _videoController.value.aspectRatio, child: Stack( @@ -224,7 +222,7 @@ class _VideoSubtitlesEditorPageState extends State { hintText: 'enterSubtitles'.tr.split('(').first, fillColor: ThemeService().isDarkTheme() ? Colors.black : Colors.white, hintStyle: TextStyle( - color: ThemeService().isDarkTheme() ? Colors.black : Colors.white, + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, ), filled: true, border: const OutlineInputBorder( 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 5684730..6509309 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 @@ -43,6 +43,7 @@ class _SelectVideoFromStorageState extends State { Widget build(BuildContext context) { // Count all true in isSelected and return quantity final int totalSelected = isSelected?.where((element) => element).length ?? 0; + final aspectRatio = allVideos?.first.contains('_vertical') == true ? 0.5 : 1.0; return Scaffold( appBar: AppBar( iconTheme: const IconThemeData( @@ -115,9 +116,9 @@ class _SelectVideoFromStorageState extends State { cacheExtent: 99999, shrinkWrap: true, controller: scrollController, - gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, - childAspectRatio: 1.12, + childAspectRatio: aspectRatio, ), itemCount: allVideos!.length, itemBuilder: (context, index) { 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 501bce9..51343cb 100644 --- a/lib/pages/home/create_movie/widgets/view_movies_page.dart +++ b/lib/pages/home/create_movie/widgets/view_movies_page.dart @@ -102,6 +102,7 @@ class _ViewMoviesState extends State { alignment: Alignment.center, child: Image.memory( snapshot.data![index] as Uint8List, + height: MediaQuery.sizeOf(context).height * 0.27, ), ), Align( diff --git a/lib/pages/home/notification/widgets/switch_notifications.dart b/lib/pages/home/notification/widgets/switch_notifications.dart index 2d3be4e..e8f499c 100644 --- a/lib/pages/home/notification/widgets/switch_notifications.dart +++ b/lib/pages/home/notification/widgets/switch_notifications.dart @@ -8,12 +8,10 @@ import '../../../../utils/theme.dart'; class SwitchNotificationsComponent extends StatefulWidget { @override - _SwitchNotificationsComponentState createState() => - _SwitchNotificationsComponentState(); + _SwitchNotificationsComponentState createState() => _SwitchNotificationsComponentState(); } -class _SwitchNotificationsComponentState - extends State { +class _SwitchNotificationsComponentState extends State { late bool isNotificationSwitchToggled; TimeOfDay scheduledTimeOfDay = const TimeOfDay(hour: 20, minute: 00); late bool isPersistentSwitchToggled; @@ -58,10 +56,7 @@ class _SwitchNotificationsComponentState await notificationService.turnOnNotifications(); await notificationService.scheduleNotification( - scheduledTimeOfDay.hour, - scheduledTimeOfDay.minute, - DateTime.now() - ); + scheduledTimeOfDay.hour, scheduledTimeOfDay.minute, DateTime.now()); } else { await notificationService.turnOffNotifications(); } @@ -139,22 +134,17 @@ class _SwitchNotificationsComponentState }); } - notificationService.setScheduledTime(newTimeOfDay.hour, - newTimeOfDay.minute); + notificationService.setScheduledTime(newTimeOfDay.hour, newTimeOfDay.minute); setState(() { scheduledTimeOfDay = newTimeOfDay; }); await notificationService.scheduleNotification( - scheduledTimeOfDay.hour, - scheduledTimeOfDay.minute, - DateTime.now() - ); + scheduledTimeOfDay.hour, scheduledTimeOfDay.minute, DateTime.now()); }, child: Container( - padding: - const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), + padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -196,19 +186,16 @@ class _SwitchNotificationsComponentState } /// Schedule notification if switch in ON - if(isNotificationSwitchToggled && !isNotificationSwitchToggled){ + if (isNotificationSwitchToggled && !isNotificationSwitchToggled) { await notificationService.turnOnNotifications(); setState(() { isNotificationSwitchToggled = true; }); } - if(isNotificationSwitchToggled){ + if (isNotificationSwitchToggled) { await notificationService.scheduleNotification( - scheduledTimeOfDay.hour, - scheduledTimeOfDay.minute, - DateTime.now() - ); + scheduledTimeOfDay.hour, scheduledTimeOfDay.minute, DateTime.now()); } /// Update switch value @@ -222,7 +209,6 @@ class _SwitchNotificationsComponentState ], ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/profiles/profiles_page.dart b/lib/pages/home/profiles/profiles_page.dart index 509e93c..b7a402d 100644 --- a/lib/pages/home/profiles/profiles_page.dart +++ b/lib/pages/home/profiles/profiles_page.dart @@ -56,15 +56,18 @@ class _ProfilesPageState extends State { if (!storedProfiles.contains('Default')) { profiles.insert( 0, - const Profile(label: 'Default', storageString: 'Default', isDefault: true, isVertical: false), + const Profile( + label: 'Default', storageString: 'Default', isDefault: true, isVertical: false), ); } else { // Profiles strings ending with '_vertical' creates an Profile object with isVertical value true, as other not. profiles = storedProfiles.map( (e) { - if (e == 'Default') return Profile(label: e, storageString: e, isDefault: true, isVertical: false); + if (e == 'Default') + return Profile(label: e, storageString: e, isDefault: true, isVertical: false); if (e.endsWith('_vertical')) - return Profile(label: e.replaceAll('_vertical', ''), storageString: e, isVertical: true); + return Profile( + label: e.replaceAll('_vertical', ''), storageString: e, isVertical: true); else return Profile(label: e, storageString: e, isVertical: false); }, @@ -206,7 +209,8 @@ class _ProfilesPageState extends State { profiles.length, Profile( label: _profileNameController.text.trim(), - storageString: _verticalModeSwitch? '${_profileNameController.text.trim()}_vertical' + storageString: _verticalModeSwitch + ? '${_profileNameController.text.trim()}_vertical' : _profileNameController.text.trim(), isVertical: _verticalModeSwitch), ); @@ -215,8 +219,7 @@ class _ProfilesPageState extends State { // Add the modified profile list to persistence // Adds the string '_vertical' at the end of vertical profiles to keep this parameter persistent. - final profileNamesToStringList = profiles - .map((e) => e.storageString).toList(); + final profileNamesToStringList = profiles.map((e) => e.storageString).toList(); SharedPrefsUtil.putStringList('profiles', profileNamesToStringList); @@ -371,18 +374,25 @@ class _ProfilesPageState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), ), - title: Text( - profiles[index].isDefault ? 'default'.tr : profiles[index].label, - style: TextStyle( - color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, - ), + title: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + profiles[index].isDefault ? 'default'.tr : profiles[index].label, + style: TextStyle( + color: ThemeService().isDarkTheme() ? Colors.white : Colors.black, + ), + ), + const SizedBox( + width: 5.0, + ), + RotatedBox( + quarterTurns: profiles[index].isVertical ? 0 : -1, + child: const Icon(Icons.phone_android), + ), + ], ), secondary: Row(mainAxisSize: MainAxisSize.min, children: [ - Icon( - profiles[index].isVertical - ? Icons.stay_current_portrait - : Icons.stay_current_landscape, - ), if (!profiles[index].isDefault) IconButton( onPressed: () async { diff --git a/lib/pages/home/settings/widgets/backup_tutorial.dart b/lib/pages/home/settings/widgets/backup_tutorial.dart index d4c8916..22009f3 100644 --- a/lib/pages/home/settings/widgets/backup_tutorial.dart +++ b/lib/pages/home/settings/widgets/backup_tutorial.dart @@ -31,7 +31,6 @@ class BackupTutorial extends StatelessWidget { ), ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/contact_button.dart b/lib/pages/home/settings/widgets/contact_button.dart index c07de6c..4bb40a5 100644 --- a/lib/pages/home/settings/widgets/contact_button.dart +++ b/lib/pages/home/settings/widgets/contact_button.dart @@ -40,7 +40,6 @@ class ContactButton extends StatelessWidget { ), ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/github_button.dart b/lib/pages/home/settings/widgets/github_button.dart index f05d11e..f7820d8 100644 --- a/lib/pages/home/settings/widgets/github_button.dart +++ b/lib/pages/home/settings/widgets/github_button.dart @@ -31,7 +31,6 @@ class GithubButton extends StatelessWidget { ), ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/language_chooser.dart b/lib/pages/home/settings/widgets/language_chooser.dart index d499e0e..c902a79 100644 --- a/lib/pages/home/settings/widgets/language_chooser.dart +++ b/lib/pages/home/settings/widgets/language_chooser.dart @@ -58,7 +58,6 @@ class _LanguageChooserState extends State { ], ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/notifications_button.dart b/lib/pages/home/settings/widgets/notifications_button.dart index fda32fb..36b81e9 100644 --- a/lib/pages/home/settings/widgets/notifications_button.dart +++ b/lib/pages/home/settings/widgets/notifications_button.dart @@ -13,8 +13,7 @@ class NotificationsButton extends StatelessWidget { InkWell( onTap: () => Get.toNamed(Routes.NOTIFICATION), child: Ink( - padding: - const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), + padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -29,7 +28,6 @@ class NotificationsButton extends StatelessWidget { ), ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/preferences_button.dart b/lib/pages/home/settings/widgets/preferences_button.dart index 9676c82..cebe3f2 100644 --- a/lib/pages/home/settings/widgets/preferences_button.dart +++ b/lib/pages/home/settings/widgets/preferences_button.dart @@ -22,8 +22,7 @@ class _PreferencesButtonState extends State { InkWell( onTap: () => Get.toNamed(Routes.PREFERENCES), child: Ink( - padding: const EdgeInsets.symmetric( - horizontal: 15.0, vertical: 10.0), + padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -38,7 +37,6 @@ class _PreferencesButtonState extends State { ), ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/preferences_page.dart b/lib/pages/home/settings/widgets/preferences_page.dart index cfb052a..a32080c 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') ?? false; + isPickerFilterSwitchToggled = SharedPrefsUtil.getBool('useFilterInExperimentalPicker') ?? true; isColorsSwitchToggled = SharedPrefsUtil.getBool('useAlternativeCalendarColors') ?? false; } diff --git a/lib/pages/home/settings/widgets/profiles_button.dart b/lib/pages/home/settings/widgets/profiles_button.dart index e6700eb..0164686 100644 --- a/lib/pages/home/settings/widgets/profiles_button.dart +++ b/lib/pages/home/settings/widgets/profiles_button.dart @@ -13,8 +13,7 @@ class ProfilesButton extends StatelessWidget { InkWell( onTap: () => Get.toNamed(Routes.PROFILES), child: Ink( - padding: - const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), + padding: const EdgeInsets.symmetric(horizontal: 15.0, vertical: 10.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -29,7 +28,6 @@ class ProfilesButton extends StatelessWidget { ), ), ), - const Divider(), ], ); } diff --git a/lib/pages/home/settings/widgets/switch_theme.dart b/lib/pages/home/settings/widgets/switch_theme.dart index 8834fc6..f47d068 100644 --- a/lib/pages/home/settings/widgets/switch_theme.dart +++ b/lib/pages/home/settings/widgets/switch_theme.dart @@ -43,7 +43,6 @@ class _SwitchThemeComponentState extends State { ), ], ), - const Divider(), ], ); } diff --git a/lib/pages/save_video/save_video_page.dart b/lib/pages/save_video/save_video_page.dart index 96edbc3..2c36757 100644 --- a/lib/pages/save_video/save_video_page.dart +++ b/lib/pages/save_video/save_video_page.dart @@ -604,20 +604,22 @@ class _SaveVideoPageState extends State { const SizedBox(width: 8), Flexible( child: Text( - selectedProfile.label.isEmpty ? 'default'.tr : - selectedProfile.isVertical ? selectedProfile.label.replaceAll('_vertical', '') - : selectedProfile.label, + selectedProfile.label.isEmpty + ? 'default'.tr + : selectedProfile.isVertical + ? selectedProfile.label.replaceAll('_vertical', '') + : selectedProfile.label, style: TextStyle( fontSize: MediaQuery.of(context).size.height * 0.019, ), ), ), - const SizedBox(width: 20), - Icon( - selectedProfile.isVertical? Icons.stay_current_portrait : - Icons.stay_current_landscape + const SizedBox(width: 5), + RotatedBox( + quarterTurns: selectedProfile.isVertical ? 0 : -1, + child: const Icon(Icons.phone_android), ), - const SizedBox(width: 20), + const SizedBox(width: 15), Flexible( child: TextButton( style: ButtonStyle( @@ -991,8 +993,8 @@ class _SaveVideoPageState extends State { autofocus: true, controller: customLocationTextController, textCapitalization: TextCapitalization.sentences, - style: TextStyle( - color: ThemeService().isDarkTheme() ? Colors.black : Colors.white, + style: const TextStyle( + color: Colors.white, ), decoration: InputDecoration( hintText: 'enterLocation'.tr, diff --git a/lib/utils/theme.dart b/lib/utils/theme.dart index 0e629fd..a77c772 100644 --- a/lib/utils/theme.dart +++ b/lib/utils/theme.dart @@ -36,6 +36,7 @@ class Themes { switchTheme: SwitchThemeData( thumbColor: MaterialStateProperty.all(AppColors.mainColor), trackColor: MaterialStateProperty.all(AppColors.rose), + trackOutlineColor: MaterialStateProperty.all(AppColors.mainColor), ), );