startSpeakerDeviceTest method

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

Start speaker test (Support for macOS and Windows platforms)

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.

Parameters:

filePath Audio file path

Returned value:

0: success; negative number: failure

Implementation

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