728x90
반응형

provider 3

[Flutter] Bloc ② - Cubit 과 Bloc

Bloc ① - 소개 https://dalgoodori.tistory.com/28 Bloc ② - Cubit 과 Bloc Bloc ③ - Bloc Widgets https://dalgoodori.tistory.com/30 Bloc ④ - context.read, context.watch, context.select https://dalgoodori.tistory.com/31 Bloc ⑤ - Bloc Test https://dalgoodori.tistory.com/32 Cubit Cubit 은 Bloc 과 다르게 이벤트 기반이 아니라 정말 간단하게 상태를 관리할 수 있습니다. Provider 의 ChangeNotifier 와 비슷합니다. 생성 Cubit 을 상속받는 클래스를 만들어주면 됩니다. 초기값은 내..

Flutter/Package 2022.08.04

[Flutter] Bloc ① - 소개

Bloc ① - 소개 Bloc ② - Cubit 과 Bloc https://dalgoodori.tistory.com/29 Bloc ③ - Bloc Widgets https://dalgoodori.tistory.com/30 Bloc ④ - context.read, context.watch, context.select https://dalgoodori.tistory.com/31 Bloc ⑤ - Bloc Test https://dalgoodori.tistory.com/32 Flutter에서는 UI 와 비즈니스 로직을 분리하기 위해서 많이 쓰이는 Bloc 에 대해서 포스팅 합니다. Provider 와 같이 관심사 분리를 위해 쓰이는 것은 동일하지만 Bloc 은 Provider 와 다르게 State와 Event를..

Flutter/Package 2022.08.03

[Flutter] Provider

옛날 JSP, PHP 코드를 보면 UI 와 비즈니스 로직이 섞여 수천줄이나 되는 코드를 볼 수 있었습니다. 이런 코드는 가독성은 두말할 것도 없지만 코드를 작성한 사람도 시간이 지나면 알아보기 힘들 정도이기 때문에 유지보수에 굉장히 애를 먹습니다. 한사람이 처리하던 많은 일을 여러 사람과 분업을 하듯이 UI 와 비스니스 로직을 떼어놓는 관심사 분리 작업이 필요합니다. Flutter 에서는 Provider 로 관심사 분리를 할 수 있습니다. provider | Flutter Package A wrapper around InheritedWidget to make them easier to use and more reusable. pub.dev 앱을 처음 만들었을 때 기본으로 제공되는 카운팅 앱으로 예시로 했..

Flutter/Package 2022.07.27
728x90
반응형