invokeMethod<T, P> static method

Future<T> invokeMethod<T, P>(
  1. String methodName, [
  2. dynamic param
])

Implementation

static Future<T> invokeMethod<T, P>(String methodName,
    [dynamic param]) async {
  var response = await _channel.invokeMethod<T>(
    methodName,
    param,
  );

  if (response == null) {
    throw Exception('Invoke method: $methodName return a null response');
  }

  return response;
}