// Android (Kotlin)

val

channel

MethodChannel

flutterView

"foo"

channel

setMethodCallHandler

call

result

>

when

call

method

"bar"

>

result

success

"Hello, ${call.arguments}"

else

>

result

notImplemented

()

// iOS (Swift)

let

channel

FlutterMethodChannel

name

"foo"

binaryMessenger

flutterView

channel

setMethodCallHandler

call