Giter Site home page Giter Site logo

touzii / shopping-ui-bloc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yczar/shopping-ui-bloc

0.0 0.0 0.0 60 KB

This project is an example of how to use Bloc and Cubit packages to manage application state in Flutter. The project is a simple e-commerce application that allows users to view a list of shoes and add them to a shopping cart.

Dart 95.62% HTML 4.38%

shopping-ui-bloc's Introduction

Shopping UI(BLoC Version)

video

This project is an example of how to use Bloc and Cubit packages to manage application state in Flutter. The project is a simple e-commerce application that allows users to view a list of shoes and add them to a shopping cart.

The main feature of the application is the use of the Bloc and Cubit patterns to manage the state of the shopping cart. The application uses the shoe_bloc.dart file to define a ShoeBloc class that manages the state of the shoes in the application.

The ShoeBloc class extends the Bloc class from the bloc package and uses a ShoeState class to define the state of the application. The ShoeState class defines three states: ShoeStateLoading, ShoeStateLoaded, and ShoeStateError.

The application also uses the cubit package to manage the state of the shopping cart. The cart_cubit.dart file defines a CartCubit class that manages the state of the shopping cart.

The CartCubit class extends the Cubit class from the cubit package and uses a CartState class to define the state of the shopping cart. The CartState class defines two states: CartStateEmpty and CartStateNotEmpty.

The application demonstrates how to use Bloc and Cubit to manage application state and how to use BlocBuilder and CubitBuilder widgets to listen to state changes and update the UI accordingly.

Overall, this project serves as a good starting point for developers who are interested in learning how to use Bloc and Cubit to manage application state in Flutter.

shopping-ui-bloc's People

Contributors

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