Skip to content

Commit

Permalink
피클 쪽 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
ljyo2o9 committed Aug 21, 2024
1 parent f6e5b34 commit 324378d
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions lib/di/di.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -250,5 +251,8 @@ Future<List<BlocProvider>> di() async {
),
),
BlocProvider<PurposeBloc>(create: (context) => PurposeBloc(getPurposeDetailUseCase: getPurposeDetailUseCase)),

// pickle
BlocProvider<WebViewControllerStateCubit>(create: (context) => WebViewControllerStateCubit()),
];
}
3 changes: 2 additions & 1 deletion lib/presentation/page_manager/ui/view/page_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -20,7 +21,7 @@ class PageManagerScreen extends StatelessWidget {
const HomeScreen(),
const PoseMainScreen(),
const EmptyViewScreen(),
const EmptyViewScreen(),
const PickleScreen(),
const SelfCareScreen(),
];

Expand Down
23 changes: 23 additions & 0 deletions lib/presentation/pickle/ui/view/pickle_screen.dart
Original file line number Diff line number Diff line change
@@ -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<WebViewControllerStateCubit, WebViewController>(
builder: (_, state) {
return Scaffold(
body: SafeArea(
child: WebViewWidget(
controller: state,
),
),
);
},
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:webview_flutter/webview_flutter.dart';

class WebViewControllerStateCubit extends Cubit<WebViewController> {
WebViewControllerStateCubit() : super(
WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..loadRequest(Uri.parse("https://maeumgagym-webview.xquare.app/"))
);
}
32 changes: 32 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 324378d

Please sign in to comment.