watchStream method Null safety

Future<void> watchStream(
  1. int id,
  2. {List<CreateMediaItem>? media,
  3. String? pin,
  4. @Deprecated('It is legacy option,you should use media for fine grade control') bool? offerAudio,
  5. @Deprecated('It is legacy option,you should use media for fine grade control') bool? offerVideo,
  6. @Deprecated('It is legacy option,you should use media for fine grade control') bool? offerData}
)

Implementation

Future<void> watchStream(
  int id, {
  List<CreateMediaItem>? media,
  String? pin,
  @Deprecated('It is legacy option,you should use media for fine grade control')
      bool? offerAudio,
  @Deprecated('It is legacy option,you should use media for fine grade control')
      bool? offerVideo,
  @Deprecated('It is legacy option,you should use media for fine grade control')
      bool? offerData,
}) async {
  var payload = {
    "request": "watch",
    "id": id,
    if (pin != null) "pin": pin,
    if (media != null) "media": media,
    if (offerAudio != null) "offer_audio": true,
    if (offerVideo != null) "offer_video": true,
    if (offerData != null) "offer_data": offerData
  };
  await this.send(data: payload);
}