GetXcontroller를 사용하여 데이터를 받아온 후, response 결과에 따라 화면을 다르게 보여줄때 statemixin을 사용하면 onLoading, onError, onEmpty로 각각 지정할 수 있다.
참고
https://medium.com/@mujababbas/getconnect-and-statemixin-in-flutter-getx-f744f52e870a
GetConnect and StateMixin in Flutter GetX
Fetching Data from API using GetConnect and StateMixin :
medium.com
728x90
'Flutter' 카테고리의 다른 글
[Flutter / Android] Warning: Mapping new ns 경고 해결 (0) | 2022.04.02 |
---|---|
[Flutter / 일반] minSDK, targetSDK 버전 선택하는 기준? (0) | 2022.04.02 |
[Flutter / 일반] 앱 아이콘 변경하기 (0) | 2022.03.26 |
[Flutter / GetX / Python / Flask] firebase cloud messaging으로 push notification 구현(3) : 백엔드 서버 구현 (0) | 2022.03.23 |
[Flutter / GetX / 일반] firebase cloud messaging으로 push notification 구현(1) : android, iOS 사전 세팅 (0) | 2022.03.21 |