From 5be355f76774a5928244fd90937bdc7cad2c499d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Wed, 14 Apr 2021 14:06:43 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0=E6=8D=A2=E8=B5=B7app?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhios/zhiying_comm/ZhiyingFlutterCommNativable.java | 3 +++ .../cn/zhios/zhiying_comm/ZhiyingFlutterCommNative.java | 8 ++++++++ pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNativable.java b/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNativable.java index 92ea98f..0905c28 100644 --- a/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNativable.java +++ b/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNativable.java @@ -18,4 +18,7 @@ public interface ZhiyingFlutterCommNativable { public void invokeMethod(String method, Map params, ZhiyingFlutterCommHandler handler); public void initSuccess(); + + public void openAppSettings(); + } diff --git a/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNative.java b/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNative.java index 74325a0..5159f72 100644 --- a/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNative.java +++ b/android/src/main/java/cn/zhios/zhiying_comm/ZhiyingFlutterCommNative.java @@ -97,7 +97,15 @@ public class ZhiyingFlutterCommNative implements MethodCallHandler { } result.success("success"); return; + } + if(call.method.equals("openAppSettings")){ + if(nat!=null){ + nat.openAppSettings(); + } + Map map = new HashMap(); + result.success(map); + return; } /* 调用原生方法 */ diff --git a/pubspec.yaml b/pubspec.yaml index 93f5ae1..bdd2135 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -79,7 +79,7 @@ dependencies: permission_handler: git: url: 'http://192.168.0.138:3000/FnuoOS_Flutter_Components/permission_handler.git' - ref: '0.0.1' + ref: '0.0.2' #文件夹路径管理 path_provider: ^1.4.0 #保存文件到相册