Giter Club home page Giter Club logo

klikaba / flutter-template Goto Github PK

View Code? Open in Web Editor NEW
2.0 5.0 2.0 121 KB

This is showcase application that presents how we, at Klika, are building robust and production-ready applications. Showcase includes different patterns and best practices that we are using in our company including : architectural patterns, configuration handling, error handling, automated testing, crash reporting, and so on.

Kotlin 1.16% Swift 0.64% Objective-C 0.06% Dart 95.83% Shell 0.17% Ruby 2.14%

flutter-template's Introduction

Flutter Template

This template provides starting point for Flutter hybrid app, following Klika quality guidelines, with implemented authentication following OAuth2 standard.

Setup

Dependencies

  • Latest Flutter SDK
  • Ruby + overcommit gem
scripts/setup

This script will:

  • Setup overcommit hooks

Configuration

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

Getting started

Use Klika quality guidelines for general development references.

Flutter/Dart styleguides

This project is following official Flutter codestyle, which is also enforced by lint tool. More guidelines are available in official documentation.

New feature

Use GitFlow development workflow with tests included.

Pull request quality gates

  • no conflicts with target branch
  • pass CI tests
  • code review approval

Tools

Networking with Dio

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.

Local DB with Hive

Hive is used for local database.

Dependency injection and state management with Provider

We are using provider library for dependency injection, as well as state management.

Quality gates

This project will run static code analyser on every commit and full test suite on git push.

Static code analyser

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.

Testing

We are using flutter_test library with mockito for mocking and http_mock_adapter for mocking HTTP requests.

Continuous Integration

AppCenter is recommended for CI. Since Flutter is not supported by AppCenter, check out official scripts for more info on setup.

Maintainers

flutter-template's People

Contributors

esensar avatar zpasal avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.