티스토리 뷰
반응형
플러터에서 화면전환을 하고 싶다면
Navigator와 CupertinoPageRoute를 보면 됩니다.
CupertinoPageRoute
전체 화면을 iOS 전환으로 대체하는 모달 경로 (modal route) 라고 합니다.
생성자는 이렇게 생겼어요
이런식으로 이동하고자 하는 위젯을 builder에 넣어주면 됩니다.
CupertinoPageRoute(builder: (context) => SignupWidget())
그리고 fullScreenDialog 디폴트값이 false인데요,
false이면 push처럼 동작하고 (오른쪽에서 왼쪽으로 새로운 페이지가 나타남)
The page slides in from the right and exits in reverse. The page also shifts to the left in parallax when another page enters to cover it.
true이면 present처럼 동작합니다. (밑에서 위로 새로운 페이지가 올라옴)
The page slides in from the bottom and exits in reverse with no parallax effect for fullscreen dialogs.
그리고 maintainState는 디폴트값이 true인데요,
false로 하면 화면 전환이 되고 불필요한 리소스들을 날려버린다고 합니다.
when a modal route is replaced by another, the previous route remains in memory.
To free all the resources when this is not necessary, set maintainState to false.
Navigator
네비게이터에는 많은 Static Methods가 있습니다.
문서를 참고해주세요
저는 push, pop 써줬습니다.
반응형
'🤼♀️ > Flutter' 카테고리의 다른 글
[Flutter] 쿠퍼티노 얼럿 띄우기 (CupertinoAlertDialog, showCupertinoDialog) (0) | 2020.09.25 |
---|---|
[Flutter] iOS, 안드로이드에서 로컬 서버에 접속하기 (1) | 2020.09.25 |
[Flutter] Provider로 앱 상태 관리하기 (0) | 2020.09.23 |
[Flutter] Textfield에서 text가져오기 (0) | 2020.09.22 |
[Flutter] 플러터 프로젝트에 Image 파일 넣기 + 커스텀 탭바 아이콘 (0) | 2020.09.19 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Dart Factory
- PencilKit
- SerializerMethodField
- Flutter Spacer
- drf custom error
- flutter dynamic link
- ribs
- Django Heroku Scheduler
- 플러터 싱글톤
- DRF APIException
- flutter build mode
- Flutter 로딩
- flutter 앱 출시
- Sketch 누끼
- github actions
- Flutter getter setter
- 구글 Geocoding API
- 장고 Custom Management Command
- 장고 URL querystring
- flutter deep link
- METAL
- Django FCM
- Flutter Text Gradient
- Python Type Hint
- Django Firebase Cloud Messaging
- 플러터 얼럿
- ipad multitasking
- Watch App for iOS App vs Watch App
- Flutter Clipboard
- cocoapod
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함