ExpandablePageView 플러그인을 사용하고 있는데 자꾸 페이지를 동적으로 처리할 때 항상 0번으로 셋팅이 되어 있어서 확인을 해보니 내부적으로 Controller가 설정이 안 되어 있으면 기본으로 생성을 하고 initial로 0번을 넣도록 되어 있다.
controller를 직접적으로 사용하지 않더라도 임의로 생성해서 initialPage 정보를 넣어주면 해결 된다.
ExpandablePageView(
controller: PageController(initialPage: iPageIdx),
onPageChanged: (iIdx) {
},
children: [],
)
'프로그래밍 > Flutter' 카테고리의 다른 글
[Flutter] 카카오 로그인 설정 (0) | 2022.04.23 |
---|---|
[Flutter] StatusBar Color (0) | 2022.04.21 |
[Flutter] Scroll To Top 버튼 (0) | 2022.04.17 |
[Flutter] BackPress to exit (0) | 2022.04.16 |
[Flutter] WebView on Web (0) | 2022.04.16 |
댓글