attach method

void attach()

A view shows the stream: it gets the open session, or a new one at once.

Implementation

void attach() {
  _views++;
  // In a hidden tab the pending close stands: the view shows nobody anything.
  if (!_hidden) {
    _closeTimer?.cancel();
    _closeTimer = null;
  }
  _ensureSession();
}