invoke<T> method
- dynamic args
Native method invocation definition and handling.
Implementation
Future<T?> invoke<T>([dynamic args]) async {
if (argumentType != null && args.runtimeType != argumentType!) {
throw Exception('Argument type not properly defined for $this. Expected $argumentType, got ${args.runtimeType}.');
}
if (args is IaBaseRequest) {
args = args.toSupportedType();
}
return await channel.invokeMethod(methodId, args);
}