diff --git a/android/app/build.gradle b/android/app/build.gradle index a98ab804..7c502f22 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -57,7 +57,7 @@ android { applicationId "info.eunha.maeumgagym_flutter" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion 21 + minSdkVersion 34//21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/lib/di/di.dart b/lib/di/di.dart index 02c4b012..69e9e2ee 100644 --- a/lib/di/di.dart +++ b/lib/di/di.dart @@ -70,6 +70,7 @@ import '../component/pose/presentation/view_model/pose_all/pose_all_bloc.dart'; import '../component/pose/presentation/view_model/pose_machine_state_cubit.dart'; import '../component/pose/presentation/view_model/pose_tab_state_cubit.dart'; import '../domain/purposes/use_case/del_purpose_use_case.dart'; +import '../presentation/pickle/view_model/web_view_controller_state_cubit.dart'; import '../presentation/pose/view_model/pose_search/pose_search_state_cubit.dart'; import '../presentation/purpose/view_model/purpose_add_edit/purpose_calender_state_cubit.dart'; import '../presentation/quotes/view_model/quotes_bloc.dart'; @@ -250,5 +251,8 @@ Future> di() async { ), ), BlocProvider(create: (context) => PurposeBloc(getPurposeDetailUseCase: getPurposeDetailUseCase)), + + // pickle + BlocProvider(create: (context) => WebViewControllerStateCubit()), ]; } diff --git a/lib/presentation/page_manager/ui/view/page_manager.dart b/lib/presentation/page_manager/ui/view/page_manager.dart index 0c2eb061..5283437f 100644 --- a/lib/presentation/page_manager/ui/view/page_manager.dart +++ b/lib/presentation/page_manager/ui/view/page_manager.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:maeumgagym_flutter/presentation/empty_view/view/empty_view_screen.dart'; import 'package:maeumgagym_flutter/presentation/home/ui/view/home_screen.dart'; +import 'package:maeumgagym_flutter/presentation/pickle/ui/view/pickle_screen.dart'; import 'package:maeumgagym_flutter/presentation/pose/ui/view/pose_main_screen.dart'; import 'package:maeumgagym_flutter/presentation/self_care/ui/view/self_care_screen.dart'; @@ -20,7 +21,7 @@ class PageManagerScreen extends StatelessWidget { const HomeScreen(), const PoseMainScreen(), const EmptyViewScreen(), - const EmptyViewScreen(), + const PickleScreen(), const SelfCareScreen(), ]; diff --git a/lib/presentation/pickle/ui/view/pickle_screen.dart b/lib/presentation/pickle/ui/view/pickle_screen.dart new file mode 100644 index 00000000..bf3db68f --- /dev/null +++ b/lib/presentation/pickle/ui/view/pickle_screen.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:maeumgagym_flutter/presentation/pickle/view_model/web_view_controller_state_cubit.dart'; +import 'package:webview_flutter/webview_flutter.dart'; + +class PickleScreen extends StatelessWidget { + const PickleScreen({super.key}); + + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (_, state) { + return Scaffold( + body: SafeArea( + child: WebViewWidget( + controller: state, + ), + ), + ); + }, + ); + } +} diff --git a/lib/presentation/pickle/view_model/web_view_controller_state_cubit.dart b/lib/presentation/pickle/view_model/web_view_controller_state_cubit.dart new file mode 100644 index 00000000..cb2a425b --- /dev/null +++ b/lib/presentation/pickle/view_model/web_view_controller_state_cubit.dart @@ -0,0 +1,10 @@ +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:webview_flutter/webview_flutter.dart'; + +class WebViewControllerStateCubit extends Cubit { + WebViewControllerStateCubit() : super( + WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..loadRequest(Uri.parse("https://maeumgagym-webview.xquare.app/")) + ); +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index c7407f43..e123564d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1293,6 +1293,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.5" + webview_flutter: + dependency: "direct main" + description: + name: webview_flutter + sha256: "6869c8786d179f929144b4a1f86e09ac0eddfe475984951ea6c634774c16b522" + url: "https://pub.dev" + source: hosted + version: "4.8.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "0d21cfc3bfdd2e30ab2ebeced66512b91134b39e72e97b43db2d47dda1c4e53a" + url: "https://pub.dev" + source: hosted + version: "3.16.3" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.dev" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: "9c62cc46fa4f2d41e10ab81014c1de470a6c6f26051a2de32111b2ee55287feb" + url: "https://pub.dev" + source: hosted + version: "3.14.0" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 837344ab..61f39759 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: 'none' -version: 0.9.93+125 +version: 0.9.93+126 environment: sdk: '>=3.0.6 <4.0.0' @@ -33,6 +33,7 @@ dependencies: flutter_bloc: ^8.1.6 flutter_screenutil: ^5.9.3 bloc_concurrency: ^0.2.5 + webview_flutter: ^4.8.0 dev_dependencies: flutter_test: