提交 acf22700 authored 作者: JarvanMo's avatar JarvanMo

use launchWeChatMiniProgram instead

上级 0cd25608
package com.jarvan.fluwx package com.jarvan.fluwx
import android.util.Log
import androidx.annotation.NonNull import androidx.annotation.NonNull
import com.jarvan.fluwx.handlers.FluwxAuthHandler import com.jarvan.fluwx.handlers.FluwxAuthHandler
import com.jarvan.fluwx.handlers.FluwxShareHandler import com.jarvan.fluwx.handlers.FluwxShareHandler
...@@ -16,10 +15,22 @@ import io.flutter.plugin.common.MethodCall ...@@ -16,10 +15,22 @@ import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel.Result import io.flutter.plugin.common.MethodChannel.Result
import io.flutter.plugin.common.PluginRegistry
/** FluwxPlugin */ /** FluwxPlugin */
public class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware { public class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
companion object {
@JvmStatic
fun registerWith(registrar: PluginRegistry.Registrar) {
val channel = MethodChannel(registrar.messenger(), "com.jarvanmo/fluwx")
val authHandler = FluwxAuthHandler(channel)
channel.setMethodCallHandler(FluwxPlugin().apply {
this.authHandler = authHandler
})
}
}
private var shareHandler: FluwxShareHandler? = null private var shareHandler: FluwxShareHandler? = null
private var authHandler: FluwxAuthHandler? = null private var authHandler: FluwxAuthHandler? = null
......
...@@ -108,7 +108,7 @@ Future<bool> sendWeChatAuth( ...@@ -108,7 +108,7 @@ Future<bool> sendWeChatAuth(
/// open mini-program /// open mini-program
/// see [WXMiniProgramType] /// see [WXMiniProgramType]
Future<bool> launchMiniProgram( Future<bool> launchWeChatMiniProgram(
{@required String username, {@required String username,
String path, String path,
WXMiniProgramType miniProgramType = WXMiniProgramType.RELEASE}) async { WXMiniProgramType miniProgramType = WXMiniProgramType.RELEASE}) async {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论