MethodChannelXAudioCapture constructor

MethodChannelXAudioCapture()

Subscribes to the native event stream on platforms that register a handler for it.

Implementation

MethodChannelXAudioCapture() {
  if (!supported) return;
  _events.receiveBroadcastStream().listen(
    _onEvent,
    onError: (e, st) {
      FlutterError.reportError(
        FlutterErrorDetails(
          exception: e,
          stack: st,
          library: 'ux',
          context: ErrorDescription('while receiving microphone audio'),
        ),
      );
    },
  );
}