Flutter Engine
The Flutter Engine
|
Public Member Functions | |
void | onMethodCall (@NonNull MethodCall call, @NonNull Result result) |
A handler of incoming method calls.
Definition at line 170 of file MethodChannel.java.
void io.flutter.plugin.common.MethodChannel.MethodCallHandler.onMethodCall | ( | @NonNull MethodCall | call, |
@NonNull Result | result | ||
) |
Handles the specified method call received from Flutter.
Handler implementations must submit a result for all incoming calls, by making a single call on the given Result
callback. Failure to do so will result in lingering Flutter result handlers. The result may be submitted asynchronously and on any thread. Calls to unknown or unimplemented methods should be handled using Result#notImplemented()
.
Any uncaught exception thrown by this method will be caught by the channel implementation and logged, and an error result will be sent back to Flutter.
The handler is called on the platform thread (Android main thread) by default, or otherwise on the thread specified by the BinaryMessenger.TaskQueue
provided to the associated MethodChannel
when it was created. See also Threading in the Flutter Engine.
call | A MethodCall . |
result | A Result used for submitting the result of the call. |