sendMessage method Null safety

dynamic sendMessage(
  1. {required String channelName,
  2. required List<String> args,
  3. String? uuid}
)

Implementation

sendMessage({
  required String channelName,
  required List<String> args,
  String? uuid,
}) {
  if (uuid != null) {
    evaluate(
        "DART_TO_QUICKJS_CHANNEL_sendMessage('$channelName', '${jsonEncode(args)}', '$uuid');");
  } else {
    evaluate(
        "DART_TO_QUICKJS_CHANNEL_sendMessage('$channelName', '${jsonEncode(args)}');");
  }
}