fromis_9/app/lib/main.dart
caadiq 5691cb6ce0 Flutter 앱: 앨범 상세 화면, 라이트박스, 다운로드 기능 추가
- 앨범 상세 화면 구현 (히어로, 티저, 수록곡, 컨셉포토 섹션)
- 티저/컨셉포토 라이트박스 (photo_view 핀치줌)
- flutter_downloader로 백그라운드 이미지 다운로드
- modal_bottom_sheet로 앨범 소개 다이얼로그
- 뒤로가기 두 번 눌러 종료 기능
- 앱 아이콘 변경 (fromis_9 로고)
- 모든 아이콘 Lucide Icons로 통일
- 앨범 목록 애니메이션 최적화 (스크롤 시 애니메이션 제거)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 10:42:52 +09:00

84 lines
2.4 KiB
Dart

/// fromis_9 Unofficial App
///
/// MVCS 아키텍처:
/// - Models: 데이터 모델
/// - Views: UI 화면
/// - Controllers: 비즈니스 로직 (Riverpod)
/// - Services: API 통신
library;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'core/router.dart';
import 'core/constants.dart';
import 'services/download_service.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// 다운로드 서비스 초기화
await initDownloadService();
// 상태바 및 네비게이션 바 스타일 설정
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(
// 상태바
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
// 네비게이션 바 (소프트키)
systemNavigationBarColor: Colors.white,
systemNavigationBarIconBrightness: Brightness.dark,
),
);
runApp(
const ProviderScope(
child: Fromis9App(),
),
);
}
class Fromis9App extends StatelessWidget {
const Fromis9App({super.key});
@override
Widget build(BuildContext context) {
return AnnotatedRegion<SystemUiOverlayStyle>(
value: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarColor: Colors.white,
systemNavigationBarIconBrightness: Brightness.dark,
systemNavigationBarDividerColor: Colors.transparent,
),
child: MaterialApp.router(
title: 'fromis_9',
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: AppColors.primary,
brightness: Brightness.light,
),
scaffoldBackgroundColor: AppColors.background,
appBarTheme: const AppBarTheme(
backgroundColor: Colors.white,
foregroundColor: AppColors.textPrimary,
elevation: 0,
scrolledUnderElevation: 1,
centerTitle: true,
titleTextStyle: TextStyle(
fontFamily: 'Pretendard',
color: AppColors.primary,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
fontFamily: 'Pretendard',
),
routerConfig: appRouter,
),
);
}
}