HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to Manage State in Flutter using BLoC for Beginners

36,225 views January 31, 2020 33:35

Watch on YouTube
ChannelCheetah Coding

Chapters

Description from the creator

Bloc is the one of the best ways to manage state in your Flutter app. It can seem a bit confusing at first glance, but this video will hopefully clear up the confusion and show how easy it is to implement in any existing app.

00:00 - Intro
00:47 - Explaining initial code and the goal of this video
02:26 - Creating a BLoC Event class
05:59 - Creating the BLoC to define the state and handle the event
12:38 - Creating a BlocDelegate to intercept events, state changes, and related errors
15:25 - Assigning the BlocDelegate when the app starts
16:12 - Using a BlocProvider to provide the BLoC to the app
17:25 - Updating the BLoC state with an event
20:03 - Using a BlocConsumer to consume the BLoC state in a widget
23:49 - Showing a SnackBar message when a new event is found
24:45 - How to decide when a widget is rebuilt on new events
28:39 - Testing/Debugging (Adding and deleting items from the List state)

💻Get the Code: github.com/theflutterfactory/Flutter-Tutorials/…

⚡Connect on Facebook: facebook.com/flutterfactory

⚡Connect on Twitter: twitter.com/flutterfactory

About this tutorial

Cheetah Coding published this 33:35 video tutorial on January 31, 2020. It has been watched 36,225 times on YouTube.

Category
Education
Duration
33:35
Published
January 31, 2020
Views
36,225
Likes
565

Tags

Share

This tutorial in other languages