Рет қаралды 9,556
In this tutorial, we'll be exploring the various widgets provided by the Flutter bloc package including BlocBuilder, BlocListener, and BlocProvider. We will dive into the difference between blocs and cubits to give you a better understanding of how to use each one in your applications.
To bring these concepts to life, we'll be building a store front list view that fetches the shopping item data from the FakeStore REST API. This is a perfect example to showcase the power of Flutter bloc as we'll be able to seamlessly add each item in the list view to our shopping cart and remove items from our shopping cart.
Whether you're new to Flutter or a seasoned developer, this video will provide valuable insights and a comprehensive understanding of how to use Flutter bloc to manage the state of your application. Our goal is to ensure you leave with a solid understanding of how to implement state management in Flutter using the Flutter bloc package.
So, if you're ready to take your Flutter development skills to the next level, then sit back, relax and join us in this exciting journey!
=== Contents of this video ===
00:00 Intro
00:23 Install and Setup Package
00:45 Implement and Use our CounterBloc example
05:41 Using the BlocBuilder widget
07:13 Recap (Remove this)
07:33 Implement the StoreBloc with the FakeStore API
27:53 Implement store state management with Cubit example
32:04 Main different between Blocs and Cubits
32:28 Observe bloc instances with an AppObserver
34:10 Using the BlocListener widget
36:04 Using the BlocConsumer widget
37:11 Outro
Please leave us your feedback in the comments, and let us know what you would like us to demonstrate next! You can reach out in the comments below or on Twitter using #Flutter #Dartlang #bloc
Like, Subscribe and Hit the Bell 🔔 if you enjoyed this video 😍
Get the package → pub.dev/packages/dart_frog
Get the source code → github.com/graphicbeacon/flut...
Get started with Dart course → bit.ly/getstartedwithdart
Dart docs → dart.dev
Subscribe to the channel → bit.ly/2P2N1jC
Read More Dart Tutorials → creativebracket.com
Buy me a coffee → ko-fi.com/creativebracket
LET'S CONNECT
---
Twitter → / creativ_bracket
Support the channel → / creativebracket