Giter Club home page Giter Club logo

flutter_recipe_app_bloc_pattern's Introduction

flutter Recipe App

A Flutter application which demonstrate the BLoC pattern,
API calling,
Separating business logic from widget,
Writing clean code,
Unit testing,
and Infinite page scrolling (pagination)

App Screenshot

App Architecture

Repository is responsible to get the data either from API or local database
BLoC stands for (Business logic component) which handle the business logic of app
HomeScreen will render the UI to which user can interact

Core Concepts BLoC

Events

Events are the input to a Bloc. They are commonly added in response to user interactions such as button presses or lifecycle events like page loads.

States

States are the output of a Bloc and represent a part of your application's state. UI components can be notified of states and redraw portions of themselves based on the current state.

Transitions

The change from one state to another is called a Transition. A Transition consists of the current state, the event, and the next state

Streams

A stream is a sequence of asynchronous data.
In order to use Bloc, it is important to have a solid understanding of Streams and how they work.
If you're unfamiliar with Streams just think of a pipe with water flowing through it. The pipe is the Stream and the water is the asynchronous data.

Sink:

Using sink we can add the data to steam. In code Bloc.add(EventName)

Source:

By using sorce we can Consume the data

flutter_recipe_app_bloc_pattern's People

Contributors

nikhilbhople avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.