Google celebrates Hispanic Heritage Month. See how.

bind method

void bind (T impl, InterfaceRequest<T> interfaceRequest)

Binds the given implementation to the given interface request.

Listens for messages on channel underlying the given interface request, decodes them, and dispatches the decoded messages to impl.

This object must not already be bound.

The impl and interfaceRequest parameters must not be null. The channel property of the given interfaceRequest must not be null.


void bind(T impl, InterfaceRequest<T> interfaceRequest) {
  Channel channel = interfaceRequest.passChannel()!;
  _impl = impl;

  final callback = onBind;
  if (callback != null) {