diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 4e30019..37e4de0 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:icon="@mipmap/launcher_icon"> CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Poet + 시인의 서재 CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - poet + 시인의 서재 CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart index 319f0b4..4d34558 100644 --- a/lib/generated/assets.dart +++ b/lib/generated/assets.dart @@ -2,9 +2,15 @@ class Assets { Assets._(); - static const String audio001 = 'assets/audio/001.wav'; - static const String audio002 = 'assets/audio/002.wav'; - static const String audio003 = 'assets/audio/003.wav'; + static const String audio1 = 'assets/audio/1.mp3'; + static const String audio2 = 'assets/audio/2.mp3'; + static const String audio3 = 'assets/audio/3.mp3'; + static const String audio4 = 'assets/audio/4.mp3'; + static const String audio5 = 'assets/audio/5.mp3'; + static const String audio6 = 'assets/audio/6.mp3'; + static const String audio7 = 'assets/audio/7.mp3'; + static const String audio8 = 'assets/audio/8.mp3'; + static const String audio9 = 'assets/audio/9.mp3'; static const String goSubsetsButton01 = 'assets/images/go_subsets/Button_01.webp'; static const String goSubsetsButton02 = 'assets/images/go_subsets/Button_02.webp'; static const String goSubsetsButton03 = 'assets/images/go_subsets/Button_03.webp'; @@ -15,6 +21,7 @@ class Assets { static const String goSubsetsButton08 = 'assets/images/go_subsets/Button_08.webp'; static const String goSubsetsButton09 = 'assets/images/go_subsets/Button_09.webp'; static const String imagesMainBack = 'assets/images/Main_Back.webp'; + static const String imagesTitle = 'assets/images/title.webp'; static const String subsetsSub01 = 'assets/images/subsets/Sub_01.webp'; static const String subsetsSub02 = 'assets/images/subsets/Sub_02.webp'; static const String subsetsSub03 = 'assets/images/subsets/Sub_03.webp'; @@ -27,6 +34,7 @@ class Assets { static const String uiUI5minus = 'assets/images/ui/UI_5minus.webp'; static const String uiUI5plus = 'assets/images/ui/UI_5plus.webp'; static const String uiUIBack = 'assets/images/ui/UI_Back.webp'; + static const String uiUIPause = 'assets/images/ui/UI_Pause.webp'; static const String uiUIPlay = 'assets/images/ui/UI_Play.webp'; static const String uiUIReplay = 'assets/images/ui/UI_Replay.webp'; diff --git a/lib/main.dart b/lib/main.dart index fc38a24..ad82c52 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,7 @@ -import 'dart:io'; - +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:poet/poet_screen.dart'; +import 'package:poet_repository/poet_screen.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); @@ -28,6 +27,10 @@ class PoetStudyScreen extends StatefulWidget { class _PoetStudyScreenState extends State with WidgetsBindingObserver { + // Variables to control grid spacing + final double _crossAxisSpacing = 1.0; + final double _mainAxisSpacing = 1.0; + @override void initState() { super.initState(); @@ -36,7 +39,7 @@ class _PoetStudyScreenState extends State } void _setSystemUIOverlayStyle() { - if (Platform.isAndroid) { + if (defaultTargetPlatform == TargetPlatform.android) { SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); } } @@ -45,7 +48,9 @@ class _PoetStudyScreenState extends State void dispose() { WidgetsBinding.instance.removeObserver(this); // When the main screen is disposed, restore the system UI - SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + if (defaultTargetPlatform == TargetPlatform.android) { + SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + } super.dispose(); } @@ -70,19 +75,21 @@ class _PoetStudyScreenState extends State ), // Main content - SafeArea( - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Column( - children: [ - Expanded( - child: Center( + Transform.translate( + offset: Offset(0.0, -40.0), // Move up by 40 pixels + child: Center( + child: Padding( + padding: const EdgeInsets.all(150.0), + child: Column( + mainAxisSize: MainAxisSize.min, // Use minimum space + children: [ + Center( child: GridView.builder( gridDelegate: - const SliverGridDelegateWithFixedCrossAxisCount( + SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, - crossAxisSpacing: 15, - mainAxisSpacing: 15, + crossAxisSpacing: _crossAxisSpacing, + mainAxisSpacing: _mainAxisSpacing, ), itemCount: 9, shrinkWrap: true, @@ -92,8 +99,20 @@ class _PoetStudyScreenState extends State }, ), ), - ), - ], + SizedBox(height: 30), // Added space + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only(left: 5), + child: Image.asset( + 'assets/images/title.webp', + width: 500, // Adjust as needed + height: 100, // Adjust as needed + ), + ), + ), + ], + ), ), ), ), @@ -119,8 +138,8 @@ class _PoetStudyScreenState extends State children: [ Image.asset( 'assets/images/go_subsets/Button_${(index + 1).toString().padLeft(2, '0')}.webp', - width: 325, - height: 325, + width: 260, + height: 260, fit: BoxFit.contain, ), ], diff --git a/lib/poet_screen.dart b/lib/poet_screen.dart index 9d46f42..2eca3b8 100644 --- a/lib/poet_screen.dart +++ b/lib/poet_screen.dart @@ -1,5 +1,4 @@ -import 'dart:io'; - +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:audioplayers/audioplayers.dart'; import 'package:flutter/services.dart'; @@ -30,7 +29,7 @@ class _PoetScreenState extends State with WidgetsBindingObserver { _backgroundImage = 'assets/images/subsets/Sub_${(widget.selectedIndex + 1).toString().padLeft(2, '0')}.webp'; - _source = AssetSource('audio/00${(widget.selectedIndex + 1).toString()}.wav'); + _source = AssetSource('audio/${(widget.selectedIndex + 1).toString()}.mp3'); _audioPlayer.onPlayerStateChanged.listen((state) { if (mounted) { @@ -67,7 +66,7 @@ class _PoetScreenState extends State with WidgetsBindingObserver { } void _setSystemUIOverlayStyle() { - if (Platform.isAndroid) { + if (defaultTargetPlatform == TargetPlatform.android) { SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); } } @@ -82,6 +81,7 @@ class _PoetScreenState extends State with WidgetsBindingObserver { Future _setAudio() async { try { await _audioPlayer.setSource(_source); + _audioPlayer.play(_source); } catch (e) { // Handle error, e.g., show a snackbar print("Error setting audio source: $e"); @@ -91,9 +91,9 @@ class _PoetScreenState extends State with WidgetsBindingObserver { @override void dispose() { WidgetsBinding.instance.removeObserver(this); - if (Platform.isAndroid) { - SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); - } + // if (defaultTargetPlatform == TargetPlatform.android) { + // SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); + // } _audioPlayer.dispose(); super.dispose(); } @@ -121,21 +121,23 @@ class _PoetScreenState extends State with WidgetsBindingObserver { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ // 상단 바 (뒤로가기, 제목, 새로고침) - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - _buildCircularImageButton('assets/images/ui/UI_Back.webp', () { - // 이 버튼을 누르면 이전 화면으로 돌아갑니다. - Navigator.pop(context); - }, size: 50, imageSize: 25), - _buildCircularImageButton('assets/images/ui/UI_Replay.webp', () { - // Refresh action here - }, size: 50, imageSize: 25), - ], + Padding( + padding: const EdgeInsets.only(top: 50.0,left: 25), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + _buildCircularImageButton('assets/images/ui/UI_Back.webp', () { + // 이 버튼을 누르면 이전 화면으로 돌아갑니다. + Navigator.pop(context); + }, size: 90, imageSize: 90), + // _buildCircularImageButton('assets/images/ui/UI_Replay.webp', () { + // // Refresh action here + // }, size: 100, imageSize: 100), + ], + ), ), - // 하단 음악 제어 _buildMusicControls(), ], ), @@ -177,15 +179,16 @@ class _PoetScreenState extends State with WidgetsBindingObserver { final newPosition = _position - const Duration(seconds: 5); _audioPlayer.seek(newPosition > Duration.zero ? newPosition : Duration.zero); }), - const SizedBox(width: 16), + const SizedBox(width: 100), _buildPlayPauseButton(), - const SizedBox(width: 16), + const SizedBox(width: 100), _buildCircularImageButton('assets/images/ui/UI_5plus.webp', () { final newPosition = _position + const Duration(seconds: 5); _audioPlayer.seek(newPosition < _duration ? newPosition : _duration); }), ], ), + ], ); } @@ -204,37 +207,33 @@ class _PoetScreenState extends State with WidgetsBindingObserver { } }, child: Container( - width: 80, - height: 80, - decoration: BoxDecoration( - color: const Color(0xFFF07B41), - shape: BoxShape.circle, - border: Border.all(color: Colors.white, width: 2), - ), + width: 150, + height: 150, + child: Center( child: _isPlaying - ? const Icon(Icons.pause, color: Colors.white, size: 50) + ? Image.asset( + 'assets/images/ui/UI_Pause.webp', + width: 191, + height: 190, + ) : Image.asset( 'assets/images/ui/UI_Play.webp', - width: 50, - height: 50, + width: 191, + height: 190, ), ), ), ); } - Widget _buildCircularImageButton(String imagePath, VoidCallback onPressed, {double size = 80, double imageSize = 50}) { + Widget _buildCircularImageButton(String imagePath, VoidCallback onPressed, {double size = 100, double imageSize = 100}) { return GestureDetector( onTap: onPressed, child: Container( width: size, height: size, - decoration: BoxDecoration( - color: const Color(0xFFF07B41), - shape: BoxShape.circle, - border: Border.all(color: Colors.white, width: 2), - ), + child: Center( child: Image.asset( imagePath, @@ -258,5 +257,5 @@ class _PoetScreenState extends State with WidgetsBindingObserver { ].join(':'); } - -} + +} \ No newline at end of file diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 0ea56a2..e6a7e3d 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -4,10 +4,10 @@ project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "poet") +set(BINARY_NAME "시인의 서재") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.poet") +set(APPLICATION_ID "com.example.poet_repository") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index fcc5bd8..5f6bad0 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = poet +PRODUCT_NAME = 시인의 서재 // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.poet +PRODUCT_BUNDLE_IDENTIFIER = com.example.poet_repository // The copyright displayed in application information PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved. diff --git a/pubspec.lock b/pubspec.lock index 4deee78..4e46a71 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" + url: "https://pub.dev" + source: hosted + version: "4.0.7" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -81,6 +97,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" clock: dependency: transitive description: @@ -150,6 +182,14 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_launcher_icons: + dependency: "direct dev" + description: + name: flutter_launcher_icons + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + url: "https://pub.dev" + source: hosted + version: "0.13.1" flutter_lints: dependency: "direct dev" description: @@ -184,6 +224,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.2" + image: + dependency: transitive + description: + name: image + sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928" + url: "https://pub.dev" + source: hosted + version: "4.5.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" leak_tracker: dependency: transitive description: @@ -296,6 +352,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" + url: "https://pub.dev" + source: hosted + version: "7.0.1" platform: dependency: transitive description: @@ -312,6 +376,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + posix: + dependency: transitive + description: + name: posix + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" + url: "https://pub.dev" + source: hosted + version: "6.0.3" sky_engine: dependency: transitive description: flutter @@ -429,6 +501,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" + url: "https://pub.dev" + source: hosted + version: "6.6.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" sdks: dart: ">=3.8.1 <4.0.0" flutter: ">=3.29.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0c81671..14cd5f6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ -name: poet -description: "A new Flutter project." +name: poet_repository +description: "시인의 서재" # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -39,6 +39,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + flutter_launcher_icons: "^0.13.1" # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is @@ -94,3 +95,9 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/to/font-from-package + +flutter_launcher_icons: + android: "launcher_icon" + ios: true + image_path: "assets/images/ui/UI_Play.webp" + remove_alpha_ios: true diff --git a/test/widget_test.dart b/test/widget_test.dart index 23dc296..3a7a0b8 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:poet/main.dart'; +import 'package:poet_repository/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { diff --git a/web/index.html b/web/index.html index f464552..ae2b601 100644 --- a/web/index.html +++ b/web/index.html @@ -23,13 +23,13 @@ - + - poet + 시인의 서재 diff --git a/web/manifest.json b/web/manifest.json index 1c0e38d..a366d74 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,11 +1,11 @@ { - "name": "poet", - "short_name": "poet", + "name": "시인의 서재", + "short_name": "시인의 서재", "start_url": ".", "display": "standalone", "background_color": "#0175C2", "theme_color": "#0175C2", - "description": "A new Flutter project.", + "description": "시인의 서재", "orientation": "portrait-primary", "prefer_related_applications": false, "icons": [ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 94dc479..bde16f1 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(poet LANGUAGES CXX) +project(시인의 서재 LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "poet") +set(BINARY_NAME "시인의 서재") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake.