getProtocol function

Pointer<ObjCProtocolImpl> getProtocol(
  1. String name
)

Only for use by ffigen bindings.

Implementation

Pointer<r.ObjCProtocolImpl> getProtocol(String name) {
  _ensureDartAPI();
  final cstr = name.toNativeUtf8();
  final clazz = r.getProtocol(cstr.cast());
  calloc.free(cstr);
  if (clazz == nullptr) {
    throw FailedToLoadProtocolException(name);
  }
  return clazz;
}