Subscription<T> constructor

const Subscription<T>({
  1. required WebSocketChannel channel,
  2. required StreamController<T> controller,
  3. StreamSubscription? subscription,
})

Returns the new instance of Subscription.

Implementation

const Subscription({
  required WebSocketChannel channel,
  required StreamController<T> controller,
  StreamSubscription<dynamic>? subscription,
}) : _channel = channel,
     _controller = controller,
     _subscription = subscription;