반응형
코드 작성
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
child: Text(
"메인 화면 이동",
),
onPressed: () {
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (BuildContext context, Animation<double> animation1,
Animation<double> animation2) {
return MyApp(); //변경 필요
},
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
),
);
},
),
));
}
}
참고할만한 글
반응형
'개발 > Flutter' 카테고리의 다른 글
플러터 Flutter 메모장 구현하기 Notepad (0) | 2023.01.29 |
---|---|
플러터 Flutter ToDo List 구현하기 (0) | 2023.01.29 |
Flutter 플러터 타이머 간단 구현 Timer (0) | 2023.01.29 |
Flutter 플러터 URL 주소 열기 간단 구현 url launcher (0) | 2022.12.25 |
Flutter 플러터 백 버튼 무시하기 WillPopScope (0) | 2022.12.25 |
Flutter 플러터 랜덤 숫자 간단 사용법 Random (0) | 2022.12.24 |
Flutter 플러터 앱 상태 확인하기 AppLifecycleState (0) | 2022.12.24 |
Flutter 플러터 진동 간단 사용법 vibration (0) | 2022.12.24 |
댓글