- Enclosing class:
public static interface MethodChannel.MethodCallHandlerA handler of incoming method calls.
@UiThread void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.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
MethodChannel.Resultcallback. 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
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). For more details see Threading in the Flutter Engine.