Skip to content

naveteam/flutter-boilerplate

Repository files navigation

🚀 Flutter Boilerplate

⭐ Packages already configured

🔥 Starting a new project

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/naveteam/flutter-boilerplate/main/setup.sh)"

🔧 Usage

  1. Install all dependencies
$ flutter pub get
  1. Create .env file at the root with key:value pairs corresponding to .env.example

It's a required step since we use code-generation tool to generate helper classes for environment variables.

  1. Run code-generation tool
$ flutter pub run build_runner build
  1. Start coding 😄

✋ Wait a minute

  1. You can check if there's an update available for all dependencies running flutter pub outdated. You also can update with flutter pub upgrade or flutter pub upgrade --major-versions. Check if it doesn't have any huge breakchange before upgrading with --major-versions argument.

  2. It's possible to modify the application dart package name. You only have to edit the name property at pubspec.yaml, replace all imports with package:flutter_boilerplate to package:[your-package-name] and download all dependencies with flutter pub get again. You must follow the dart guidelines for the package name or it will fail.

  3. If you want to use a State Management Library alternative to ChangeNotifier + Provider, run flutter pub remove provider, install what you need with flutter pub add [package_name] and refactor all view models to match with the library of your choice.

💻 Code Pattern

TBD