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 #保存文件到相册