flutter-templates icon indicating copy to clipboard operation
flutter-templates copied to clipboard

A repository contains Flutter templates that are used by Nimble developers

trafficstars

Flutter Templates

All the templates can be used to kick off a new Flutter project quickly.

Features

  • Supports Android and iOS platforms (Web and Desktop are not yet supported).
  • Clean Architecture with MVVM and pre-built foundational components.
  • Pre-set environments: Staging and Production. Environment variables are supplied through .env files through flutter_config.
  • Dependency Injection (DI), State Management, and Navigating with get_it, flutter_riverpod, and go_router.
  • Networking with dio and retrofit, JSON serializing with json_serializable.
  • Integrated local secure storage.
  • Localization integrated in 3 initial languages.
  • Testing-ready (unit, integration, and widget testing), production and deployment-ready (to Firebase, Play Store, TestFlight, and AppStore).
  • Built-in GitHub templates & CI/CD workflows integrated with GitHub Actions to perform static code analysis, test, build and deploy app builds to app distribution services or app stores.

Optional (enable by generator command parameters)

Use the template

Prerequisites

Before using the template, ensure that you have installed the following prerequisites on your system:

Set up a new project

Follow these steps to set up a new project from the template:

  1. Use Use this template feature to create your new project repository or clone this template repository to your local machine.

  2. Fetch all required bricks by running the command:

    $ mason get

  3. Generate the new project by running the following command with supported arguments:

    $ mason make template and then provide necessary inputs.

    or

    $ mason make template -c mason-config.json to provide necessary inputs via a JSON file, e.g., mason-config.json for the sample project.

Once the project is generated, please refer to the Getting Started documentation to make it ready for development.

That's it! You have now set up a new Flutter project using the template 🎉

Note

The script generates all project files to the current working folder as default and cleans up all template stuff in the end. Run it with Custom Output Directory to set a custom output folder and keep the template stuff to rerun.

$ mason make template -c mason-config.json -o my_flutter_project

You can find detailed information on make command options and usage in the Mason documentation.

Documentation

Check out the Wiki page to access the complete documentation.

License

This project is Copyright (c) 2014 and onwards. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

Nimble

This project is maintained and funded by Nimble.

We love open source and do our part in sharing our work with the community! See our other projects or hire our team to help build your product.