invokeMethod static method

Future<int> invokeMethod(
  1. String method,
  2. Map<String, dynamic> args
)

Implementation

static Future<int> invokeMethod(
  String method,
  Map<String, dynamic> args,
) async {
  final result = await _channel.invokeMethod<int>(method, args);
  return result ?? 0; // if null, we assume error
}