June222 / Smart-Factory-Project

0 stars 1 forks source link

[Flutter] showDialog(Popup)에서 setState가 되지 않는 문제 #17

Closed June222 closed 1 year ago

June222 commented 1 year ago

showDialog에서 setState를 하였으나 UI가 바뀌지 않는 문제가 발생함.

다만 값은 바뀌어 print는 잘됨.

추정 원인: showDialog 안은 statelessWidget일 것 같음.

원하는 결과: 버튼을 누르는 즉각 UI가 변경되길 원함.

June222 commented 1 year ago

해결: showDialog안에 StatefulWidget을 상단에 넣어 setState를 사용함.