ShellRoute 실행 결과가 이상합니다 ..

선생님이랑 코드 똑같이 쓰고 라우트 위치도 맞는데 NestedScreen 가보면 이렇게 나옵니다.
아래는 더러울 수도 있지만 코드 전체 첨부합니다.
class NestedScreen extends StatelessWidget {
final Widget child;
NestedScreen({super.key, required this.child});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(GoRouterState.of(context).matchedLocation),
),
body: child,
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'home',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'person',
),
BottomNavigationBarItem(
icon: Icon(Icons.notifications),
label: 'notifications',
),
],
),
);
}
}
// router.dart
ShellRoute(
builder: (context, state, child) {
return NestedScreen(child: child);
},
routes: [
GoRoute(
path: 'nested/a',
builder: (_, state) => NestedChildScreen(routeName: '/nested/a'),
),
GoRoute(
path: 'nested/b',
builder: (_, state) => NestedChildScreen(routeName: '/nested/b'),
),
GoRoute(
path: 'nested/c',
builder: (_, state) => NestedChildScreen(routeName: '/nested/c'),
),
],
),
답변 1
146 자료는 학습완료가 체크가 안돼요
0
40
1
Isar 마지막 업데이트는 2년전입니다.
0
74
0
FlutterSecureStorage 질문
0
66
0
Dio onError Interceptor 만드는 부분에 질문이 있습니다.
0
132
2
관리자 기능에 대한 질문
0
142
2
part 'restaurant_model.g.dart';
0
116
1
36강. dio 인터셉터에 storage를 전달하는 코드가 이해 안되는데요. 도움 부탁드립니다.
0
86
2
2번 반환 상황 관련 질문
0
95
2
riverpod 3.0
0
165
2
Asset folder??
0
109
2
디자이너와 협업 시 프레임 크기 설정 관련 질문
0
161
2
FutureProvider, StateNotifierProvider 선택 기준
0
98
2
컴포넌트 모델화
0
87
2
쿼리 파라미터
0
109
2
화면 안보임
0
110
2
PaginationListView
0
86
1
강의중 37.Dio onErrorInterceptor 작업하기 dio 관련 질문입니다.
0
140
2
프로토타입이미지
0
86
2
여러 객체를 상태 관리하는 방법에 대한 질문
0
106
2
장바구니 결제하기 응답이 500이 옵니다.
0
133
2
removeFromBasket에서 await patchBasket()을 마지막에 하면 에러나는거 아닌가요?
0
98
2
이 두가지는 완전히 동일한 기능인가요?
0
127
3
내부 코드를 작성하지 않은 CursorPaginationLoading가 어떻게 로딩상태를 갖는지 잘 모르겠습니다...
0
99
2
_SplashScreenState에서 storage를 late로 호출해서 한번만 불러와도 되나요?
0
108
2





