Giter VIP home page Giter VIP logo

flutter-sample's Introduction

Cíngulo Flutter Sample

Working with Flutter 1.12.13+hotfix.5

Status develop
Travis CI Build Status
Coveralls Coverage Status

Check out a short demo video here.
Check out some screenshots here.

A fully working sample Flutter app implementation. Give this repo a Star if you like it :)

  • Layers separation (data, domain, logic, ui)
  • Network calls and very simple caching and concurrency mechanism
  • Generic error handling
  • Forms validation
  • Generic bloc structure
  • RxDart
  • Dependency injection
  • Authentication with JWT and daily renewal (simple, no distinct access/refresh or sliding tokens).
  • Themes
  • Multiple languages
  • Named routes
  • Named routes with parameters
  • Names routes with simple permission control
  • Analytics and pushes skeleton
  • We have published the API so that you can test the app
  • Looks good but... it is still missing tests (TODO) :(

Dependency Injection

This project uses inject.dart. We only had to fork it from Google in order to bump a version dependency. You will have to clone it under vendor/inject.dart:

    $ cd <repository-root>
    $ git clone https://github.com/cingulo/inject.dart.git vendor/inject.dart

Use the commands below to build the dependency injection:

    $ flutter packages pub run build_runner build --build-filter "lib/data/*/*.dart" --delete-conflicting-outputs
    $ flutter packages pub run build_runner build --build-filter "lib/app/*.dart" --delete-conflicting-outputs
  • Done, you should now be good to run the app.

Structure

  • app/ Where the starting MaterialApp resides.
  • common/ Abstract app-wide base classes.
  • data/ Data handling.
  • data/*_repository.dart Frontier between app models and data storage.
  • errors/ Custom app errors.
  • models/ App models, independent of how data/*_repository.dart handles it (db, api, file, in memory, etc).
  • screens/ App screens, may also have screen-specific sub widgets.
  • screens/*_bloc.dart Screen/widget business logic.
  • services/ App-wide logic like analytics, crashes, l10n, pushes, refresh and routes.
  • themes/ App themes.
  • widgets/ App-wide widgets. Design system components would reside here, for example.
  • env.dart Envs.
  • main.dart Entry point.

Routes

Routes must be instantiated here to be available for navigation.

L10n

L10n delegates must be listed here to be available.

API Docs

Open the docs URL in your browser. You can also check the API GitHub repository.

flutter-sample's People

Contributors

felipeespitalher avatar rserro avatar

Watchers

 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.