728x90
scroll을 할때 animatedcontainer의 크기를 변경하려고 하는데 다음과 같은 에러가 발생한다.
Build scheduled during frame.
While the widget tree was being built, laid out, and painted, a new frame was scheduled to rebuild the widget tree.
해결 방법은 간단하다.
setState를 다음과 같이 수정해주면 된다.
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {});
});
[Reference]
https://github.com/gonuit/flutter-custom-refresh-indicator/issues/9
728x90
'Dart & Flutter' 카테고리의 다른 글
[Flutter/Android] java.lang.RuntimeException: Unable to instantiate activity (0) | 2023.04.22 |
---|---|
[Flutter] build error: Runtime JAR files in the classpath should have the same version. .... (0) | 2023.04.21 |
[Flutter] Navigator.push 할 때 Fade 적용 (0) | 2023.04.19 |
[Flutter] image, button 안쪽에 shadow 적용 (0) | 2023.04.19 |
[Flutter] push a new page for a specific duration (use mounted) (0) | 2023.04.14 |