[Navigator] 페이지 관리와 이동
Navigator
stack이라는 자료 구조를 사용하여 Route 객체를 관리한다.
Route
스마트폰에서 보이는 하나의 화면이나 페이지를 의미한다.
참고 ) https://api.flutter.dev/flutter/widgets/Navigator-class.html
Navigator class - widgets library - Dart API
A widget that manages a set of child widgets with a stack discipline. Many apps have a navigator near the top of their widget hierarchy in order to display their logical history using an Overlay with the most recently visited pages visually on top of the o
api.flutter.dev
stack
한쪽 끝에서만 자료를 넣고 뺄 수 있는 LIFO(Last In First Out) 형식의 자료 구조로 가장 최근에 추가한 항목이 가장 먼저 제거된다는 의미이다.
push -> 항목을 가장 윗부분에 추가
pop -> 가장 위에 있는 항목을 제거

flutter에서는 Route(AppPage)에 대한 관리는 Navigator가 하고 관리를 위하여 stack이라는 자료 구를 사용하는데 push 메소드를 이용하여 항목을 추가하고 pop을 사용하여 항목을 제거한다.
Navigator 사용법
// push 메소드
Navigator.push(
context,
MaterialPageRoute(
builder: (
BuildContext context
) => Dice()) // 이동할 페이지를 설정(여기서는 Dice 라는 곳으로 이동)
);
// pop 메소드
Navigator.pop(context); // 이전 페이지로 이동(pop메소드를 사용하여 현재 페이지가 없어짐)

이번 내용도 코딩셰프 님의 강좌를 보고 직접 실습한 내용을 작성하였습니다.
감사합니다.
출처 및 참고 : https://youtu.be/BWG9XS5ecig - 플러터(flutter) 순한맛 강좌 22 | Navigator(네비게이터) 이해하기