setNoDisturb method Null safety

Future<void> setNoDisturb(
  1. {required dynamic target,
  2. required bool? isNoDisturb}
)

Implementation

Future<void> setNoDisturb({
  required dynamic target, // (JMSingle | JMGroup)
  required bool? isNoDisturb,
}) async {
  var param = target.toJson();
  param['isNoDisturb'] = isNoDisturb;
  await _channel.invokeMethod(
      'setNoDisturb', param..removeWhere((key, value) => value == null));
  return;
}