Flutter 104 Introduction to BLOC
What is BLOC (Business Logic Component)? A component that converts incoming Events (Streams) to outgoing States (Streams). Events - Inputs to a bloc e.g. in response of user interaction States - Outputs of a bloc and is part of application state. Notified system to redraw UI with build() Transition - Change of state, consist of current, transition and next state Why Stream? Stream - "container" for asynchronous data Asynchronous Programming Future (computation that is not completed immediately) Vs Stream (sequence/iterable, instead of asking for it, will inform you of event that is ready) Receive by: await for (hint hint for loop) Streams: Single Subscription stream - listened once Broadcast Stream - more than one listener can listen at the same time and it can be listened again Methods that: Process stream and return a result, Modify by returning a new stream based on original, Transform and Listen which return StreamSubscript...