Created
August 26, 2020 08:12
-
-
Save vreamer/59d7b0571fd2c8311ad4357a63200120 to your computer and use it in GitHub Desktop.
Show new idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} | |
// add the following method, it passes a string to flutter | |
fun showNewIdea(idea: String) { | |
methodChannel.invokeMethod("showNewIdea", idea) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment