connectionWithMediaType method Null safety

Future<CaptureConnection?> connectionWithMediaType(
  1. String mediaType

Returns the first connection in the connections array with an input port of a specified media type.

mediaType: A media type constant (such as or

The first capture connection in the connections array that has an CaptureInputPort with media type mediaType, or null if no connection with the specified media type is found.


Future<CaptureConnection?> connectionWithMediaType(String mediaType) async {
  return await _channel.$connectionWithMediaType(this, mediaType)
      as CaptureConnection?;