Skip to content

nventive/FlutterApplicationTemplate

Repository files navigation

Flutter Application Template

License

This is a mobile app project template using Flutter and the latest Flutter/Dart practices.

Requirements

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

Getting Started

We use a Dart CLI application to easily create new projects.

Generate a new project

  1. Install the CLI using this command.

    dart pub global activate flutter_application_generator

  2. 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

Next Steps

  1. Open the README.md and complete the documentation TODOs.
  2. Open the directory with Visual Studio Code.

Changelog

Please consult the CHANGELOG for more information about the version history.

License

This project is licensed under the Apache 2.0 license. See the LICENSE for details.

Contributing

Please read CONTRIBUTING for details on the process for contributing to this project.

Be mindful of our Code of Conduct.

Application Template

To debug the app from within the template, run the following commands:

  1. Go to the Flutter app directory.
    cd src/app
  2. Restore the packages.
    flutter pub get
  3. Run the code generators.
    dart run build_runner build --delete-conflicting-outputs
  4. Build and run the application.
    flutter run

Command Line Interface

To debug the CLI, do the following:

  1. Go to the CLI directory.
    cd src/cli
  2. Restore the packages.
    flutter pub get
  3. Run the code generators.
    dart run build_runner build --delete-conflicting-outputs
  4. 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.

  5. Move the README.md into src/cli folder
  6. 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 using dart pub global activate flutter_application_generator --overwrite.

About

A Flutter application template with built-in recipes.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published