- 앨범 상세 화면 구현 (히어로, 티저, 수록곡, 컨셉포토 섹션) - 티저/컨셉포토 라이트박스 (photo_view 핀치줌) - flutter_downloader로 백그라운드 이미지 다운로드 - modal_bottom_sheet로 앨범 소개 다이얼로그 - 뒤로가기 두 번 눌러 종료 기능 - 앱 아이콘 변경 (fromis_9 로고) - 모든 아이콘 Lucide Icons로 통일 - 앨범 목록 애니메이션 최적화 (스크롤 시 애니메이션 제거) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
61 lines
1.7 KiB
Dart
61 lines
1.7 KiB
Dart
/// 앱 라우터 설정
|
|
library;
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
import '../views/main_shell.dart';
|
|
import '../views/home/home_view.dart';
|
|
import '../views/members/members_view.dart';
|
|
import '../views/album/album_view.dart';
|
|
import '../views/album/album_detail_view.dart';
|
|
import '../views/schedule/schedule_view.dart';
|
|
|
|
/// 네비게이션 키
|
|
final GlobalKey<NavigatorState> rootNavigatorKey = GlobalKey<NavigatorState>();
|
|
|
|
/// 앱 라우터 설정
|
|
final GoRouter appRouter = GoRouter(
|
|
navigatorKey: rootNavigatorKey,
|
|
initialLocation: '/',
|
|
routes: [
|
|
// 메인 셸 (바텀 네비게이션)
|
|
ShellRoute(
|
|
builder: (context, state, child) => MainShell(child: child),
|
|
routes: [
|
|
GoRoute(
|
|
path: '/',
|
|
pageBuilder: (context, state) => const NoTransitionPage(
|
|
child: HomeView(),
|
|
),
|
|
),
|
|
GoRoute(
|
|
path: '/members',
|
|
pageBuilder: (context, state) => const NoTransitionPage(
|
|
child: MembersView(),
|
|
),
|
|
),
|
|
GoRoute(
|
|
path: '/album',
|
|
pageBuilder: (context, state) => const NoTransitionPage(
|
|
child: AlbumView(),
|
|
),
|
|
),
|
|
GoRoute(
|
|
path: '/schedule',
|
|
pageBuilder: (context, state) => const NoTransitionPage(
|
|
child: ScheduleView(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
// 앨범 상세 (셸 외부)
|
|
GoRoute(
|
|
path: '/album/:name',
|
|
parentNavigatorKey: rootNavigatorKey,
|
|
builder: (context, state) {
|
|
final albumName = state.pathParameters['name']!;
|
|
return AlbumDetailView(albumName: albumName);
|
|
},
|
|
),
|
|
],
|
|
);
|