type is not a subtype of type in type cast where... 에러
push랑 pushname을 앎을 전재로 함
왜 Navigator.pushnamed를 써야할까?
https://github.com/flutter/flutter/issues/3867
Document the pros and cons of using push vs pushNamed · Issue #3867 · flutter/flutter
Right now I’m only using Navigator.push(context, new MaterialPageRoute(... I know there are some other options like the routes named parameter to MaterialApp constructor. What are the pros/cons to ...
github.com
읽어보면 도움 될 만함.
그래서 pushnamed로 정리할려 한다.
넘겨주는 방법은
네임드 라우트에 인자 전달하기
Navigatoer는 식별자를 사용해서 네임드 라우트로 화면이동할 수 있도록 해줍니다. 그런데 네임드 라우트에 인자들을 넘겨주고 싶은 경우도 있습니다.예를 들어 /user 라우트로 화면을 이동때 user의
paulaner80.tistory.com
영어를 한글로 잘 번역한 블로그가 있어서 대체 할려 한다.
제대로 입력도 했고, 다 했는데... 왜 안될까?
정답은 class를 담은 파일 위치이다.
플로우는 SpecificScreen -> Reserveraion 일 때,
Reservation과 specificScreen에 똑같은 TOReservArgument를 선언했기 때문이다.
Arguemnt를 전달받는 페이지에는 class가 선언되어있으면 안된다.
'Flutter' 카테고리의 다른 글
[flutter] RealTime Database 버전 오류 수정... 구글에 Docs 오타 보냈음... (Error running pod installError, launching application on test.) (0) | 2022.11.20 |
---|---|
[Flutter] Android Studio 버벅일 때 (0) | 2022.11.19 |
[Flutter] Text에 shadow 넣기 (0) | 2022.10.31 |
[Flutter] lost connection to device 에러(파이어베이스 auth 클릭시 튕겨서 속상해요~) (0) | 2022.10.17 |
[flutter] 그림자 설정법 (0) | 2022.10.11 |