AtTelemetryService constructor
AtTelemetryService({
- StreamController<
AtTelemetryEvent> ? controller,
Allow injection of stream controller
Implementation
AtTelemetryService({StreamController<AtTelemetryEvent>? controller})
: _controller =
controller ?? StreamController<AtTelemetryEvent>.broadcast() {
if (!_controller.stream.isBroadcast) {
throw IllegalArgumentException(
'AtTelemetryService: controller must be a broadcast StreamController');
}
}