handleMethodCall method

  1. @visibleForTesting
Future handleMethodCall(
  1. MethodCall call
)

Handles method calls from the native platform.

This method processes incoming method calls from the native platform and routes them to the appropriate handler methods. It's the main entry point for all platform channel communication in this plugin.

This method is visible for testing purposes only. In production code, _handleMethodCall is used directly by the method channel.

Parameters:

  • call: The MethodCall object containing the method name and arguments.

Returns:

A Future that completes with the result of handling the method call. The result will be true if the operation was handled successfully, false otherwise.

Throws:

  • PlatformException if the method call is not recognized or if there's an error processing the request.

Implementation

@visibleForTesting
Future<dynamic> handleMethodCall(MethodCall call) {
  return _handleMethodCall(call);
}