invokeNativeMethod<T> function

Future<T?> invokeNativeMethod<T>(
  1. String channel,
  2. String method, [
  3. dynamic arguments
])

Invoke Native method and get result

Implementation

Future<T?> invokeNativeMethod<T>(
  String channel,
  String method, [
  dynamic arguments,
]) async {
  var platform = MethodChannel(channel);
  return await platform.invokeMethod<T>(method, arguments);
}