blob: a2533bbc1a7e1deed053c3e212e11b4c1e85cb75 [file] [log] [blame] [view]
# unbind method
[InterfaceHandle](../../package-fidl_fidl/InterfaceHandle-class.md)<T> unbind
()
<p>Unbinds the proxy and returns the unbound channel as an interface handle.</p>
<p>Calls on the proxy will no longer be encoded as messages on the bound
channel.</p>
<p>The proxy must have previously been bound (e.g., using <a href="../../package-fidl_fidl/ProxyController/bind.md">bind</a>).</p>
## Implementation
```dart
InterfaceHandle<T>? unbind() {
assert(isBound);
if (!_reader.isBound) {
return null;
}
final callback = onUnbind;
if (callback != null) {
callback();
}
// TODO(rosswang): Do we need to _reset() here?
return InterfaceHandle<T>(_reader.unbind());
}
```