Skip to content

This repository contains a simple example of a Flutter project with a simple Clean Architecture with BloC pattern.

License

Notifications You must be signed in to change notification settings

felipefpx/flutter_clean_bloc

Repository files navigation

flutter_clean_bloc

This repository contains a simple example of a Flutter project with a simple Clean Architecture with BloC pattern.

How to run

This project is prepared to consume this API locally hosted. With the API running, it is possible to run the flutter project by running $ flutter run.

Flutter Project

Architecture Overview

Dependencies

  • equatable: A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode;
  • flutter_bloc: Flutter Widgets that make it easy to implement the BLoC (Business Logic Component) design pattern. Built to be used with the bloc state management package;
  • http: A composable, multi-platform, Future-based API for HTTP requests;
  • json_annotation: Classes and helper functions that support JSON code generation via the json_serializable package;
  • nuvigator: A powerful routing abstraction over Flutter navigator, providing some new features and an easy way to define routers;
  • provider: A wrapper around InheritedWidget to make them easier to use and more reusable;
  • rxdart: RxDart is an implementation of the popular reactiveX api for asynchronous programming, leveraging the native Dart Streams api.

Dev Dependencies

  • bloc_test: A testing library which makes it easy to test blocs. Built to be used with the bloc state management package;
  • build_runner: A build system for Dart code generation and modular compilation;
  • effective_dart: Linter rules corresponding to the guidelines in Effective Dart;
  • json_serializable: Automatically generate code for converting to and from JSON by annotating Dart classes;
  • mocktail: A Dart mock library which simplifies mocking with null safety support and no manual mocks or code generation;

Generate code coverage report

  • Required: install the LCov for your operating system (ex: run $ brew install lcov on mac);
  • Run this command to generate the html coverage: $ flutter test --coverage && genhtml -o coverage coverage/lcov.info

About

This repository contains a simple example of a Flutter project with a simple Clean Architecture with BloC pattern.

Resources

License

Stars

Watchers

Forks

Languages