This template provides starting point for Flutter hybrid app, following Klika quality guidelines, with implemented authentication following OAuth2 standard.
- Latest Flutter SDK
- Ruby + overcommit gem
scripts/setup
This script will:
- Setup overcommit hooks
To get basic idea about configuration approach read 12factor.
Configuration is achieved using "flavors" and is stored in lib/config.dart. By default, application is started in production
flavor. To run in development
, start with flutter run -t lib/main-dev.dart
. Platform flavors can be used too (flutter run --flavor dev -t lib/main-dev.dart
). This project defines dev
and prod
platform flavors.
Running development:
flutter run --flavor dev -t lib/main-dev.dart
Running production:
flutter run --flavor prod
Use Klika quality guidelines for general development references.
This project is following official Flutter codestyle, which is also enforced by lint tool. More guidelines are available in official documentation.
Use GitFlow development workflow with tests included.
- no conflicts with target branch
- pass CI tests
- code review approval
Networking is implemented using dio, to provide HTTP client as well as interceptors, combined with json_serializable for generating utilities for transforming classes to and from JSON.
Hive is used for local database.
We are using provider library for dependency injection, as well as state management.
This project will run static code analyser on every commit and full test suite on git push.
This template is using dartanalyzer with pedantic package for static code analysis. All offenses are automatically tracked and prevented on every commit. This feature is handled by Overcommit git hook manager.
We are using flutter_test library with mockito for mocking and http_mock_adapter for mocking HTTP requests.
AppCenter is recommended for CI. Since Flutter is not supported by AppCenter, check out official scripts for more info on setup.