- Flutter 3.24.41
- Testing Device: Either a physical device or an emulator. Ensure that you test your changes on at least one of these platforms: Windows or Android.
- (Optional) Flutter Plugin for your IDE, with dart format and import sorting enabled.
- (Optional) Android Studio to verify if the Android build works correctly.
1 If updating Flutter, ensure compatibility with the specified version. If the version is incompatible, please contact me to update the build process.
-
Dependency Policy:
- Adding dependencies with proprietary licenses is not allowed.
- All dependencies must be open-source with a permissive license allowing usage in this project.
- Dependencies must be compatible across all platforms (Android, Windows, Linux, web, iOS, macOS) or must not crash unsupported platforms.
-
Build Runner(!):
- Do not run
dart run build_runner build --delete-conflicting-outputswithout specifying the--build-filter="./lib/xxx/**"flag. Doing so may overwrite custom code critical to the old API being replaced.
- Do not run
-
Build Commands by Directory:
For changes in thelib/models/directory:dart run build_runner build --build-filter="./lib/models/**" --delete-conflicting-outputsFor changes in the
lib/api/directory:dart run build_runner build --build-filter="./lib/api/**" --delete-conflicting-outputs
- Clone the repository.
- Install dependencies:
flutter pub get
- Start the application:
flutter run
- Happy coding!
If build errors occur related to files in the lib/api/ or lib/models/ directories, try the following steps:
flutter clean
flutter pub get
dart run build_runner build --build-filter="./lib/api/**" --delete-conflicting-outputs
dart run build_runner build --build-filter="./lib/models/**" --delete-conflicting-outputsBefore submitting a pull request, alphabetically sort the keys in the en.json (or any edited .json files). You can use the following commands to do this:
-
Install
arb_utilsglobally:dart pub global activate arb_utils
-
Generate metadata and sort keys:
arb_utils generate-meta .\lib\l10n\intl_en.arb arb_utils sort .\lib\l10n\intl_en.arb