Skip to content

Standardize String Quotes for Consistency #825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions convert_quotes.sh
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion lib/app/data/providers/google_cloud_api_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
4 changes: 2 additions & 2 deletions lib/app/data/providers/isar_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ enum Status {
}

enum LogType {
dev("DEV"),
normal("NORMAL");
dev('DEV'),
normal('NORMAL');

final String value;
const LogType(this.value);
Expand Down
2 changes: 1 addition & 1 deletion lib/app/data/providers/push_notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ class AddOrUpdateAlarmController extends GetxController {

profileTextEditingController.text = homeController.isProfileUpdate.value
? homeController.selectedProfile.value
: "";
: '';
emailTextEditingController.text = '';

if (Get.arguments != null) {
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions lib/app/modules/addOrUpdateAlarm/views/alarm_date_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}');
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/app/modules/debug/controllers/debug_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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']}\"");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/debug/views/debug_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class DebugView extends GetView<DebugController> {
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,
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/home/controllers/home_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions lib/app/modules/notifications/views/notifications_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class NotificationsView extends GetView<NotificationsController> {
20,
),
child: Text(
"Select profile to add to"),
'Select profile to add to'),
),
controller.notifications[index]['type'] ==
'profile'
Expand Down Expand Up @@ -179,8 +179,8 @@ class NotificationsView extends GetView<NotificationsController> {


Navigator.of(context).pop();
Get.snackbar("Notification",
"Shared Item Added");
Get.snackbar('Notification',
'Shared Item Added');
},
child: const Text('Add'),
),
Expand All @@ -197,13 +197,13 @@ class NotificationsView extends GetView<NotificationsController> {
},
)
: 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),
);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/app/modules/settings/views/language_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class _LanguageMenuState extends State<LanguageMenu> {
dropdownMenuEntries:
widget.controller.optionslocales.entries.map((e) {
return DropdownMenuEntry(
value: "${e.key}",
value: '${e.key}',
label: "${e.value['description']}",
style: ButtonStyle(
foregroundColor: MaterialStatePropertyAll(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions lib/app/modules/stopwatch/views/stopwatch_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class StopwatchView extends GetView<StopwatchController> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
FloatingActionButton(
heroTag: "flag",
heroTag: 'flag',
onPressed: controller.addFlag,
child: Icon(
Icons.flag,
Expand All @@ -125,7 +125,7 @@ class StopwatchView extends GetView<StopwatchController> {
),
),
FloatingActionButton(
heroTag: "start",
heroTag: 'start',
onPressed: controller.toggleTimer,
child: Obx(
() => Icon(
Expand All @@ -138,7 +138,7 @@ class StopwatchView extends GetView<StopwatchController> {
),
// Reset button
FloatingActionButton(
heroTag: "stop",
heroTag: 'stop',
onPressed: controller.resetTime,
child: Icon(
Icons.stop_rounded,
Expand Down
2 changes: 1 addition & 1 deletion lib/app/utils/languages/german_translations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion lib/app/utils/languages/russian_translations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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': 'Выйти из предпросмотра',
Expand Down
2 changes: 1 addition & 1 deletion lib/app/utils/languages/spanish_translations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down