본문 바로가기

Routing2

Flutter 플러터 내비게이션 인덱스 1로 팝하기, Flutter Navigation pop to index 1 질문 저는 네비게이터에 재귀적으로 라우트를 추가하고 있습니다. 20개 이상의 뷰가 있을 수 있습니다. 팝은 광고대로 작동하지만, 인덱스 1로 팝하고 모든 푸시 기록을 제거하려면 어떻게 해야 할까요? 이 팝 명령을 returntoIndex0과 같은 것으로 대체할 방법이 있을까요... new ListTile( title: new RaisedButton( child: new Text("POP"), onPressed: () { var route = new MaterialPageRoute( builder: (BuildContext context) => new NextPage3(value:"hi there from 3"), ); Navigator.pop(context); }, ), ), 답변 이름이 지정된 경로를 .. 2023. 6. 14.
flutter 하위 트리 내에서 동일한 태그를 공유하는 여러 영웅이 있습니다., There are multiple heroes that share the same tag within a subtree 질문 저는 라우트를 사용하여 한 화면에서 다른 화면으로 이동하려고 합니다. 페이지를 이동시키기 위한 버튼을 누르면 다음과 같은 오류가 발생합니다. I/flutter ( 8790): Another exception was thrown: There are multiple heroes that share the same tag within a subtree. 다음은 코드입니다: 라우트: { '/first':(BuildContext context) =>NavigatorOne() , '/second':(BuildContext context) =>NavigatorTwo(), '/third':(BuildContext context) =>NavigatorThree(), }, Navigator.of(context).pu.. 2023. 5. 9.