Code Monkey home page Code Monkey logo

flickr_viewer's Introduction

flickr_viewer

A simple Flutter application that allows users to search for images on Flickr using search bar or predefined keywords

Languages, libraries and tools

  • Flutter
  • Dart
  • dio A powerful Http client for Dart
  • retrofit a type conversion dio client generator using source_gen and inspired by Retrofit2 (Android and Java)
  • rxdart an implementation of the popular reactiveX api for asynchronous programming
  • get_it simple direct Service Locator that allows to decouple the interface from a concrete implementation and to access the concrete implementation from everywhere

Architecture

This project follows BLoC Pattern and Clean Architecture

  • UI

Flutter UI widgets belong here. View communicates with BLoC, subscribing to ViewState. Each Widget has a ViewState attached that provides the data required by the view to make state transitions.

  • Presentation

This module provides the logic of the UI, by providing subscribing components to the widgets to react to. The BLoC changes the ViewState based on the use case responses.

  • Domain

Contain use cases of the application. They provide the application specific business rules and are are responsible of accessing data from different repositories, combine and transform them, to provide single use case business rule.

  • Data

The Data layer is our access point to external data layers and is used to fetch data from multiple sources (network, cache). It contains implementations of Repositories, which request data from necessary RemoteDataSources and CacheDataSources to feed the use case and make communication between the 2 types of data sources.

  • Remote

The Remote layer handles all communications with remote sources such as API calls using a Retrofit definition. A RemoteImpl class implements a Remote interface from the Data layer and uses a Service to retrieve data from the API.

  • Cache

The Cache layer handles all communication with the local database.

Test

flutter test

Build

  • Retrieve a flickr api key by following this instruction
  • In the root of the repository, create an assets directory if it is missing
  • Inside assets, create a file called secret.json with the following content
{"flickr_api_key": "<YOUR_FLICKR_API_KEY>"}
  • Connect a device or an emulator
  • Build
flutter run

CI

Github Actions will run tests and build debug application (iOS, Android) on every pull request and merge event. Test coverage is reported at CodeCov

flickr_viewer's People

Contributors

giangpham96 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.