[Flutter] BLOC패턴
2019. 6. 20. 14:02ㆍFlutter
핵심개념
#Events
Bloc으로 향하는 입력.
일반적으로 버튼눌림 같은 사용자 상호작용, 페이지로드 같은 라이프사이클 이벤트에 의해 디스패치됩니다.
#States
Bloc의 출력. 앱의 상태를 대표.
UI 컴포넌트들은 상태를 공지받을 수 있고, 그 상태를 기반으로 다시 그릴 수 있습니다.
#Transitions
한 상태에서 또 다른 상태로의 변경을 의미.
Transition은 현재 상태, 이벤트, 다음 상태로 구성됩니다.
#Streams
비동기 데이터의 나열. 데이터 통로
#Blocs
Events의 "입력 Stream"을 States의 "출력 Stream"으로 변시켜주는 컴포넌트.
아키텍쳐
GITHUB: https://github.com/felangel/bloc
출처: https://bsscco.github.io/2019/03/24/flutter-bloc-introduction/
'Flutter' 카테고리의 다른 글
iOS build issue - 'Flutter/Flutter.h' file not found (0) | 2021.08.31 |
---|---|
iOS build issue - Error running pod install (0) | 2021.08.31 |
[Flutter] iOS: Command /bin/sh failed with exit code 255 (0) | 2019.05.15 |
[Flutter] MethodChannel (0) | 2019.05.15 |
Builder 클래스의 의미 (0) | 2019.04.16 |