This is a mobile app project template using Flutter and the latest Flutter/Dart practices.
Visual Studio Code with Flutter are required.
This template largely relies on Flutter, if you want to make sure you got everything installed correctly on your machine, we encourage you to use flutter doctor -v
, the documentation is available here
We use a Dart CLI application to easily create new projects.
-
Install the CLI using this command.
dart pub global activate flutter_application_generator
-
Create a new project using this command.
flutter_application_generator create --destinationDirectory C:\P --projectName MyProjectName --applicationName MyAppName --packageName com.example.myAppName --organizationName MyOrg
💡 The organization parameter is optional (Only used for the Windows platform).
💡 You'll need internet access to create new projects.
The following options are available when running the command.
-
To get help:
flutter_application_generator --help
-
To show version:
flutter_application_generator --version
-
- Open the
README.md
and complete the documentation TODOs. - Open the directory with Visual Studio Code.
Please consult the CHANGELOG for more information about the version history.
This project is licensed under the Apache 2.0 license. See the LICENSE for details.
Please read CONTRIBUTING for details on the process for contributing to this project.
Be mindful of our Code of Conduct.
To debug the app from within the template, run the following commands:
- Go to the Flutter app directory.
cd src/app
- Restore the packages.
flutter pub get
- Run the code generators.
dart run build_runner build --delete-conflicting-outputs
- Build and run the application.
flutter run
To debug the CLI, do the following:
- Go to the CLI directory.
cd src/cli
- Restore the packages.
flutter pub get
- Run the code generators.
dart run build_runner build --delete-conflicting-outputs
- Set the variables value in
src/cli/lib/src/commands/create_command.dart
that would normally be done by the Pipeline_commitHash
_shortCommitHash
_versionNumber
_commitDate
💡 You have to set real values, you should probably use the latest commit information or your own commit from your branch. 💡 If you click here, you have the commit hash in the URL, and the short one is displayed at the top right of the page
commit d339144
. 💡 The date can be any string of any format, it's just displayed, e.g.2025-02-06
. 💡 The version number should be {Major.Minor.Patch}, e.g.2.4.1
. - Move the
README.md
intosrc/cli
folder dart pub global activate --source=path {Full Path}/src/cli
💡 If you already have the CLI installed, you can use the
--overwrite
flag, but don't forget to reinstall it properly when you are done usingdart pub global activate flutter_application_generator --overwrite
.