ultimate_alarm_clock icon indicating copy to clipboard operation
ultimate_alarm_clock copied to clipboard

Standardize String Quotes for Consistency

Open mahendra-918 opened this issue 9 months ago • 0 comments

Description

This PR standardizes string quotes across the codebase by converting double quotes to single quotes whenever possible, as per Flutter/Dart convention. According to the convention, double quotes should only be used when the string contains a single quote to avoid unnecessary escaping.

Proposed Changes

  1. Created and executed a script that converts double quotes to single quotes across all Dart files
  2. Fixed special cases where direct conversion would cause syntax errors (in debug module)
  3. Maintained double quotes for strings containing apostrophes or single quotes
  4. Verified that the app compiles correctly after changes

Implementation Details

The conversion was done using a shell script that:

  • Finds all Dart files in the project
  • Uses regex to replace double quotes with single quotes only when appropriate
  • Preserves double quotes when a string contains single quotes
  • Special cases in debug controllers and views were fixed manually

Fixes #691

Screenshots

Checklist

  • [x] Tests have been added or updated to cover the changes
  • [x] Documentation has been updated to reflect the changes
  • [x] Code follows the established coding style guidelines
  • [x] All tests are passing

mahendra-918 avatar Apr 17 '25 20:04 mahendra-918