startSpeakerDeviceTest method Null safety

Future<int?> startSpeakerDeviceTest(
  1. String filePath
)

Start speaker test

This method plays back the specified audio data to test whether the speaker can function properly. If sound can be heard, the speaker is normal.

Note: this API supports only the macOS and Windows platforms

Parameters:

filePath Audio file path

Returned value:

0: success; negative number: failure

Implementation

Future<int?> startSpeakerDeviceTest(String filePath
    ) {
  return _channel.invokeMethod('startSpeakerDeviceTest', {
    "filePath": filePath
  });
}