목록개발 (77)
말랑한 하루
※ reference : https://riverpod.dev/docs/concepts/providers 우리가 Provider를 사용하는 이유는 Provider가 상태를 Rapping 해주기 때문입니다. 관련해서 우리가 얻을 수 있는 좋은 영향은 다음과 같습니다. 🍒 여러 위치에서 해당 상태에 쉽게 접근할 수 있다. Provider는 SingleTon, Service Locator, Dependency Injection 또는 InheritedWidgets와 같은 패턴들을 완전히 대체할 수 있다. 🍒 현재 상태를 다른 상태와 결합 하는 것을 단순화 한다. riverpod은 Provider내부에 여러 상태를 하나로 병합하는 것이 구축되어 있다. 🍒 성능을 최적화를 활성화 한다. Provider가 상태 변경..
@riverpod, riverpod의 annotation Error이다. riverpod anootation이 정의되지 않았다고 한다. 이 오류는 flutter pub에 reverpod annotation이 설치되지 않았을 때 제기되었다. 처음 flutter_riverpod을 추가할 때, annotation 및 generator 등의 dependencey를 추가하지 않았고 오류로 이어진 것이다. 놓쳤던 pub을 다시 추가해주자 flutter pub add flutter_riverpod flutter pub add riverpod_annotation flutter pub add dev:riverpod_generator flutter pub add dev:build_runner flutter pub add ..