play method

Future<void> play (SystemSoundType type)

Play the specified system sound. If that sound is not present on the system, the call is ignored.

Implementation

static Future<void> play(SystemSoundType type) async {
  await SystemChannels.platform.invokeMethod(
    'SystemSound.play',
    type.toString(),
  );
}