Google celebrates Hispanic Heritage Month. See how.

bind method

void bind (InterfaceHandle<T> interfaceHandle)

Binds the proxy to the given interface handle.

Calls to the proxy will be encoded as messages and sent over the channel underlying the given interface handle.

This object must not already be bound.

The interfaceHandle parameter must not be null. The channel property of the given interfaceHandle must not be null.


void bind(InterfaceHandle<T> interfaceHandle) {
  if (!isUnbound) {
    throw FidlStateException(
        "AsyncProxyController<${$interfaceName}> isn't unbound");

  final channel = interfaceHandle.passChannel();
  if (channel == null) {
    throw FidlError(
        "AsyncProxyController<${$interfaceName}> can't bind to null InterfaceHandle channel");
    ..onReadable = _handleReadable
    ..onError = _handleError;
  state = InterfaceState.bound;