Project #2 Statement

Learn how to implement the repository pattern and use Cubit with this project.

We'll cover the following

In this chapter, we’ll go through the repository pattern and how to implement it alongside the BLoC pattern.

Another thing that will be new is that we’ll implement this project using Cubits instead of Blocs. Both Cubits and Blocs serve the same purpose, but Cubits provide functions that we can call instead of the stream of events that we listen to in Blocs.


In this chapter, we’ll be working on an e-commerce project. E-commerce is short for electronic commerce, which simply means buying and selling goods and services over the internet.

To purchase items on an e-commerce platform, we perform the following tasks:

  1. Browse through their products.

  2. Add the ones we want to our cart.

  3. Once we're ready to buy, proceed to checkout.

An e-commerce website has two main components:

  • The user’s account

  • The user’s shopping cart

We’ll create an e-commerce website for groceries where users can create accounts and add or remove products to their carts.

This section will require you to create a Firebase project and enable authentication. If you need to know how to do that, please check the Appendix B: Authenticating with Firebase lesson. Provide your Firebase auth API keys and click “Run” to preview the app.

Note: Upon application execution, you can visit the URL after “Your app can be found at:” to view the app. 

Get hands-on with 1200+ tech skills courses.