Skip to content

dayron9110/flutter_clean_architecture

 
 

Repository files navigation

clean_architecture_template

Usage

TODO:

  • How to rename this template ?

Setup and Tooling

Get flutter and dart

git clone https://github.com/flutter/flutter.git
  1. Add export PATH="$PATH:pwd/flutter/bin" to ~/.bash_profile or ~/.bashrc
  2. Verify which flutter
  3. Install Xcode and Android Studio. Run flutter doctor for installation diagnostics.

This project currently run on version : Flutter 1.12.13 hotfix.8 • channel stable and Dart 2.7.0

Development

Setup githooks by doing

 git config core.hooksPath .githooks

This will ensure that for instance tests are run before pushing etc...

This project uses code generation for generating entities and some bloc state and events. So whenever making changes to those files be sure to run:

flutter packages pub run build_runner watch

VSCode Configuration

Start with the intial guide

Setup a keyboard shortcut for running unit tests, by assigning a keybinding to command dart.runAllTestsWithoutDebugging.

We recommend some extension for development in particular:

- Flutter Widget snippets (Alexis Villegas Torres)
- bloc (Felix Angelov)
- Dart Built Value Snippets (YongZhen Low)

Dependencies

For precise versions of each dependencies head over to pubspec.yml

  • Equatable (Since Dart ony supports reference equality out of the box.)
  • Freezed Enable value type semantics, value equality, json serialization, sealed classes.
  • Bloc Reactive state management.
  • Dartz Some functional programmintg utilities and types (purify your Dart)).
  • GetIt Dependency Injection

Testing

Coding/Naming Conventions

Coding conventions are mostly handled by dartfmt but file names by convention are named with snake_case.

Customization of linting errors is done through analysis_options.yaml file. The lint package is used as a starting point set of defaults.

About

Base project for serious flutter apps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 95.7%
  • Kotlin 2.1%
  • Swift 2.0%
  • Objective-C 0.2%