Fast Track Flutter [Chapter-3]
State Management Bloc
Section 0: Introduction
Stream
Basic Concept Stream
river flows illustration = data flow.
ship illustration = data..
Get Ricky Rinaldy’s stories in your inbox
Join Medium for free to get updates from this writer.
yield = process of flowing data.
Explanation:
When we want to send ship(data), the ship(data) will pass through yield so that it can be sent ship(data) to the destination.
Case: Counter Number with delay
Cubit
Important: you need install package bloc & flutter_bloc
how to install package : https://bloclibrary.dev/#/gettingstarted
Basic Cubit
Cubit is a simple BLoC implementation, used to trigger state changes via ‘emit’
Case: Counter Number emit
Cubit Observer
We can observe all changes for a given Cubit by overriding:
- onChange, for observing all changes output to the console.
- onError, for handling all reported errors globally.
docs: https://bloclibrary.dev/#/coreconcepts?id=observing-a-cubit


![Spring Boot [No BS]](https://miro.medium.com/v2/resize:fit:1358/format:webp/1*VdzWisQTD9RA4Fd-DJDIzQ.jpeg)







