diff --git a/convert_quotes.sh b/convert_quotes.sh new file mode 100755 index 00000000..d6ff2a17 --- /dev/null +++ b/convert_quotes.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +find . -name "*.dart" -type f | while read -r file; do + if [[ "$file" != *".dart_tool"* && "$file" != *"build/"* ]]; then + sed -i.bak 's/"\([^"'\'']*\)"/\x27\1\x27/g' "$file" + + rm "${file}.bak" + + echo "Processed: $file" + fi +done + +echo "Quote conversion completed" \ No newline at end of file diff --git a/lib/app/data/providers/google_cloud_api_provider.dart b/lib/app/data/providers/google_cloud_api_provider.dart index 18b8ea61..d7cc2832 100644 --- a/lib/app/data/providers/google_cloud_api_provider.dart +++ b/lib/app/data/providers/google_cloud_api_provider.dart @@ -124,6 +124,6 @@ class GoogleCloudProvider { homeController.isUserSignedIn.value = false; homeController.userModel.value = null; homeController.Calendars.value = []; - homeController.calendarFetchStatus.value = "Loading"; + homeController.calendarFetchStatus.value = 'Loading'; } } diff --git a/lib/app/data/providers/isar_provider.dart b/lib/app/data/providers/isar_provider.dart index 43bc85e8..2e46f3d5 100644 --- a/lib/app/data/providers/isar_provider.dart +++ b/lib/app/data/providers/isar_provider.dart @@ -27,8 +27,8 @@ enum Status { } enum LogType { - dev("DEV"), - normal("NORMAL"); + dev('DEV'), + normal('NORMAL'); final String value; const LogType(this.value); diff --git a/lib/app/data/providers/push_notifications.dart b/lib/app/data/providers/push_notifications.dart index 60cd2985..ebf449d7 100644 --- a/lib/app/data/providers/push_notifications.dart +++ b/lib/app/data/providers/push_notifications.dart @@ -5,6 +5,6 @@ class PushNotifications { static Future init() async { await _firebaseMessaging.requestPermission(announcement: true); final token = await _firebaseMessaging.getToken(); - print("token - $token"); + print('token - $token'); } } diff --git a/lib/app/modules/addOrUpdateAlarm/controllers/add_or_update_alarm_controller.dart b/lib/app/modules/addOrUpdateAlarm/controllers/add_or_update_alarm_controller.dart index baf81538..eb4fcc18 100644 --- a/lib/app/modules/addOrUpdateAlarm/controllers/add_or_update_alarm_controller.dart +++ b/lib/app/modules/addOrUpdateAlarm/controllers/add_or_update_alarm_controller.dart @@ -669,7 +669,7 @@ class AddOrUpdateAlarmController extends GetxController { profileTextEditingController.text = homeController.isProfileUpdate.value ? homeController.selectedProfile.value - : ""; + : ''; emailTextEditingController.text = ''; if (Get.arguments != null) { @@ -736,7 +736,7 @@ class AddOrUpdateAlarmController extends GetxController { meridiemIndex.value = 0; } } - // Shows the "Rings in" time + // Shows the 'Rings in' time timeToAlarm.value = Utils.timeUntilAlarm( TimeOfDay.fromDateTime(selectedTime.value), repeatDays, diff --git a/lib/app/modules/addOrUpdateAlarm/controllers/input_time_controller.dart b/lib/app/modules/addOrUpdateAlarm/controllers/input_time_controller.dart index aaa14d44..b56628ff 100644 --- a/lib/app/modules/addOrUpdateAlarm/controllers/input_time_controller.dart +++ b/lib/app/modules/addOrUpdateAlarm/controllers/input_time_controller.dart @@ -103,19 +103,19 @@ class InputTimeController extends GetxController { try { newHour = int.parse(rawHourText); } catch (e) { - debugPrint("toggleIfAtBoundary error parsing hour: $e"); + debugPrint('toggleIfAtBoundary error parsing hour: $e'); return; } if (newHour == 0) { newHour = 12; } - debugPrint("toggleIfAtBoundary: previousDisplayHour = $_previousDisplayHour, newHour = $newHour"); + debugPrint('toggleIfAtBoundary: previousDisplayHour = $_previousDisplayHour, newHour = $newHour'); if (_previousDisplayHour != null) { if ((_previousDisplayHour == 11 && newHour == 12) || (_previousDisplayHour == 12 && newHour == 11)) { isAM.value = !isAM.value; - debugPrint("toggleIfAtBoundary: Toggled isAM to ${isAM.value}"); + debugPrint('toggleIfAtBoundary: Toggled isAM to ${isAM.value}'); } } _previousDisplayHour = newHour; diff --git a/lib/app/modules/addOrUpdateAlarm/views/alarm_date_tile.dart b/lib/app/modules/addOrUpdateAlarm/views/alarm_date_tile.dart index bb628ef2..323cd6eb 100644 --- a/lib/app/modules/addOrUpdateAlarm/views/alarm_date_tile.dart +++ b/lib/app/modules/addOrUpdateAlarm/views/alarm_date_tile.dart @@ -30,7 +30,7 @@ class AlarmDateTile extends StatelessWidget { alignment: Alignment.centerLeft, fit: BoxFit.scaleDown, child: Text( - "Ring On", + 'Ring On', style: TextStyle( color: themeController.primaryTextColor.value, ), @@ -43,8 +43,8 @@ class AlarmDateTile extends StatelessWidget { alignment: Alignment.centerRight, child: Text( controller.isFutureDate.value - ? "${controller.selectedDate.value.toString().substring(0, 11)}" - : "Off", + ? '${controller.selectedDate.value.toString().substring(0, 11)}' + : 'Off', style: TextStyle( color: !controller.isFutureDate.value ? themeController.primaryDisabledTextColor.value diff --git a/lib/app/modules/alarmRing/controllers/alarm_ring_controller.dart b/lib/app/modules/alarmRing/controllers/alarm_ring_controller.dart index cee4e80c..b08b0210 100644 --- a/lib/app/modules/alarmRing/controllers/alarm_ring_controller.dart +++ b/lib/app/modules/alarmRing/controllers/alarm_ring_controller.dart @@ -255,7 +255,7 @@ class AlarmControlController extends GetxController { currentlyRingingAlarm.value.isCall ? Utils.dialNumber(currentlyRingingAlarm.value.guardian) : Utils.sendSMS(currentlyRingingAlarm.value.guardian, - "Your Friend is not waking up \n - Ultimate Alarm Clock"); + 'Your Friend is not waking up \n - Ultimate Alarm Clock'); timer.cancel(); } else { guardianCoundown.value = guardianCoundown.value - 1; @@ -368,9 +368,9 @@ class AlarmControlController extends GetxController { 'milliSeconds': intervaltoAlarm, 'activityMonitor': latestAlarm.activityMonitor }); - print("Scheduled..."); + print('Scheduled...'); } on PlatformException catch (e) { - print("Failed to schedule alarm: ${e.message}"); + print('Failed to schedule alarm: ${e.message}'); } } } diff --git a/lib/app/modules/debug/controllers/debug_controller.dart b/lib/app/modules/debug/controllers/debug_controller.dart index d2cc4aa7..e45243ba 100644 --- a/lib/app/modules/debug/controllers/debug_controller.dart +++ b/lib/app/modules/debug/controllers/debug_controller.dart @@ -72,7 +72,7 @@ class DebugController extends GetxController { bool matchesLevel = selectedLogLevel.value == null; if (selectedLogLevel.value != null) { final status = log['Status'].toString().toLowerCase(); - debugPrint('Checking log: "$status" for level: ${selectedLogLevel.value}'); + debugPrint("Checking log: \"$status\" for level: ${selectedLogLevel.value}"); switch (selectedLogLevel.value!) { case LogLevel.error: @@ -104,7 +104,7 @@ class DebugController extends GetxController { if (filteredLogs.isEmpty) { debugPrint('First few log statuses:'); for (var i = 0; i < logs.length && i < 5; i++) { - debugPrint('Log ${i + 1}: "${logs[i]['Status']}"'); + debugPrint("Log ${i + 1}: \"${logs[i]['Status']}\""); } } } diff --git a/lib/app/modules/debug/views/debug_view.dart b/lib/app/modules/debug/views/debug_view.dart index 03ae70e0..bac43302 100644 --- a/lib/app/modules/debug/views/debug_view.dart +++ b/lib/app/modules/debug/views/debug_view.dart @@ -80,7 +80,7 @@ class DebugView extends GetView { hintStyle: TextStyle( color: controller.themeController.primaryTextColor.value.withOpacity(0.5), ), - helperText: 'Search by ID, message, or date (e.g., "1" for LogID 1)'.tr, + helperText: "Search by ID, message, or date (e.g., '1' for LogID 1)".tr, helperStyle: TextStyle( color: controller.themeController.primaryTextColor.value.withOpacity(0.5), fontSize: 12, diff --git a/lib/app/modules/home/controllers/home_controller.dart b/lib/app/modules/home/controllers/home_controller.dart index 449ca94f..b3d7c098 100644 --- a/lib/app/modules/home/controllers/home_controller.dart +++ b/lib/app/modules/home/controllers/home_controller.dart @@ -255,7 +255,7 @@ class HomeController extends GetxController { final checkDefault = await IsarDb.getProfile('Default'); if (checkDefault == null) { IsarDb.addProfile(Utils.genDefaultProfileModel()); - await storage.writeProfile("Default"); + await storage.writeProfile('Default'); profileModel.value = Utils.genDefaultProfileModel(); } readProfileName(); diff --git a/lib/app/modules/notifications/views/notifications_view.dart b/lib/app/modules/notifications/views/notifications_view.dart index 6f58208d..6c46329b 100644 --- a/lib/app/modules/notifications/views/notifications_view.dart +++ b/lib/app/modules/notifications/views/notifications_view.dart @@ -88,7 +88,7 @@ class NotificationsView extends GetView { 20, ), child: Text( - "Select profile to add to"), + 'Select profile to add to'), ), controller.notifications[index]['type'] == 'profile' @@ -179,8 +179,8 @@ class NotificationsView extends GetView { Navigator.of(context).pop(); - Get.snackbar("Notification", - "Shared Item Added"); + Get.snackbar('Notification', + 'Shared Item Added'); }, child: const Text('Add'), ), @@ -197,13 +197,13 @@ class NotificationsView extends GetView { }, ) : const Text( - "No Notifications to see", + 'No Notifications to see', style: TextStyle(color: kprimaryDisabledTextColor), ); ; } return const Text( - "No Notifications to see", + 'No Notifications to see', style: TextStyle(color: kprimaryDisabledTextColor), ); }, diff --git a/lib/app/modules/settings/views/language_menu.dart b/lib/app/modules/settings/views/language_menu.dart index a72dcacf..c9e7306b 100644 --- a/lib/app/modules/settings/views/language_menu.dart +++ b/lib/app/modules/settings/views/language_menu.dart @@ -58,7 +58,7 @@ class _LanguageMenuState extends State { dropdownMenuEntries: widget.controller.optionslocales.entries.map((e) { return DropdownMenuEntry( - value: "${e.key}", + value: '${e.key}', label: "${e.value['description']}", style: ButtonStyle( foregroundColor: MaterialStatePropertyAll( diff --git a/lib/app/modules/splashScreen/controllers/splash_screen_controller.dart b/lib/app/modules/splashScreen/controllers/splash_screen_controller.dart index a9c95c81..3dc3a425 100644 --- a/lib/app/modules/splashScreen/controllers/splash_screen_controller.dart +++ b/lib/app/modules/splashScreen/controllers/splash_screen_controller.dart @@ -103,7 +103,7 @@ class SplashScreenController extends GetxController { alarmChannel.setMethodCallHandler((call) async { if (call.method == 'appStartup') { bool shouldAlarmRing = call.arguments['shouldAlarmRing']; - print("shouldring: $shouldAlarmRing"); + print('shouldring: $shouldAlarmRing'); // This indicates the app was started through native code if (shouldAlarmRing == true) { shouldNavigate = false; @@ -155,9 +155,9 @@ class SplashScreenController extends GetxController { 'milliSeconds': intervaltoAlarm, 'activityMonitor': latestAlarm.activityMonitor }); - print("Scheduled..."); + print('Scheduled...'); } on PlatformException catch (e) { - print("Failed to schedule alarm: ${e.message}"); + print('Failed to schedule alarm: ${e.message}'); } } SystemNavigator.pop(); diff --git a/lib/app/modules/stopwatch/views/stopwatch_view.dart b/lib/app/modules/stopwatch/views/stopwatch_view.dart index 340e4450..a59fc815 100644 --- a/lib/app/modules/stopwatch/views/stopwatch_view.dart +++ b/lib/app/modules/stopwatch/views/stopwatch_view.dart @@ -116,7 +116,7 @@ class StopwatchView extends GetView { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ FloatingActionButton( - heroTag: "flag", + heroTag: 'flag', onPressed: controller.addFlag, child: Icon( Icons.flag, @@ -125,7 +125,7 @@ class StopwatchView extends GetView { ), ), FloatingActionButton( - heroTag: "start", + heroTag: 'start', onPressed: controller.toggleTimer, child: Obx( () => Icon( @@ -138,7 +138,7 @@ class StopwatchView extends GetView { ), // Reset button FloatingActionButton( - heroTag: "stop", + heroTag: 'stop', onPressed: controller.resetTime, child: Icon( Icons.stop_rounded, diff --git a/lib/app/utils/languages/german_translations.dart b/lib/app/utils/languages/german_translations.dart index 22eeff23..fdf1fd8f 100644 --- a/lib/app/utils/languages/german_translations.dart +++ b/lib/app/utils/languages/german_translations.dart @@ -226,7 +226,7 @@ class GermanTranslations extends Translations { 'Shake your phone!': 'Schütteln Sie Ihr Telefon!', //alarm_ring_view.dart "You can't go back while the alarm is ringing": - "Sie können nicht zurückgehen, während der Alarm klingelt", + 'Sie können nicht zurückgehen, während der Alarm klingelt', 'Start Challenge': 'Herausforderung starten', 'Dismiss': 'Abbrechen', 'Exit Preview': 'Vorschau beenden', diff --git a/lib/app/utils/languages/russian_translations.dart b/lib/app/utils/languages/russian_translations.dart index 9e076155..bd593c9f 100644 --- a/lib/app/utils/languages/russian_translations.dart +++ b/lib/app/utils/languages/russian_translations.dart @@ -221,7 +221,7 @@ class RussianTranslations extends Translations { 'Shake your phone!': 'Встряхните свой телефон!', //alarm_ring_view.dart "You can't go back while the alarm is ringing": - "Вы не можете вернуться, пока звонит будильник", + 'Вы не можете вернуться, пока звонит будильник', 'Start Challenge': 'Начать задание', 'Dismiss': 'Отклонить', 'Exit Preview': 'Выйти из предпросмотра', diff --git a/lib/app/utils/languages/spanish_translations.dart b/lib/app/utils/languages/spanish_translations.dart index a295a6b7..08883568 100644 --- a/lib/app/utils/languages/spanish_translations.dart +++ b/lib/app/utils/languages/spanish_translations.dart @@ -229,7 +229,7 @@ class SpanishTranslations extends Translations { 'Shake your phone!': '¡Agita tu teléfono!', //alarm_ring_view.dart "You can't go back while the alarm is ringing": - "No puedes retroceder mientras suena la alarma", + 'No puedes retroceder mientras suena la alarma', 'Start Challenge': 'Comenzar el desafío', 'Dismiss': 'Descartar', 'Exit Preview': 'Salir de la vista previa',