Flutter/code
[플러터] Flutter Getx 페이지 전환 및 데이터 전달
차누감
2021. 10. 11. 20:19
반응형
페이지 이동 및 전환
Get.to(() => SecondPage());
Get.to(SecondPage());
전환되는 페이지로 데이터 보내기
(첫 번째 페이지에서 두 번째 페이지로 데이터 전달)
Get.to(() => SecondPage(), arguments: value);
Get.to(SecondPage(), arguments: value);
그리고 두 번째 페이지에서 데이터 받기
var value = Get.arguments;
전환되는 페이지로부터 데이터 받기
(두 번째 페이지에서 첫 번째 페이지로 데이터 전달)
var value = await Get.to(SecondPage());
그리고 두 번째 페이지에서 데이터를 전달
Get.back(result: value);
반응형