Skip to content

Commit

Permalink
Revert: 01b7047 inappwebview location
Browse files Browse the repository at this point in the history
  • Loading branch information
ybmin committed Dec 3, 2024
1 parent 01b7047 commit 2408267
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
FLUTTER_VERSION: "3"
JAVA_VERSION: "11"
JAVA_VERSION: "17"

jobs:
build-android:
Expand Down
1 change: 0 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ android {

kotlinOptions {
jvmTarget = '1.8'
languageVersion = '1.8'
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:8.1.0'
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.google.gms:google-services:4.3.13'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
23 changes: 6 additions & 17 deletions lib/views/taxiView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ class TaxiView extends HookWidget {
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin();

//TODO: Remove this on production
Future<void> _requestLocationPermission() async {
var status = await Permission.locationWhenInUse.status;
if (status.isDenied) {
status = await Permission.locationWhenInUse.request();
}
if (!status.isGranted) {
Fluttertoast.showToast(msg: "위치 권한이 거부되었습니다.");
}
}

@override
Widget build(BuildContext context) {
String address = RemoteConfigController().frontUrl;
Expand Down Expand Up @@ -81,12 +70,6 @@ class TaxiView extends HookWidget {

devicePixelRatio = MediaQuery.of(context).devicePixelRatio;

//TODO: Remove this on production
useEffect(() {
_requestLocationPermission();
return;
}, []);

useEffect(() {
if (isTimerUp.value) {
FcmToken().init().then((value) {
Expand Down Expand Up @@ -863,6 +846,12 @@ class TaxiView extends HookWidget {
},
androidOnPermissionRequest:
(controller, origin, resources) async {
if (resources.contains("location")) {
var status = await Permission.location.request();
if (!status.isGranted) {
openAppSettings();
}
}
return PermissionRequestResponse(
resources: resources,
action: PermissionRequestResponseAction.GRANT);
Expand Down

0 comments on commit 2408267

Please sign in to comment.