- Fork and clone the repository
- Run
flutter pub getto install dependencies - Run
dart run build_runner buildto generate code - Start developing!
- Follow Dart/Flutter conventions
- Run
dart format .to format your code (note: generated files like*.g.dartare excluded from CI checks) - Run
flutter analyzebefore submitting to check for issues - Run
flutter testif tests are available - Test your changes thoroughly
The project includes automated CI checks that run on all pull requests:
-
Code Formatting: Ensures code follows Dart formatting standards
- Run locally:
dart format .to format all files - Note: CI only checks non-generated files (excludes
.g.dart,.freezed.dart) - Generated files are reformatted automatically by build tools
- Run locally:
-
Static Analysis: Checks for code issues and potential bugs
- Run locally:
flutter analyze - Note: CI excludes generated files from analysis (configured in
analysis_options.yaml)
- Run locally:
-
Tests: Runs unit and widget tests (when available)
- Run locally:
flutter test
- Run locally:
All these checks must pass before your changes can be merged.
This project uses slang for internationalization with JSON files.
-
Add your string to
lib/i18n/strings.i18n.json:{ "section": { "myNewString": "My new text" } } -
Run
dart run slangto regenerate translation files -
Use in your code:
Text(t.section.myNewString)
- Create new JSON file:
lib/i18n/[locale].i18n.json - Copy structure from
en.i18n.jsonand translate values - Run
dart run slangto regenerate files
- Organize strings logically in nested objects
- Use camelCase for keys
- Keep strings concise and clear
- Always run
dart run slangafter changes