blob: 36ac23a4116999971d2eefd2209afc9f06f2138c [file] [log] [blame] [view]
# close method
*[<Null safety>](https://dart.dev/null-safety)*
- @override
void close
()
_<span class="feature">override</span>_
<p>Close this node and all of its bindings and children.</p>
## Implementation
```dart
@override
void close() {
_isClosed = true;
for (final entry in _entries.entries) {
entry.value.node!.close();
}
removeAllNodes();
// schedule a task because if user closes this as soon as
// they open a connection, dart fidl binding throws exception due to
// event(OnOpen) on this fidl.
scheduleMicrotask(() {
for (final c in _connections) {
c.closeBinding();
}
_connections.clear();
});
}
```