Code Style¶
Coding conventions and style guide.
Language¶
All code, comments, documentation, and user-facing strings use American English.
File Headers¶
Each Dart file has a // ===... block comment explaining purpose, usage, and design rationale.
Formatting¶
- Use
dart format(enforced byflutter analyze). - Line length: default Dart (80 characters).
- Follow Effective Dart guidelines.
Naming¶
- Files:
snake_case.dart - Classes:
PascalCase - Variables/functions:
camelCase - Constants:
camelCase(Dart convention) - Private members:
_prefixed
Localization¶
- All user-facing strings go in
lib/l10n/app_en.arb(English) andapp_de.arb(German). - Use
l10n.keyNamein widgets. - Run
flutter gen-l10nto regenerate (automatic on build).
Settings¶
- All
SharedPreferenceskeys are centralized inPrefKeys(core/constants/app_constants.dart). - New settings: add a
PrefKeysconstant + provider insettings_providers.dart+ UI insettings_screen.dart.
No Hardcoded Values¶
Model parameters, API URLs, and thresholds come from config files or constants — never inline.