implementMethod method

void implementMethod(
  1. Pointer<ObjCSelector> sel,
  2. Pointer<Char> signature,
  3. Pointer<Void> trampoline,
  4. ObjCBlockBase block,
)

Add a method implementation to the protocol.

It is not recommended to call this method directly. Instead, use the implement methods on ObjCProtocolMethod and its subclasses.

Note: You cannot call this method after you have called build.

Implementation

void implementMethod(
  Pointer<r.ObjCSelector> sel,
  Pointer<Char> signature,
  Pointer<Void> trampoline,
  ObjCBlockBase block,
) {
  if (_built) {
    throw StateError('Protocol is already built');
  }
  _builder.implementMethod(
    sel,
    withBlock: block.ref.pointer.cast(),
    withTrampoline: trampoline,
    withSignature: signature,
  );
}