dispose method

Future<void> dispose()

Implementation

Future<void> dispose() async {
  if (!_isDisposed) {
    await _streamController.close();

    for (var child in _children.values) {
      await child.dispose();
    }

    _isDisposed = true;
  }
}