Skip to content

Instantly share code, notes, and snippets.

@vreamer
Created August 26, 2020 07:59
Show Gist options
  • Save vreamer/530a2ee553cf9536a17e3470647552f1 to your computer and use it in GitHub Desktop.
Save vreamer/530a2ee553cf9536a17e3470647552f1 to your computer and use it in GitHub Desktop.
Configure Method Channel
package com.example.direct_reply_notification
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
object NativeMethodChannel {
private const val CHANNEL_NAME = "channel"
private lateinit var methodChannel: MethodChannel
fun configureChannel(flutterEngine: FlutterEngine) {
methodChannel = MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL_NAME)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment