# close method | |
void close | |
() | |
<p>Close the channel bound to the proxy.</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 | |
void close() { | |
if (isBound) { | |
if (_pendingResponsesCount > 0) { | |
proxyError('The proxy is closed.'); | |
} | |
_reset(); | |
_reader.close(); | |
final callback = onClose; | |
if (callback != null) { | |
callback(); | |
} | |
} | |
} | |
``` | |