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/component/maeum_button.dart b/lib/component/maeum_button.dart index b2a1c748..18898db5 100644 --- a/lib/component/maeum_button.dart +++ b/lib/component/maeum_button.dart @@ -25,6 +25,7 @@ class MaeumButton extends StatelessWidget { @override Widget build(BuildContext context) { return GestureDetector( + behavior: HitTestBehavior.opaque, onTap: onTap, child: AnimatedContainer( duration: const Duration(milliseconds: 100), 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/home/ui/widget/home_bottom_space.dart b/lib/presentation/home/ui/widget/home_bottom_space.dart index 880f98a2..a48c38ad 100644 --- a/lib/presentation/home/ui/widget/home_bottom_space.dart +++ b/lib/presentation/home/ui/widget/home_bottom_space.dart @@ -25,6 +25,7 @@ class HomeBottomSpace extends StatelessWidget { ), SizedBox(height: 8.h), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { launchUrl(Uri.parse( "https://info-dsm.notion.site/2a0474e87f754fbe8f53d58f2003ccb2?pvs=4")); 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/page_manager/ui/widget/bottom_navigation_item.dart b/lib/presentation/page_manager/ui/widget/bottom_navigation_item.dart index 7146898a..67487295 100644 --- a/lib/presentation/page_manager/ui/widget/bottom_navigation_item.dart +++ b/lib/presentation/page_manager/ui/widget/bottom_navigation_item.dart @@ -27,6 +27,7 @@ class BottomNavigationItem extends StatelessWidget { bool isSelected = context.watch().state == clickState; return GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { pageController.animateToPage( clickState, @@ -36,7 +37,8 @@ class BottomNavigationItem extends StatelessWidget { context.read().changeState(clickState); }, child: SizedBox( - height: 64, + width: (1.sw / 5).floorToDouble(), + height: 64.h, child: FittedBox( fit: BoxFit.scaleDown, child: Column( 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/lib/presentation/pose/ui/view/pose_search_screen.dart b/lib/presentation/pose/ui/view/pose_search_screen.dart index bc309db4..4c23992c 100644 --- a/lib/presentation/pose/ui/view/pose_search_screen.dart +++ b/lib/presentation/pose/ui/view/pose_search_screen.dart @@ -41,6 +41,7 @@ class _PoseSearchScreenState extends State { searchFocusNode: searchFocusNode, ), body: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => searchFocusNode.unfocus(), child: const PoseSearchBody(), ), diff --git a/lib/presentation/pose/ui/widget/pose_detail/pose_detail_app_bar.dart b/lib/presentation/pose/ui/widget/pose_detail/pose_detail_app_bar.dart index 72c75a9d..e4d565df 100644 --- a/lib/presentation/pose/ui/widget/pose_detail/pose_detail_app_bar.dart +++ b/lib/presentation/pose/ui/widget/pose_detail/pose_detail_app_bar.dart @@ -41,6 +41,7 @@ class PoseDetailAppBar extends StatelessWidget implements PreferredSizeWidget { /// 루틴에 추가 GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.push(context, AddToRoutineScreen(poseData: poseData)), child: Container( decoration: BoxDecoration( diff --git a/lib/presentation/pose/ui/widget/pose_main/pose_main_app_bar.dart b/lib/presentation/pose/ui/widget/pose_main/pose_main_app_bar.dart index eff13302..8b68962d 100644 --- a/lib/presentation/pose/ui/widget/pose_main/pose_main_app_bar.dart +++ b/lib/presentation/pose/ui/widget/pose_main/pose_main_app_bar.dart @@ -33,16 +33,8 @@ class PoseMainAppBar extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ GestureDetector( - onTap: () async { - MaeumNavigator.push(context, const PoseSearchScreen()); - // await Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => const PoseSearchScreen(), - // ), - // ); - // ref.read(poseSearchController.notifier).state = ''; - }, + behavior: HitTestBehavior.opaque, + onTap: () async => MaeumNavigator.push(context, const PoseSearchScreen()), child: ImageWidget( image: Images.iconsSearch, width: 28.w, diff --git a/lib/presentation/profile/ui/widget/widget/profile_app_bar.dart b/lib/presentation/profile/ui/widget/widget/profile_app_bar.dart index d335ef1d..91844fcc 100644 --- a/lib/presentation/profile/ui/widget/widget/profile_app_bar.dart +++ b/lib/presentation/profile/ui/widget/widget/profile_app_bar.dart @@ -19,6 +19,7 @@ class ProfileAppBar extends StatelessWidget implements PreferredSizeWidget { children: [ SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget(image: Images.arrowLeft, width: 28.w), ), diff --git a/lib/presentation/profile/ui/widget/widget/profile_quit_dialog.dart b/lib/presentation/profile/ui/widget/widget/profile_quit_dialog.dart index 3c365318..e42d8886 100644 --- a/lib/presentation/profile/ui/widget/widget/profile_quit_dialog.dart +++ b/lib/presentation/profile/ui/widget/widget/profile_quit_dialog.dart @@ -41,6 +41,7 @@ class ProfileQuitDialog extends StatelessWidget { children: [ Expanded( child: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: Container( height: 48.h, diff --git a/lib/presentation/profile/ui/widget/widget/proifle_log_out_dialog.dart b/lib/presentation/profile/ui/widget/widget/proifle_log_out_dialog.dart index af2bc647..25c12660 100644 --- a/lib/presentation/profile/ui/widget/widget/proifle_log_out_dialog.dart +++ b/lib/presentation/profile/ui/widget/widget/proifle_log_out_dialog.dart @@ -45,6 +45,7 @@ class ProfileLogOutDialog extends StatelessWidget { children: [ Expanded( child: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: Container( height: 48.h, diff --git a/lib/presentation/purpose/ui/view/purpose_add_edit_screen.dart b/lib/presentation/purpose/ui/view/purpose_add_edit_screen.dart index 1dd9ee95..49ac1988 100644 --- a/lib/presentation/purpose/ui/view/purpose_add_edit_screen.dart +++ b/lib/presentation/purpose/ui/view/purpose_add_edit_screen.dart @@ -151,6 +151,7 @@ class _PurposeAddEditScreenState extends State { BlocBuilder( builder: (_, state) { return GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { PurposeStartCalender notifier = context.read(); @@ -179,6 +180,7 @@ class _PurposeAddEditScreenState extends State { BlocBuilder( builder: (_, state) { return GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { PurposeCalenderStateCubit notifier = context.read(); diff --git a/lib/presentation/purpose/ui/widget/purpose/purpose_app_bar.dart b/lib/presentation/purpose/ui/widget/purpose/purpose_app_bar.dart index c78aa0fa..0c5787ab 100644 --- a/lib/presentation/purpose/ui/widget/purpose/purpose_app_bar.dart +++ b/lib/presentation/purpose/ui/widget/purpose/purpose_app_bar.dart @@ -18,6 +18,7 @@ class PurposeAppBar extends StatelessWidget implements PreferredSizeWidget { children: [ SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget( image: Images.arrowLeft, diff --git a/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_app_bar.dart b/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_app_bar.dart index 87addd60..7b1e6cc2 100644 --- a/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_app_bar.dart +++ b/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_app_bar.dart @@ -22,6 +22,7 @@ class PurposeAddEditAppBar extends StatelessWidget implements PreferredSizeWidge child: Row( children: [ GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget( image: Images.arrowLeft, diff --git a/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_calender_widget.dart b/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_calender_widget.dart index 69f64118..10383a64 100644 --- a/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_calender_widget.dart +++ b/lib/presentation/purpose/ui/widget/purpose_add_edit/purpose_add_edit_calender_widget.dart @@ -87,6 +87,7 @@ class _PurposeAddEditCalenderWidgetState extends State widget.removeCalender(), child: Container(color: Colors.transparent,) ), @@ -207,6 +209,7 @@ class _PurposeAddEditCalenderWidgetState extends State MaeumNavigator.pop(context), child: ImageWidget( image: Images.arrowLeft, diff --git a/lib/presentation/routine/ui/widget/add_to_routine/add_to_routine_detail_bottom_sheet.dart b/lib/presentation/routine/ui/widget/add_to_routine/add_to_routine_detail_bottom_sheet.dart index de7ea46c..122a0ada 100644 --- a/lib/presentation/routine/ui/widget/add_to_routine/add_to_routine_detail_bottom_sheet.dart +++ b/lib/presentation/routine/ui/widget/add_to_routine/add_to_routine_detail_bottom_sheet.dart @@ -11,8 +11,6 @@ import 'package:maeumgagym_flutter/domain/routines/entity/routine_entity.dart'; import 'package:maeumgagym_flutter/domain/routines/entity/routines_entity.dart'; import 'package:maeumgagym_flutter/presentation/routine/view_model/routines/routines_bloc.dart'; import 'package:maeumgagym_flutter/presentation/routine/view_model/routines/routines_event.dart'; -import 'package:maeumgagym_flutter/presentation/routine/view_model/today_routine/today_routine_bloc.dart'; -import 'package:maeumgagym_flutter/presentation/routine/view_model/today_routine/today_routine_event.dart'; import '../../../view_model/routines/routines_state.dart'; diff --git a/lib/presentation/routine/ui/widget/routine/routine_app_bar.dart b/lib/presentation/routine/ui/widget/routine/routine_app_bar.dart index 316960ed..09470915 100644 --- a/lib/presentation/routine/ui/widget/routine/routine_app_bar.dart +++ b/lib/presentation/routine/ui/widget/routine/routine_app_bar.dart @@ -18,6 +18,7 @@ class RoutineAppBar extends StatelessWidget implements PreferredSizeWidget { children: [ SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget( image: Images.arrowLeft, diff --git a/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_app_bar.dart b/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_app_bar.dart index a2640858..34fb4964 100644 --- a/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_app_bar.dart +++ b/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_app_bar.dart @@ -21,6 +21,7 @@ class RoutineAddEditAppBar extends StatelessWidget implements PreferredSizeWidge children: [ SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget( image: Images.arrowLeft, diff --git a/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_pose_list_widget.dart b/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_pose_list_widget.dart index 32bc7833..7c7d1b3d 100644 --- a/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_pose_list_widget.dart +++ b/lib/presentation/routine/ui/widget/routine_add_edit/routine_add_edit_pose_list_widget.dart @@ -54,6 +54,7 @@ class RoutineAddEditPoseListWidget extends StatelessWidget { ], ), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => context.read().delete(index), child: ImageWidget( image: Images.editClose, diff --git a/lib/presentation/routine/ui/widget/routine_add_pose/routine_add_pose_app_bar.dart b/lib/presentation/routine/ui/widget/routine_add_pose/routine_add_pose_app_bar.dart index 3ee3bcc3..4e0a8b62 100644 --- a/lib/presentation/routine/ui/widget/routine_add_pose/routine_add_pose_app_bar.dart +++ b/lib/presentation/routine/ui/widget/routine_add_pose/routine_add_pose_app_bar.dart @@ -20,6 +20,7 @@ class RoutineAddPoseAppBar extends StatelessWidget implements PreferredSizeWidge children: [ SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget( image: Images.editClose, diff --git a/lib/presentation/routine/ui/widget/routine_detail/routine_detail_app_bar.dart b/lib/presentation/routine/ui/widget/routine_detail/routine_detail_app_bar.dart index 640fcd17..66ad05ba 100644 --- a/lib/presentation/routine/ui/widget/routine_detail/routine_detail_app_bar.dart +++ b/lib/presentation/routine/ui/widget/routine_detail/routine_detail_app_bar.dart @@ -18,6 +18,7 @@ class RoutineDetailAppBar extends StatelessWidget implements PreferredSizeWidget child: Row( children: [ GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget(image: Images.arrowLeft, width: 28.w), ) diff --git a/lib/presentation/routine/ui/widget/routine_detail/routine_detail_bottom_sheet.dart b/lib/presentation/routine/ui/widget/routine_detail/routine_detail_bottom_sheet.dart index b4b19e74..2ccd89e3 100644 --- a/lib/presentation/routine/ui/widget/routine_detail/routine_detail_bottom_sheet.dart +++ b/lib/presentation/routine/ui/widget/routine_detail/routine_detail_bottom_sheet.dart @@ -32,6 +32,7 @@ class RoutineDetailBottomSheet extends StatelessWidget { ), SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { showDialog( context: context, diff --git a/lib/presentation/sign_up/ui/view/sign_up_agree_screen.dart b/lib/presentation/sign_up/ui/view/sign_up_agree_screen.dart index a0b7d79c..22a5cd31 100644 --- a/lib/presentation/sign_up/ui/view/sign_up_agree_screen.dart +++ b/lib/presentation/sign_up/ui/view/sign_up_agree_screen.dart @@ -88,6 +88,7 @@ class SignUpAgreeScreen extends StatelessWidget { child: Container( padding: EdgeInsets.symmetric(vertical: 8.h), child: GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => context.read().clickAllAgree(), child: Row( children: [ diff --git a/lib/presentation/sign_up/ui/widget/agree/agree_widget.dart b/lib/presentation/sign_up/ui/widget/agree/agree_widget.dart index 3fa0e58a..40207347 100644 --- a/lib/presentation/sign_up/ui/widget/agree/agree_widget.dart +++ b/lib/presentation/sign_up/ui/widget/agree/agree_widget.dart @@ -49,6 +49,7 @@ class AgreeWidget extends StatelessWidget { /// 자세히 보기 ( agreePersonInformation ) isDetail ? GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () { launchUrl( Uri.parse( diff --git a/lib/presentation/sign_up/ui/widget/sign_up_app_bar.dart b/lib/presentation/sign_up/ui/widget/sign_up_app_bar.dart index b6fc12d7..aa2cbd3f 100644 --- a/lib/presentation/sign_up/ui/widget/sign_up_app_bar.dart +++ b/lib/presentation/sign_up/ui/widget/sign_up_app_bar.dart @@ -16,6 +16,7 @@ class SignUpAppBar extends StatelessWidget implements PreferredSizeWidget { children: [ SizedBox(width: 20.w), GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => Navigator.pop(context), child: ImageWidget( image: Images.arrowLeft, diff --git a/lib/presentation/timer_metronome/ui/widget/metronome/metronome_app_bar.dart b/lib/presentation/timer_metronome/ui/widget/metronome/metronome_app_bar.dart index 2a100b81..fc4c70bd 100644 --- a/lib/presentation/timer_metronome/ui/widget/metronome/metronome_app_bar.dart +++ b/lib/presentation/timer_metronome/ui/widget/metronome/metronome_app_bar.dart @@ -22,6 +22,7 @@ class MetronomeAppBar extends StatelessWidget implements PreferredSizeWidget{ mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ GestureDetector( + behavior: HitTestBehavior.opaque, onTap: () => MaeumNavigator.pop(context), child: ImageWidget( image: Images.arrowLeft, 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 bda58b7a..67110f35 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. publish_to: 'none' -version: 0.9.93+124 +version: 0.9.94+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: