728x90
반응형
Navigator로 페이지 이동하기
Navigator.of(context).push(
MaterialPageRoute(
builder :(BuildContext context){
return HomeScreen();
}
)
)
Argument를 전달할 경우 (빌더 내부에 하단 변수 선언 후)
var arguments = ModalRoute.of(context)!.settings.arguments;
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ScreenTwo(),
settings: RouteSettings(
arguments: 789,
),
),
);728x90
반응형
'Flutter(dart)' 카테고리의 다른 글
| 플러터 window에서 Unable to find bundled Java version. 에러 (0) | 2023.02.01 |
|---|---|
| 리눅스 TOP 명령어 관련(cpu 점유율) (0) | 2023.01.09 |
| Dart 배열 거꾸로 출력 (0) | 2022.12.16 |
| 위젯의 생명주기 (0) | 2022.12.15 |
| Flutter flexible/expanded (0) | 2022.12.14 |