반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- wrap
- Git
- error
- 간단리뷰
- GitHub
- swift
- visualstudiocode
- listview
- M1
- sqflite
- AppleSilicon
- datetime
- 라이언
- VSCode
- database
- 내돈내산
- 춘식
- 데스크테리어
- TextField
- list
- react
- 플러터
- Flutter
- xcode
- AppBar
- GetX
- Android
- ios
- 데스크셋업
- 카카오
Archives
- Today
- Total
welcome to my blog
[Flutter] GetX + obs 업데이트가 안돼 본문
728x90
분명히 Controller도 binding 시켜주고 obs 선언도 해주었는데
값을 바꾸었을때 연결된 UI가 업데이트가 안되는거다!!
며칠간 삽질했는데
어이없게도 상위위젯을 GetX로 감싸주지않아서 안됐었음..hahahahahahahaahaaaaaa
수정해주니 잘 된다.
원래 소스 :
title : Text(widget.itemText, style: widget.isChecked? TextStyle( decoration: TextDecoration.lineThrough, color: Colors.grey, fontSize: controller.fontSize.value.toDouble()) : TextStyle(fontSize: controller.fontSize.value.toDouble())))
수정된 소스 :
title : GetX<TempController>(builder:(controller){
return Text(widget.itemText, style: widget.isChecked? TextStyle( decoration: TextDecoration.lineThrough, color: Colors.grey, fontSize: controller.fontSize.value.toDouble()) : TextStyle(fontSize: controller.fontSize.value.toDouble()));
})
728x90
반응형
'Flutter' 카테고리의 다른 글
[Flutter] android release build 앱빌드하기 (0) | 2021.12.06 |
---|---|
[Flutter] android apk 설치하기 / database 꺼내 보기 (0) | 2021.12.03 |
[Flutter] Database error - Null check operator used on a null value (0) | 2021.11.23 |
[Flutter] GetX Error - [Get] the improper use of a GetX has been detected. (0) | 2021.11.18 |
[Flutter] local git + androidstudio (0) | 2021.11.16 |