diff --git a/frontend/android/app/build.gradle b/frontend/android/app/build.gradle index 95b0743..8861fc3 100644 --- a/frontend/android/app/build.gradle +++ b/frontend/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 32 ndkVersion flutter.ndkVersion compileOptions { @@ -47,7 +47,7 @@ android { applicationId "com.example.leturn" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 20 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/frontend/lib/main.dart b/frontend/lib/main.dart index 5a9d92b..a6d2368 100644 --- a/frontend/lib/main.dart +++ b/frontend/lib/main.dart @@ -9,16 +9,19 @@ void main() { runApp(MyApp()); WidgetsFlutterBinding.ensureInitialized(); //화면 가로 고정 - SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); + //SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); //풀화면 (로테이션 불가능) - SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); + //SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);*/ } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { + SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); + SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); return ScreenUtilInit( + designSize: Size(1180, 820), builder: (context ,child) => MaterialApp( debugShowCheckedModeBanner: false, diff --git a/frontend/lib/screens/home_screen/home_screen.dart b/frontend/lib/screens/home_screen/home_screen.dart index 14d3bca..c89b722 100644 --- a/frontend/lib/screens/home_screen/home_screen.dart +++ b/frontend/lib/screens/home_screen/home_screen.dart @@ -2,8 +2,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:leturn/const/colors.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:leturn/screens/home_screen/page_read.dart'; import 'package:leturn/screens/login/login_page.dart'; + class HomeScreen extends StatelessWidget{ const HomeScreen({Key? key}) : super(key: key); @@ -88,7 +90,11 @@ class _Buttons extends StatelessWidget{ ) ], ), - onPressed: (){}, + onPressed: (){ + Navigator.push(context, + MaterialPageRoute( + builder: (_) => PageRead())); + }, ), ), //2. 카카오 로그인 diff --git a/frontend/lib/screens/home_screen/page_read.dart b/frontend/lib/screens/home_screen/page_read.dart new file mode 100644 index 0000000..471918b --- /dev/null +++ b/frontend/lib/screens/home_screen/page_read.dart @@ -0,0 +1,103 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:leturn/component/button_semantics.dart'; +import 'package:just_audio/just_audio.dart'; + + +class PageRead extends StatefulWidget { + const PageRead({Key? key}) : super(key: key); + + @override + _PageReadState createState() => _PageReadState(); +} + +class _PageReadState extends State { + + //오디오 재생 위젯 + final _player = AudioPlayer(); + bool isPlaying = false; + + @override + void initState(){ + super.initState(); + _init(); + } + + void _init(){ + _player.setAudioSource(AudioSource.uri(Uri())); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: SafeArea( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + _FixedTop(), + Container( + child: Text('data\n hey~~~') + ), + ], + ), + ), + ), + ); + } + + + Widget _FixedTop() { + return Container( + color: Colors.amber, + height: 90.h, + + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconButton( + onPressed:(){}, + icon: const Icon(Icons.arrow_back_ios_new_outlined), + iconSize: 44.w, + ), + Container( + child: Row( + children: [ + ButtonSemantics( + child: IconButton( + onPressed: (){}, + icon: Icon(Icons.bookmarks), + iconSize: 44.w, + ), + excludeSemantics: false, + label: '북마크 모음', + ), + ButtonSemantics( + child: IconButton( + onPressed: (){}, + icon: Icon(Icons.search), + iconSize: 44.w, + ), + excludeSemantics: false, + label: '페이지 이동', + ), + ButtonSemantics( + child: IconButton( + onPressed: (){}, + icon: Icon(Icons.bookmark_border), + iconSize: 44.w, + ), + excludeSemantics: false, + label: '북마크 등록', + ) + ], + ), + ) + ], + ), + ); + } + + +} \ No newline at end of file diff --git a/frontend/macos/Flutter/GeneratedPluginRegistrant.swift b/frontend/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..1e97c54 100644 --- a/frontend/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/frontend/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,14 @@ import FlutterMacOS import Foundation +import audio_session +import audioplayers +import just_audio +import path_provider_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) + AudioplayersPlugin.register(with: registry.registrar(forPlugin: "AudioplayersPlugin")) + JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) } diff --git a/frontend/pubspec.lock b/frontend/pubspec.lock index bb1d335..ff86d73 100644 --- a/frontend/pubspec.lock +++ b/frontend/pubspec.lock @@ -8,6 +8,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.9.0" + audio_session: + dependency: transitive + description: + name: audio_session + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.13" + audioplayers: + dependency: "direct main" + description: + name: audioplayers + url: "https://pub.dartlang.org" + source: hosted + version: "0.20.1" boolean_selector: dependency: transitive description: @@ -36,6 +50,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -50,6 +71,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" flutter: dependency: "direct main" description: flutter @@ -86,6 +121,25 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.5" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.2" intl: dependency: transitive description: @@ -93,6 +147,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.17.0" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + just_audio: + dependency: "direct main" + description: + name: just_audio + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.31" + just_audio_platform_interface: + dependency: transitive + description: + name: just_audio_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.0" + just_audio_web: + dependency: transitive + description: + name: just_audio_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.7" lints: dependency: transitive description: @@ -142,6 +224,48 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.1" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.23" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.9" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" petitparser: dependency: transitive description: @@ -149,6 +273,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.1.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.4" + rxdart: + dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.7" sky_engine: dependency: transitive description: flutter @@ -196,6 +348,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.12" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: @@ -203,6 +369,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" xml: dependency: transitive description: @@ -212,4 +392,4 @@ packages: version: "6.1.0" sdks: dart: ">=2.18.2 <3.0.0" - flutter: ">=2.11.0-0.1.pre" + flutter: ">=3.0.0" diff --git a/frontend/pubspec.yaml b/frontend/pubspec.yaml index 727e0d4..ca6e1bf 100644 --- a/frontend/pubspec.yaml +++ b/frontend/pubspec.yaml @@ -36,6 +36,8 @@ dependencies: flutter_screenutil: ^5.6.1 cupertino_icons: ^1.0.2 flutter_svg: ^1.1.6 + audioplayers: ^0.20.1 + just_audio: ^0.9.31 dev_dependencies: flutter_test: diff --git a/frontend/test/widget_test.dart b/frontend/test/widget_test.dart index 2403b8a..e69de29 100644 --- a/frontend/test/widget_test.dart +++ b/frontend/test/widget_test.dart @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:leturn/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -}