fixing kotlin reference isue
This commit is contained in:
parent
aad761dc3d
commit
9c6648f162
@ -19,7 +19,7 @@ import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||
import io.flutter.plugin.common.MethodChannel.Result
|
||||
//import io.flutter.plugin.common.PluginRegistry.Registrar
|
||||
import io.flutter.plugin.common.PluginRegistry.Registrar
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
@ -39,13 +39,6 @@ class PhotoGalleryPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
|
||||
// them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called
|
||||
// depending on the user's project. onAttachedToEngine or registerWith must both be defined
|
||||
// in the same class.
|
||||
@JvmStatic
|
||||
override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
|
||||
val channel = MethodChannel(flutterPluginBinding.binaryMessenger, "photo_gallery")
|
||||
val channel = MethodChannel(registrar.messenger(), "photo_gallery")
|
||||
channel.setMethodCallHandler(PhotoGalleryPlugin())
|
||||
}
|
||||
|
||||
const val imageType = "image"
|
||||
const val videoType = "video"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user