[Flutter] 화면이동 정리 에러
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가 선언되어있으면 안된다.