fromis_9/app/lib/services/albums_service.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

24 lines
666 B
Dart

/// 앨범 API 서비스
library;
import '../models/album.dart';
import 'api_client.dart';
/// 앨범 목록 조회
Future<List<Album>> getAlbums() async {
final response = await dio.get('/albums');
final List<dynamic> data = response.data;
return data.map((json) => Album.fromJson(json)).toList();
}
/// 최신 앨범 N개 조회
Future<List<Album>> getRecentAlbums(int count) async {
final albums = await getAlbums();
return albums.take(count).toList();
}
/// 앨범 상세 조회 (폴더명으로)
Future<Album> getAlbumByName(String name) async {
final response = await dio.get('/albums/by-name/$name');
return Album.fromJson(response.data);
}