일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 채팅 메시지 정렬
- flutter doctor -v
- GetX
- pub.dev
- flutter_secure_storage
- permissiondeniedexception
- flutter_dotenv
- guideline 1.5
- appstroe connect guideline
- youtube_player_flutter
- exception
- app stroe connect guideline
- providernotfoundexception
- infinity or nan toint
- app completeness
- exception caught by image resource service
- Flutter
- app store connect guideline
- buildcontext
- .dio
- tflite_flutter
- undefined name
- dart sdk version upgrade
- withopacity
- appstore connect guideline
- AI
- information needed
- 플러터
- guideline 4.3(a)
- 에러
Archives
- Today
- Total
min_chan님의 블로그
[Flutter] - Don't use 'BuildContext's across async gaps, guarded by an unrelated 'mounted' check. 본문
Flutter
[Flutter] - Don't use 'BuildContext's across async gaps, guarded by an unrelated 'mounted' check.
min_chan 2025. 1. 17. 09:21
1. 스크린샷
2. 원인
- 비동기 작업을 수행하면서 이러한 객체들을 사용할 때는 주의가 필요하므로 'mounted'로 체크를 해주어야 한다고 한다. 에러는 아니지만 밑줄이 있는 것이 매우 불편.....
3. mounted란?
- 비동기 작업 중이나 그 이후에 BuildContext를 저장하고 사용하려고 하면 문제를 야기할 수 있다. 그렇기 때문에 해당 State가 여전히 존재하고 위젯 트리에 마운트되어 있는지 확인하기위해 mounted를 사용하여 체크를 해주는 것이다.
참조 문서: https://dart.dev/tools/linter-rules/use_build_context_synchronously
4. 스크린샷
'Flutter' 카테고리의 다른 글
[Flutter] - API 호출 최적화 Throttle (0) | 2025.01.21 |
---|---|
[Flutter] - Vertical viewport was given unbounded height (0) | 2025.01.20 |
[Flutter] - pub get failed (0) | 2025.01.16 |
[Flutter] - PermissionDeniedException User denied permissions to access the device's location. (0) | 2025.01.15 |
[Flutter] - BOTTOM OVERFLOWED BY ~PIXELS (0) | 2025.01.14 |