액티브 스킬/플러터

<Flutter> GetX 화면 전환이 안되는 경우

디벅잉 2022. 8. 12. 20:48
728x90

 

🧭

 

Get.toNamed

GetX로 route를 관리한다면 Get.toNamed를 사용해서 페이지를 전환하게 됩니다.

이 때 GetX는 사용자의 이중 클릭 등으로 페이지를 2번 호출하지 않도록 같은 페이지에 재진입을 막도록 되어 있습니다.

preventDuplicates

재진입을 막는 속성은 preventDuplicates로 페이지에 재진입을 허용하고 싶은 경우 해당 프로퍼티를 false 값으로 반영하면 됩니다.

 

https://github.com/jonataslaw/getx/issues/514

 

can't open named route again. · Issue #514 · jonataslaw/getx

Describe the bug I noticed that in get 3.3.0 this issue not exist but newer it's exist , When Open bottom sheet and go to named route event Get.to the first time the new route will open but whe...

github.com

 

728x90